Añadido comando Refrescar tanto en un cliente como en un grupo de clientes #62
|
|
@ -1,4 +1,8 @@
|
|||
# Changelog
|
||||
## [1.3.0] - 2026-03-31
|
||||
### Added
|
||||
- Añadido comando "Refrescar" tanto en un cliente como en un grupo de clientes, de forma que se ejecuta el comando Actualizar en el ogAgent y se actualiza la información de las particiones del cliente y se recarga el menú del ogbrowser.
|
||||
|
||||
## [1.2.7] - 2026-03-31
|
||||
### Added
|
||||
- Rediseño de la plantilla para seleccion de particiones, se ha creado un componente compartido por la vista de crear imagen y deploy de imagenes.
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export class ExecuteCommandComponent implements OnInit {
|
|||
{ translationKey: 'executeCommands.softwareInventory', slug: 'software-inventory', disabled: false },
|
||||
{ translationKey: 'executeCommands.hardwareInventory', slug: 'hardware-inventory', disabled: false },
|
||||
{ translationKey: 'executeCommands.runScript', slug: 'run-script', disabled: false },
|
||||
{ translationKey: 'executeCommands.refresh', slug: 'refresh', disabled: false },
|
||||
];
|
||||
|
||||
client: any = {};
|
||||
|
|
@ -79,7 +80,8 @@ export class ExecuteCommandComponent implements OnInit {
|
|||
'software-inventory',
|
||||
'hardware-inventory',
|
||||
'remove-cache-image',
|
||||
'partition'
|
||||
'partition',
|
||||
'refresh'
|
||||
],
|
||||
'ou-minimal': [
|
||||
'power-on',
|
||||
|
|
@ -112,7 +114,7 @@ export class ExecuteCommandComponent implements OnInit {
|
|||
if (states[0] === 'off' || states[0] === 'disconnected') {
|
||||
command.disabled = !['power-on', 'create-image'].includes(command.slug);
|
||||
} else {
|
||||
command.disabled = !['power-off', 'reboot', 'login', 'create-image', 'deploy-image', 'remove-cache-image', 'partition', 'run-script', 'software-inventory', 'hardware-inventory'].includes(command.slug);
|
||||
command.disabled = !['power-off', 'reboot', 'login', 'create-image', 'deploy-image', 'remove-cache-image', 'partition', 'run-script', 'software-inventory', 'hardware-inventory', 'refresh'].includes(command.slug);
|
||||
}
|
||||
} else {
|
||||
if (command.slug === 'software-inventory') {
|
||||
|
|
@ -125,6 +127,11 @@ export class ExecuteCommandComponent implements OnInit {
|
|||
command.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (command.slug === 'refresh') {
|
||||
command.disabled = !states.every(state => state === 'og-live');
|
||||
}
|
||||
|
||||
return command;
|
||||
});
|
||||
}
|
||||
|
|
@ -173,6 +180,10 @@ export class ExecuteCommandComponent implements OnInit {
|
|||
if (action === 'software-inventory') {
|
||||
this.softwareInventory();
|
||||
}
|
||||
|
||||
if (action === 'refresh') {
|
||||
this.refreshClient();
|
||||
}
|
||||
}
|
||||
|
||||
rebootClient(): void {
|
||||
|
|
@ -188,6 +199,19 @@ export class ExecuteCommandComponent implements OnInit {
|
|||
);
|
||||
}
|
||||
|
||||
refreshClient(): void {
|
||||
this.http.post(`${this.baseUrl}/clients/server/refresh`, {
|
||||
clients: this.clientData.map((client: any) => client['@id'])
|
||||
}).subscribe(
|
||||
response => {
|
||||
this.toastService.success('Petición de refresco enviada correctamente');
|
||||
},
|
||||
error => {
|
||||
this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
loginClient(): void {
|
||||
const clientDataToSend = this.clientData.map(client => ({
|
||||
name: client.name,
|
||||
|
|
|
|||
|
|
@ -72,5 +72,10 @@ export const COMMAND_TYPES: any = {
|
|||
'kill-job': {
|
||||
en: 'Cancel Task',
|
||||
es: 'Cancelar Tarea'
|
||||
},
|
||||
|
||||
refresh: {
|
||||
en: 'Refresh',
|
||||
es: 'Refrescar'
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -517,7 +517,8 @@
|
|||
"partition": "Partition and Format",
|
||||
"softwareInventory": "Software Inventory",
|
||||
"hardwareInventory": "Hardware Inventory",
|
||||
"runScript": "Run Script"
|
||||
"runScript": "Run Script",
|
||||
"refresh": "Refresh"
|
||||
},
|
||||
"changeOU": "Change Organizational Unit",
|
||||
"moveClientsTooltip": "Move clients to another organizational unit",
|
||||
|
|
|
|||
|
|
@ -518,7 +518,8 @@
|
|||
"partition": "Particionar y Formatear",
|
||||
"softwareInventory": "Inventario Software",
|
||||
"hardwareInventory": "Inventario Hardware",
|
||||
"runScript": "Ejecutar script"
|
||||
"runScript": "Ejecutar script",
|
||||
"refresh": "Refrescar"
|
||||
},
|
||||
"changeOU": "Mover",
|
||||
"moveClientsTooltip": "Mover clientes a otra unidad organizativa",
|
||||
|
|
|
|||
Loading…
Reference in New Issue