diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html index 25e780d..5f493f9 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.html +++ b/ogWebconsole/src/app/components/groups/groups.component.html @@ -10,7 +10,7 @@
@@ -39,16 +39,16 @@ {{ 'searchTree' | translate }} {{ 'searchClient' | translate }} + placeholder="Nombre, IP, estado o MAC" /> @@ -79,19 +79,19 @@
+ *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding (click)="onNodeClick(node)"> {{ - node.type === 'organizational-unit' ? 'apartment' - : node.type === 'classrooms-group' ? 'meeting_room' - : node.type === 'classroom' ? 'school' - : node.type === 'clients-group' ? 'lan' - : node.type === 'client' ? 'computer' - : 'group' + node.type === 'organizational-unit' ? 'apartment' + : node.type === 'classrooms-group' ? 'meeting_room' + : node.type === 'classroom' ? 'school' + : node.type === 'clients-group' ? 'lan' + : node.type === 'client' ? 'computer' + : 'group' }} {{ node.name }} @@ -100,16 +100,16 @@ + *matTreeNodeDef="let node; when: isLeafNode" matTreeNodePadding (click)="onNodeClick(node)"> {{ - node.type === 'organizational-unit' ? 'apartment' - : node.type === 'classrooms-group' ? 'meeting_room' - : node.type === 'classroom' ? 'school' - : node.type === 'clients-group' ? 'lan' - : node.type === 'client' ? 'computer' - : 'group' + node.type === 'organizational-unit' ? 'apartment' + : node.type === 'classrooms-group' ? 'meeting_room' + : node.type === 'classroom' ? 'school' + : node.type === 'clients-group' ? 'lan' + : node.type === 'client' ? 'computer' + : 'group' }} {{ node.name }} @@ -171,7 +171,7 @@
+ [buttonText]="'Ejecutar comandos'"> @@ -181,23 +181,18 @@
- +
-
+
- + - Client Icon
@@ -205,29 +200,22 @@ {{ client.ip }} {{ client.mac }}
- - - - + + - + @@ -288,7 +276,7 @@ {{ 'name' | translate }} + matTooltipShowDelay="500">
{{ client.name }}
{{ client.ip }}
@@ -299,7 +287,7 @@ OG Live {{ (client.ogLive?.filename || '').slice(0, 15) }}{{ - (client.ogLive?.filename?.length > 15) ? '...' : '' }} + (client.ogLive?.filename?.length > 15) ? '...' : '' }} @@ -327,7 +315,7 @@ more_vert + [icon]="'terminal'">
- + \ 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 746192a..4456960 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -125,6 +125,8 @@ export class GroupsComponent implements OnInit, OnDestroy { client.mac?.toLowerCase().includes(lowerTerm) ); }; + + this.arrayClients = this.selectedClients.data; } @@ -308,6 +310,7 @@ export class GroupsComponent implements OnInit, OnDestroy { this.http.get(`${this.baseUrl}/clients?organizationalUnit.id=${node.id}`).subscribe({ next: (response) => { this.selectedClients.data = response['hydra:member']; + this.arrayClients = this.selectedClients.data; this.hasClients = node.hasClients ?? false; this.isLoadingClients = false; this.initialLoading = false; @@ -400,23 +403,19 @@ export class GroupsComponent implements OnInit, OnDestroy { onDeleteClick(event: MouseEvent, entity: TreeNode | Client | null): void { - console.log('Entity to delete:', entity); event.stopPropagation(); if (!entity) return; - + const uuid = entity['@id'] ? this.extractUuid(entity['@id']) : null; const type = entity.hasOwnProperty('mac') ? NodeType.Client : NodeType.OrganizationalUnit; - - console.log('UUID:', uuid); - console.log('Type:', type); - + if (!uuid) return; - + const dialogRef = this.dialog.open(DeleteModalComponent, { width: '400px', data: { name: entity.name }, }); - + dialogRef.afterClosed().subscribe((result) => { if (result === true) { this.deleteEntityorClient(uuid, type); @@ -596,6 +595,7 @@ export class GroupsComponent implements OnInit, OnDestroy { filterClients(searchTerm: string): void { this.searchTerm = searchTerm.trim().toLowerCase(); this.selectedClients.filter = this.searchTerm; + this.arrayClients = this.selectedClients.filteredData; }