diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts index 431c5b6..2865375 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts @@ -140,11 +140,11 @@ export class ClientMainViewComponent implements OnInit { updateNetworkData() { this.networkData = [ + { property: 'Padre', value: this.clientData?.organizationalUnit?.name || '' }, { property: 'Pxe', value: this.clientData?.template?.name || '' }, { property: 'Remote Pc', value: this.clientData.remotePc || '' }, { property: 'Subred', value: this.clientData?.subnet || '' }, { property: 'OGlive', value: this.clientData?.ogLive?.name || '' }, - { property: 'Autoexec', value: '' }, { property: 'Repositorio', value: this.clientData?.repository?.name || '' }, ]; } diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html index 5f493f9..aff6c54 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.html +++ b/ogWebconsole/src/app/components/groups/groups.component.html @@ -286,8 +286,7 @@ OG Live - {{ (client.ogLive?.filename || '').slice(0, 15) }}{{ - (client.ogLive?.filename?.length > 15) ? '...' : '' }} + {{ client.ogLive?.date | date }} @@ -348,4 +347,4 @@ - \ No newline at end of file + diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts index 4456960..36db6f9 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -401,7 +401,6 @@ export class GroupsComponent implements OnInit, OnDestroy { }); } - onDeleteClick(event: MouseEvent, entity: TreeNode | Client | null): void { event.stopPropagation(); if (!entity) return; @@ -505,7 +504,7 @@ export class GroupsComponent implements OnInit, OnDestroy { onShowDetailsClick(event: MouseEvent, data: TreeNode | null): void { event.stopPropagation(); if (data && data.type !== NodeType.Client) { - this.dialog.open(ShowOrganizationalUnitComponent, { data: { data }, width: '700px' }); + this.dialog.open(ShowOrganizationalUnitComponent, { data: { data }, width: '800px' }); } else { if (data) { this.router.navigate(['clients', this.extractUuid(data['@id'])], { state: { clientData: data } }); diff --git a/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.html b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.html index 3ef6251..1b7ee4f 100644 --- a/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.html +++ b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.html @@ -25,7 +25,7 @@ OgLive - {{ oglive.filename }} + {{ oglive.name }} diff --git a/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.html b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.html index 7fb4fcc..fee5dfc 100644 --- a/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.html +++ b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.html @@ -25,7 +25,7 @@ {{ 'ogLiveLabel' | translate }} - {{ ogLive.filename }} + {{ ogLive.name }} diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.html index 675c34c..6aab1c6 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.html +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.html @@ -68,7 +68,7 @@ {{ 'ogLiveLabel' | translate }} - {{ oglive.filename }} + {{ oglive.name }} 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 c4bdb8a..fb3fb5f 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 @@ - + {{ 'locationLabel' | translate }} @@ -63,12 +63,12 @@ - + {{ 'ogLiveLabel' | translate }} - {{ oglive.filename }} + {{ oglive.name }} diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts index 251e2b1..6c53596 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts @@ -290,6 +290,4 @@ export class EditOrganizationalUnitComponent implements OnInit { onNoClick(): void { this.dialogRef.close(); } - - } diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.css index 21236d6..7a31a86 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.css +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.css @@ -14,13 +14,23 @@ table { box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2); } -.button-column { - display: flex; - flex-direction: column; - gap: 10px; - align-items: center; -} - button { width: 200px; } + +.custom-table { + width: 100%; +} + +.property-column { + font-weight: bold; + padding-right: 10px; +} + +.true-icon { + color: green; +} + +.false-icon { + color: red; +} diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.html index c54af3c..d642dbb 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.html +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.html @@ -2,33 +2,49 @@ - + {{ 'propertyHeader' | translate }} - {{ element.property }} + {{ element.property }} {{ 'valueHeader' | translate }} - {{ element.value }} + + + + {{ element.value ? 'check_circle' : 'cancel' }} + + + {{ element.value }} + - - + + {{ 'propertyHeader' | translate }} - {{ element.property }} + {{ element.property }} {{ 'valueHeader' | translate }} - {{ element.value }} + + + + {{ element.value ? 'check_circle' : 'cancel' }} + + + {{ element.value }} + - \ No newline at end of file + + + {{ 'cancelButton' | translate }} + diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts index 8eabdeb..da0bd19 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts @@ -1,19 +1,22 @@ import { HttpClient } from '@angular/common/http'; -import { Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA } from "@angular/material/dialog"; +import {Component, Inject, OnInit} from '@angular/core'; +import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; +import {CreateOrganizationalUnitComponent} from "../create-organizational-unit/create-organizational-unit.component"; +import {DatePipe} from "@angular/common"; @Component({ selector: 'app-show-organizational-unit', templateUrl: './show-organizational-unit.component.html', styleUrl: './show-organizational-unit.component.css' }) -export class ShowOrganizationalUnitComponent { +export class ShowOrganizationalUnitComponent implements OnInit { baseUrl: string = import.meta.env.NG_APP_BASE_API_URL; displayedColumns: string[] = ['property', 'value']; currentCalendar: any; ou: any; generalData: any[] = []; networkData: any[] = []; + datePipe: DatePipe = new DatePipe('es-ES'); typeTranslations: { [key: string]: string } = { 'organizational-unit': 'Centro', 'classrooms-group': 'Grupo de aulas', @@ -23,6 +26,7 @@ export class ShowOrganizationalUnitComponent { constructor( @Inject(MAT_DIALOG_DATA) public data: any, + private dialogRef: MatDialogRef, private http: HttpClient ) { } @@ -31,8 +35,11 @@ export class ShowOrganizationalUnitComponent { this.loadOrganizationalUnit(this.data.data['@id']); } + isBoolean(value: any): boolean { + return typeof value === 'boolean'; + } + loadOrganizationalUnit(uuid: string): void { - console.log(this.data['@id']) const apiUrl = `${this.baseUrl}${uuid}`; this.http.get(apiUrl).subscribe( response => { @@ -68,22 +75,36 @@ export class ShowOrganizationalUnitComponent { { property: 'Comentarios', value: this.ou.comments }, { property: 'Tipo', value: this.typeTranslations[this.ou.type] }, { property: 'Unidad organizativa superior', value: this.ou.parent ? this.ou.parent.name : '-' }, - { property: 'Creado el', value: this.ou.createdAt }, - ]; - - this.networkData = [ + { property: 'Creado el', value: this.datePipe.transform(this.ou.createdAt, 'dd/MM/yyyy hh:mm:ss') }, { property: 'Calendario asociado', value: this.ou.remoteCalendar ? this.currentCalendar : '-' }, { property: 'Aforo', value: this.ou.capacity }, { property: 'Localización', value: this.ou.location }, { property: 'Calendario', value: this.ou.calendar ? this.ou.calendar.name : '-' }, { property: 'Proyector', value: this.ou.projector }, { property: 'Pizarra', value: this.ou.board }, + ]; + + this.networkData = [ + { property: 'Proxy', value: this.ou.networkSettings.proxy }, + { property: 'DNS', value: this.ou.networkSettings.dns }, + { property: 'Router', value: this.ou.networkSettings.router }, + { property: 'NTP', value: this.ou.networkSettings.ntp }, + { property: 'Modo P2P', value: this.ou.networkSettings.p2pMode }, + { property: 'Tiempo P2P', value: this.ou.networkSettings.p2pTime }, + { property: 'Mcast IP', value: this.ou.networkSettings.mcastIp }, + { property: 'Mcast Speed', value: this.ou.networkSettings.mcastSpeed }, + { property: 'Mcast Port', value: this.ou.networkSettings.mcastPort }, + { property: 'Mcast Mode', value: this.ou.networkSettings.mcastMode }, + { property: 'Menú', value: this.ou.networkSettings.menu ? this.ou.networkSettings.menu.name : '-' }, { property: 'OgLive', value: this.ou.networkSettings.ogLive ? this.ou.networkSettings.ogLive.name : '-' }, { property: 'Repositorio', value: this.ou.networkSettings.repository ? this.ou.networkSettings.repository.name : '-' }, - { property: 'OgLog', value: this.ou.networkSettings.oglog }, { property: 'OgShare', value: this.ou.networkSettings.ogshare }, { property: 'Perfil de hardware', value: this.ou.networkSettings.hardwareProfile ? this.ou.networkSettings.hardwareProfile.name : '-' }, { property: 'Máscara de red', value: this.ou.networkSettings.netmask }, ] } + + onNoClick(): void { + this.dialogRef.close(); + } } diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts index aa3633c..9999831 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts @@ -40,9 +40,9 @@ export class PXEimagesComponent implements OnInit { cell: (user: any) => `${user.id}` }, { - columnDef: 'filename', + columnDef: 'name', header: 'Og Live', - cell: (user: any) => `${user.filename}` + cell: (user: any) => `${user.name}` }, { columnDef: 'isDefault',