refs #2642. Create image. COmmand task add
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/39/head
Manuel Aranda Rosales 2025-09-03 08:06:12 +02:00
parent 570af1ed2b
commit 6f6afc034a
1 changed files with 3 additions and 6 deletions

View File

@ -641,15 +641,12 @@ export class CreateClientImageComponent implements OnInit{
openScheduleModal(): void { openScheduleModal(): void {
let scope = 'clients'; let scope = 'clients';
// Verificar que tenemos la información del cliente
if (!this.client) { if (!this.client) {
this.toastService.error('No se ha cargado la información del cliente'); this.toastService.error('No se ha cargado la información del cliente');
return; return;
} }
// Crear un array con el objeto cliente completo
let selectedClients = [this.client]; let selectedClients = [this.client];
console.log(selectedClients);
const dialogRef = this.dialog.open(CreateTaskComponent, { const dialogRef = this.dialog.open(CreateTaskComponent, {
width: '800px', width: '800px',
@ -657,14 +654,13 @@ export class CreateClientImageComponent implements OnInit{
scope: scope, scope: scope,
selectedClients: selectedClients, selectedClients: selectedClients,
organizationalUnit: this.client['@id'], organizationalUnit: this.client['@id'],
source: 'create-image', source: 'assistant',
runScriptContext: null runScriptContext: null
} }
}); });
dialogRef.afterClosed().subscribe((result: any) => { dialogRef.afterClosed().subscribe((result: any) => {
if (result) { if (result) {
// Verificar que tenemos la partición seleccionada
if (!this.selectedPartition) { if (!this.selectedPartition) {
this.toastService.error('Debe seleccionar una partición'); this.toastService.error('Debe seleccionar una partición');
return; return;
@ -678,7 +674,8 @@ export class CreateClientImageComponent implements OnInit{
action: this.monolithicAction, action: this.monolithicAction,
diskNumber: this.selectedPartition.diskNumber, diskNumber: this.selectedPartition.diskNumber,
partitionNumber: this.selectedPartition.partitionNumber, partitionNumber: this.selectedPartition.partitionNumber,
imageName: this.monolithicAction === 'create' ? this.name : this.selectedImage?.name imageName: this.monolithicAction === 'create' ? this.name : this.selectedImage?.name,
imageUuid: this.monolithicAction === 'update' ? this.selectedImage?.uuid : null
}; };
} else if (this.imageType === 'git') { } else if (this.imageType === 'git') {
payload = { payload = {