Compare commits
3 Commits
b0d255a7d1
...
9fcfeb7f4e
Author | SHA1 | Date |
---|---|---|
|
9fcfeb7f4e | |
|
f70dcd109a | |
|
2f202e5037 |
|
@ -16,12 +16,20 @@
|
|||
<ng-container matColumnDef="value">
|
||||
<mat-header-cell *matHeaderCellDef> Valor </mat-header-cell>
|
||||
<mat-cell *matCellDef="let variable">
|
||||
<mat-form-field class="value-input">
|
||||
<!-- Si es booleano, usamos checkbox -->
|
||||
<mat-checkbox *ngIf="isBoolean(variable.value)"
|
||||
[checked]="variable.value === 'true'"
|
||||
(change)="variable.value = $event.checked ? 'true' : 'false'">
|
||||
</mat-checkbox>
|
||||
|
||||
<!-- Si no es booleano, usamos input -->
|
||||
<mat-form-field *ngIf="!isBoolean(variable.value)" class="value-input">
|
||||
<input matInput [(ngModel)]="variable.value" />
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||
</mat-table>
|
||||
|
@ -30,4 +38,4 @@
|
|||
<button class="action-button" (click)="loadEnvVars()">Recargar</button>
|
||||
<button class="submit-button" (click)="saveEnvVars()">Guardar Cambios</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,12 +31,15 @@ export class EnvVarsComponent {
|
|||
this.envVars = Object.entries(response.vars).map(([name, value]) => ({ name, value }));
|
||||
},
|
||||
error: (err) => {
|
||||
console.error('Error al cargar las variables de entorno:', err);
|
||||
this.toastService.error('No se pudieron cargar las variables de entorno.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
isBoolean(value: string): boolean {
|
||||
return value === 'true' || value === 'false';
|
||||
}
|
||||
|
||||
saveEnvVars(): void {
|
||||
const vars = this.envVars.reduce((acc, variable) => {
|
||||
acc[variable.name] = variable.value;
|
||||
|
|
|
@ -115,6 +115,7 @@ export class CreateTaskScheduleComponent implements OnInit{
|
|||
}
|
||||
|
||||
convertDateToLocalISO(date: Date): string {
|
||||
date = new Date(date);
|
||||
const adjustedDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
|
||||
return adjustedDate.toISOString();
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ export class CreateCommandComponent implements OnInit{
|
|||
readOnly: this.createCommandForm.value.readOnly,
|
||||
enabled: this.createCommandForm.value.enabled,
|
||||
comments: this.createCommandForm.value.comments,
|
||||
parameters: this.createCommandForm.value.parameters,
|
||||
};
|
||||
|
||||
if (this.commandId) {
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
</h4>
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<button class="action-button" [disabled]="data.status === 'busy' || !selectedModelClient || !allSelected || !selectedDisk" (click)="save()">Ejecutar</button>
|
||||
<button class="action-button" [disabled]="data.status === 'busy' || !selectedModelClient || !allSelected || !selectedDisk || (selectedDisk.totalDiskSize - selectedDisk.used) <= 0" (click)="save()">Ejecutar</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button mat-stroked-button color="accent" [disabled]="data.status === 'busy' || !selectedModelClient || !allSelected || !selectedDisk" (click)="openScheduleModal()">
|
||||
<button mat-stroked-button color="accent" [disabled]="data.status === 'busy' || !selectedModelClient || !allSelected || !selectedDisk || (selectedDisk.totalDiskSize - selectedDisk.used) <= 0" (click)="openScheduleModal()">
|
||||
<mat-icon>schedule</mat-icon> Opciones de programación
|
||||
</button>
|
||||
</div>
|
||||
|
@ -101,15 +101,15 @@
|
|||
|
||||
<div class="disk-space-info-container">
|
||||
<div class="disk-space-info" [ngClass]="selectedDisk.used < selectedDisk.totalDiskSize ? 'chip-free' : 'chip-full'">
|
||||
Espacio usado: {{ selectedDisk.used }} MB
|
||||
Espacio usado: {{ selectedDisk.used | number:'1.2-2' }} MB
|
||||
</div>
|
||||
|
||||
<div class="disk-space-info" [ngClass]="selectedDisk.used < selectedDisk.totalDiskSize ? 'chip-free' : 'chip-full'">
|
||||
Espacio libre: {{ selectedDisk.totalDiskSize - selectedDisk.used}} MB
|
||||
Espacio libre: {{ (selectedDisk.totalDiskSize - selectedDisk.used) | number:'1.2-2' }} MB
|
||||
</div>
|
||||
|
||||
<div class="disk-space-info">
|
||||
Espacio total: {{ selectedDisk.totalDiskSize }} MB
|
||||
Espacio total: {{ selectedDisk.totalDiskSize | number:'1.2-2' }} MB
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<div class="script-preview" [innerHTML]="scriptContent"></div>
|
||||
</div>
|
||||
|
||||
<div class="script-params" *ngIf="parameterNames.length > 0">
|
||||
<div class="script-params" *ngIf="parameterNames.length > 0 && selectedScript.parameters">
|
||||
<h3>Ingrese los parámetros:</h3>
|
||||
<div *ngFor="let paramName of parameterNames">
|
||||
<mat-form-field appearance="fill" class="full-width">
|
||||
|
|
|
@ -77,15 +77,12 @@ export class RunScriptAssistantComponent implements OnInit{
|
|||
if (!ctx) {
|
||||
return '';
|
||||
}
|
||||
// Si es un array de clientes
|
||||
if (Array.isArray(ctx)) {
|
||||
return ctx.map(c => c.name).join(', ');
|
||||
}
|
||||
// Si es un objeto con propiedad name
|
||||
if (typeof ctx === 'object' && 'name' in ctx) {
|
||||
return ctx.name;
|
||||
}
|
||||
// Si es un string plano
|
||||
return String(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,8 +129,7 @@ export class CreatePxeTemplateComponent implements OnInit {
|
|||
this.dialogRef.close(true);
|
||||
},
|
||||
error: error => {
|
||||
this.toastService.error('Error al actualizar la plantilla PXE');
|
||||
this.dialogRef.close(false);
|
||||
this.toastService.error(error.error['hydra:description']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
<ng-container matColumnDef="actions" joyrideStep="actionsStep" text="{{ 'actionsStepText' | translate }}">
|
||||
<th mat-header-cell *matHeaderCellDef style="text-align: center;">{{ 'columnActions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let trace" style="text-align: center;">
|
||||
<button mat-icon-button color="primary" [disabled]="!trace.input" (click)="openInputModal(trace.input)">
|
||||
<button mat-icon-button color="primary" [disabled]="!trace.input || trace.input.length === 0" (click)="openInputModal(trace.input)">
|
||||
<mat-icon>
|
||||
<span class="material-symbols-outlined">
|
||||
mode_comment
|
||||
|
@ -179,4 +179,4 @@
|
|||
<mat-paginator [length]="length" [pageSize]="itemsPerPage" [pageIndex]="page" [pageSizeOptions]="pageSizeOptions"
|
||||
(page)="onPageChange($event)">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<span>{{ 'commands' | translate }}</span>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
<!--
|
||||
<mat-list-item routerLink="/commands-groups" (click)="onItemClick()"
|
||||
matTooltip="{{ 'TOOLTIP_COMMAND_GROUPS' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
|
@ -41,6 +42,7 @@
|
|||
<span>{{ 'commandGroups' | translate }}</span>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
-->
|
||||
<mat-list-item routerLink="/commands-task" (click)="onItemClick()" matTooltip="{{ 'TOOLTIP_TASKS' | translate }}"
|
||||
matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"back": "Atrás",
|
||||
"addClientDialogTitle": "Añadir Cliente",
|
||||
"dialogTitleEditUser": "Editar usuario",
|
||||
"dialogTitleChangePassword": "Change password",
|
||||
"dialogTitleChangePassword": "Cambiar contraseña",
|
||||
"labelCurrentPassword": "Contraseña actual",
|
||||
"labelNewPassword": "Nueva contraseña",
|
||||
"labelRepeatPassword": "Repite la contraseña",
|
||||
|
@ -521,7 +521,7 @@
|
|||
"remoteAccess": "Disponible acceso remoto",
|
||||
"noRemoteAccess": "No disponible acceso remoto",
|
||||
"capacityWarning": "El aforo no puede ser",
|
||||
"procedimientosCliente": "Procedimientos",
|
||||
"procedimientosCliente": "Histórico acciones",
|
||||
"tableDateRepositoryText": "Esta tabla muestra los datos asociados a los repositorios existentes.",
|
||||
"repositoryTitleStepText": "En esta pantalla se pueden gestionar los repositorios de imágenes.",
|
||||
"monolithicImageStep": "Imagen monolítica",
|
||||
|
|
Loading…
Reference in New Issue