Some improvements. Added new filters
testing/ogGui-multibranch/pipeline/head This commit looks good
Details
testing/ogGui-multibranch/pipeline/head This commit looks good
Details
parent
7698be2bca
commit
952938a253
|
@ -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 || '' },
|
||||
];
|
||||
}
|
||||
|
|
|
@ -286,8 +286,7 @@
|
|||
</ng-container>
|
||||
<ng-container matColumnDef="oglive">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> OG Live </th>
|
||||
<td mat-cell *matCellDef="let client"> {{ (client.ogLive?.filename || '').slice(0, 15) }}{{
|
||||
(client.ogLive?.filename?.length > 15) ? '...' : '' }} </td>
|
||||
<td mat-cell *matCellDef="let client"> {{ client.ogLive?.date | date }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="maintenace">
|
||||
|
@ -348,4 +347,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
|
|
|
@ -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 } });
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<mat-label i18n="@@oglive-label">OgLive</mat-label>
|
||||
<mat-select formControlName="ogLive">
|
||||
<mat-option *ngFor="let oglive of ogLives" [value]="oglive['@id']">
|
||||
{{ oglive.filename }}
|
||||
{{ oglive.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<mat-label>{{ 'ogLiveLabel' | translate }}</mat-label>
|
||||
<mat-select formControlName="ogLive">
|
||||
<mat-option *ngFor="let ogLive of ogLives" [value]="ogLive['@id']">
|
||||
{{ ogLive.filename }}
|
||||
{{ ogLive.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<mat-label>{{ 'ogLiveLabel' | translate }}</mat-label>
|
||||
<mat-select formControlName="oglive" (selectionChange)="onOgLiveChange($event)">
|
||||
<mat-option *ngFor="let oglive of ogLives" [value]="oglive['@id']">
|
||||
{{ oglive.filename }}
|
||||
{{ oglive.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</form>
|
||||
|
||||
<!-- Paso 2: Información del Aula -->
|
||||
<form *ngIf="generalFormGroup.value.type === 'classroom'" [formGroup]="classroomInfoFormGroup">
|
||||
<form [formGroup]="classroomInfoFormGroup">
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'locationLabel' | translate }}</mat-label>
|
||||
<input matInput formControlName="location">
|
||||
|
@ -63,12 +63,12 @@
|
|||
</form>
|
||||
|
||||
<!-- Paso 4: Configuración de Red -->
|
||||
<form *ngIf="generalFormGroup.value.type === 'classroom' || generalFormGroup.value.type === 'clients-group'" [formGroup]="networkSettingsFormGroup">
|
||||
<form [formGroup]="networkSettingsFormGroup">
|
||||
<mat-form-field class="form-field">
|
||||
<mat-label>{{ 'ogLiveLabel' | translate }}</mat-label>
|
||||
<mat-select formControlName="ogLive" (selectionChange)="onOgLiveChange($event)">
|
||||
<mat-option *ngFor="let oglive of ogLives" [value]="oglive['@id']">
|
||||
{{ oglive.filename }}
|
||||
{{ oglive.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -290,6 +290,4 @@ export class EditOrganizationalUnitComponent implements OnInit {
|
|||
onNoClick(): void {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2,33 +2,49 @@
|
|||
<div mat-dialog-content>
|
||||
<mat-tab-group dynamicHeight>
|
||||
<mat-tab label="{{ 'generalDataTab' | translate }}">
|
||||
<table mat-table [dataSource]="generalData" class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="generalData" class="mat-elevation-z8 custom-table">
|
||||
<ng-container matColumnDef="property">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'propertyHeader' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element"> {{ element.property }} </td>
|
||||
<td mat-cell *matCellDef="let element" class="property-column"> {{ element.property }} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="value">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'valueHeader' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element"> {{ element.value }} </td>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<ng-container *ngIf="isBoolean(element.value); else normalValue">
|
||||
<mat-icon [ngClass]="{'true-icon': element.value, 'false-icon': !element.value}">
|
||||
{{ element.value ? 'check_circle' : 'cancel' }}
|
||||
</mat-icon>
|
||||
</ng-container>
|
||||
<ng-template #normalValue>{{ element.value }}</ng-template>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</mat-tab>
|
||||
<mat-tab [disabled]="data.data.type !== 'classroom' && data.data.type !== 'clients-group'"
|
||||
label="{{ 'classroomNetworkPropertiesTab' | translate }}">
|
||||
<table mat-table [dataSource]="networkData" class="mat-elevation-z8">
|
||||
<mat-tab label="{{ 'classroomNetworkPropertiesTab' | translate }}">
|
||||
<table mat-table [dataSource]="networkData" class="mat-elevation-z8 custom-table">
|
||||
<ng-container matColumnDef="property">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'propertyHeader' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element"> {{ element.property }} </td>
|
||||
<td mat-cell *matCellDef="let element" class="property-column"> {{ element.property }} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="value">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'valueHeader' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element"> {{ element.value }} </td>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<ng-container *ngIf="isBoolean(element.value); else normalValue">
|
||||
<mat-icon [ngClass]="{'true-icon': element.value, 'false-icon': !element.value}">
|
||||
{{ element.value ? 'check_circle' : 'cancel' }}
|
||||
</mat-icon>
|
||||
</ng-container>
|
||||
<ng-template #normalValue>{{ element.value }}</ng-template>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
</div>
|
||||
<div mat-dialog-actions align="end">
|
||||
<button mat-button (click)="onNoClick()">{{ 'cancelButton' | translate }}</button>
|
||||
</div>
|
||||
|
|
|
@ -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<ShowOrganizationalUnitComponent>,
|
||||
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<any>(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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue