diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts index 4e685f7..9f6bdc9 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts @@ -50,7 +50,6 @@ export class ExecuteCommandComponent implements OnInit { ngOnChanges(changes: SimpleChanges): void { if (changes['clientData']) { console.log(this.clientData.length) - console.log('clientData ha cambiado:', changes['clientData'].currentValue); } } @@ -94,13 +93,11 @@ export class ExecuteCommandComponent implements OnInit { } powerOnClient(): void { - const payload = { - client: '' - } - - this.http.post('', payload).subscribe( + this.http.post(`${this.baseUrl}/image-repositories/wol`, { + clients: this.clientData.map((client: any) => client['@id']) + }).subscribe( response => { - this.toastService.success('Cliente actualizado correctamente'); + this.toastService.success('Petición de encendido enviada correctamente'); }, error => { this.toastService.error('Error de conexión con el cliente'); @@ -113,7 +110,7 @@ export class ExecuteCommandComponent implements OnInit { clients: this.clientData.map((client: any) => client['@id']) }).subscribe( response => { - this.toastService.success('Cliente actualizado correctamente'); + this.toastService.success('Petición de apagado enviada correctamente'); }, error => { this.toastService.error('Error de conexión con el cliente'); diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.css index f8e9c6c..ffd86db 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.css +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.css @@ -39,4 +39,4 @@ button { mat-slide-toggle{ margin-left: 10px; -} \ No newline at end of file +} diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts index ec2a96f..f3aae66 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts @@ -130,7 +130,9 @@ export class CreateOrganizationalUnitComponent implements OnInit { loadOgLives() { this.dataService.getOgLives().subscribe( - (data: any[]) => this.ogLives = data, + (data: any[]) => { + this.ogLives = data + }, error => console.error('Error fetching ogLives', error) ); } diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css index 40124bd..76f9983 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css @@ -5,35 +5,34 @@ h1 { color: #3f51b5; margin-bottom: 20px; } - + .network-form { display: flex; flex-direction: column; gap: 15px; } - + .form-field { width: 100%; margin-top: 10px; } - + .mat-dialog-content { padding: 20px; } - + .mat-dialog-actions { display: flex; justify-content: flex-end; padding: 10px 20px; } - + button { text-transform: none; font-size: 16px; font-weight: 500; } - + .mat-slide-toggle { margin-top: 20px; } - \ No newline at end of file diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html index 4e7c86c..c4bdb8a 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html @@ -33,7 +33,7 @@ -