From 3c1663aeb142ab96069fd4b21a5ae472ac68e020 Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Thu, 6 Feb 2025 11:31:43 +0100 Subject: [PATCH] refs #1457 Pass node ID to refreshData after client update --- ogWebconsole/src/app/components/groups/groups.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts index 8f24ef7..5476c85 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -603,19 +603,22 @@ export class GroupsComponent implements OnInit, OnDestroy { this.syncingClientId = client.uuid; this.syncStatus = true; + const parentNodeId = client.organizationalUnit?.id || node.id; + console.log('Parent node id:', parentNodeId); + this.subscriptions.add( this.http.post(`${this.baseUrl}${client['@id']}/agent/status`, {}).subscribe( () => { this.toastr.success('Cliente actualizado correctamente'); this.syncStatus = false; this.syncingClientId = null; - this.refreshData() + this.refreshData(parentNodeId) }, () => { this.toastr.error('Error de conexión con el cliente'); this.syncStatus = false; this.syncingClientId = null; - this.refreshData() + this.refreshData(parentNodeId) } ) );