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) } ) );