diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css index 833284d..71b0af9 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css @@ -1,70 +1,83 @@ -.global-selectors { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 15px; - gap: 10px; -} - -.global-selectors mat-form-field { - flex: 1; - margin-right: 10px; -} - -.global-selectors button { - height: 40px; - padding: 0 20px; -} - -.filters-container { - display: flex; - justify-content: space-between; - align-items: flex-end; - gap: 10px; - margin-bottom: 15px; -} - -.filters-container mat-form-field { - flex: 1; -} - -.mat-elevation-z8 { - margin-top: 15px; -} - -.mat-table { - width: 100%; -} - -mat-header-cell, mat-cell { - text-align: center; - font-size: 14px; - padding: 8px; -} - -mat-form-field { - width: 100%; -} - -.mat-paginator { - margin-top: 20px; - display: flex; - justify-content: center; -} - -mat-select, mat-input { - font-size: 14px; -} - -.mat-form-field-appearance-fill .mat-form-field-flex { - padding: 8px 0; -} - -button.mat-flat-button { - padding: 8px 16px; - font-size: 14px; +.title { + font-size: 24px; } .divider { margin: 20px 0; } + +table { + width: 100%; + margin-top: 50px; +} + +.search-container { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + padding: 0 5px; + box-sizing: border-box; +} + +.global-selectors { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + padding: 0 5px; +} + +.selected-global { + width: 450px; +} + +.search-string { + flex: 2; + padding: 5px; +} + +.search-boolean { + flex: 1; + padding: 5px; +} + +.save-button{ + justify-self: end; +} + +.header-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px; +} + +.mat-elevation-z8 { + box-shadow: 0px 0px 0px rgba(0,0,0,0.2); +} + +.paginator-container { + display: flex; + justify-content: end; + margin-bottom: 30px; +} + +.example-headers-align .mat-expansion-panel-header-description { + justify-content: space-between; + align-items: center; +} + +.example-headers-align .mat-mdc-form-field + .mat-mdc-form-field { + margin-left: 8px; +} + +.example-button-row { + display: table-cell; + max-width: 600px; +} + +.example-button-row .mat-mdc-button-base { + margin: 8px 8px 8px 0; +} + diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html index 6f7b636..0b161ad 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html @@ -1,21 +1,10 @@ - - - - Sincronización ogBoot - - -
- -
-
-
-

Administrar ficheros de arranque PXE

+

Netboot avanzado

-
- +
+ Selecciona Unidad Organizacional Cargando unidades... @@ -26,7 +15,7 @@ Este campo es obligatorio - + Selecciona aula No hay aulas disponibles @@ -40,14 +29,14 @@
- - Global ogLive - + + Seleccione plantilla para aplicar a todos los clientes + {{ option.name }} - +
@@ -75,19 +64,8 @@
- + - -
- -
- - - \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts index 5fefbe3..e88153e 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts @@ -3,6 +3,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { ToastrService } from 'ngx-toastr'; import { PageEvent } from '@angular/material/paginator'; +import {Observable} from "rxjs"; +import {ServerInfoDialogComponent} from "../../ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component"; @Component({ selector: 'app-pxe-boot-files', @@ -26,6 +28,7 @@ export class PxeBootFilesComponent implements OnInit { filters: any = {}; displayedColumns: string[] = ['id', 'name', 'ogLive']; + constructor( private fb: FormBuilder, private http: HttpClient, @@ -73,14 +76,14 @@ export class PxeBootFilesComponent implements OnInit { onOrganizationalUnitChange(): void { const selectedUnitId = this.taskForm.get('organizationalUnit')?.value; const selectedUnit = this.availableOrganizationalUnits.find(unit => unit['@id'] === selectedUnitId); - + if (selectedUnit) { this.selectedUnitChildren = this.getAllClassrooms(selectedUnit); } else { this.selectedUnitChildren = []; } } - + getAllClassrooms(unit: any): any[] { let classrooms: any[] = []; if (unit.type === 'classroom') { @@ -93,7 +96,7 @@ export class PxeBootFilesComponent implements OnInit { } return classrooms; } - + onChildChange(): void { const selectedChildId = this.taskForm.get('selectedChild')?.value; @@ -107,7 +110,7 @@ export class PxeBootFilesComponent implements OnInit { this.dataSource = []; } } - + applyToAll(): void { this.dataSource = this.dataSource.map(client => ({ @@ -152,15 +155,4 @@ export class PxeBootFilesComponent implements OnInit { this.itemsPerPage = event.pageSize; this.fetchPxeTemplates(); } - - syncOgCore(): void { - this.http.post(`${this.baseUrl}/sync`, {}).subscribe( - () => { - this.toastService.success('Sincronización completada'); - }, - error => { - this.toastService.error('Error al sincronizar'); - } - ); - } } diff --git a/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html b/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html index ced1090..8f189f9 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html @@ -10,6 +10,7 @@
{{ client.mac }}
+