From 4e45f1b5524d9e46cc102cfb65f1c61022605a99 Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Wed, 29 Jan 2025 14:19:01 +0100 Subject: [PATCH] Add tooltip displaying client path in client list view --- .../src/app/components/groups/groups.component.html | 6 ++++-- .../src/app/components/groups/groups.component.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html index 96d5902..13b0b78 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.html +++ b/ogWebconsole/src/app/components/groups/groups.component.html @@ -247,7 +247,8 @@ {{ 'status' | translate }} - + Client Icon {{ 'name' | translate }} - +
{{ client.name }}
{{ client.ip }}
diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts index 543de21..a6e7486 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -625,6 +625,18 @@ export class GroupsComponent implements OnInit, OnDestroy { this.arrayClients = [...this.selection.selected]; } + getClientPath(client: Client): string { + const path: string[] = []; + let currentNode: TreeNode | null = this.findNodeByIdOrUuid(this.treeDataSource.data, client.organizationalUnit.uuid); + + while (currentNode) { + path.unshift(currentNode.name); + currentNode = currentNode.id ? this.findParentNode(this.treeDataSource.data, currentNode.id) : null; + } + + return path.join(' / '); + } + private extractUuid(idPath: string | undefined): string | null { return idPath ? idPath.split('/').pop() || null : null; }