refs #1457 Pass node ID to refreshData after client update
testing/ogGui-multibranch/pipeline/head This commit looks good Details

pull/16/head
Lucas Lara García 2025-02-06 11:31:43 +01:00
parent 7e174c9617
commit 3c1663aeb1
1 changed files with 5 additions and 2 deletions

View File

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