Skip to content

Commit

Permalink
on manual refresh
Browse files Browse the repository at this point in the history
Request: CT_BDEPLOY-27
Change-Id: I6cee8591efed86824f7bde33b7615efa5a2d63a7
  • Loading branch information
Dastan Yessekeyev authored and Dastan Yessekeyev committed Jun 19, 2024
1 parent 7e32f7a commit 36609af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[narrowWhen$]="narrowWhen$"
[lastRefreshAt$]="processes.processStatesLoadTime$"
[refreshingWhen$]="processes.loading$"
(manualRefresh)="processes.reload()"
(manualRefresh)="onManualRefresh()"
></app-node-state-panel>
<ng-container *ngIf="!(collapsed$ | async)">
<mat-divider></mat-divider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export class ServerNodeComponent implements OnInit, OnDestroy {
items.push(this.portsItem);
}

this.nodeStateItems$.next(items);

const syncCollapse = [
NodeSynchronizationStatus.NOT_SYNCHRONIZED,
NodeSynchronizationStatus.SYNCHRONIZING,
NodeSynchronizationStatus.SYNCHRONIZATION_FAILED,
].some((s) => s === syncStatus);
this.synchronizationCollapse$.next(syncCollapse);

this.nodeStateItems$.next(items);
});

this.subscription.add(
Expand Down Expand Up @@ -152,6 +152,11 @@ export class ServerNodeComponent implements OnInit, OnDestroy {
};
}

protected onManualRefresh() {
this.processes.reload();
this.instances.reloadActiveStates(this.instances.active$.value);
}

private updateAllProcesses(states: { [key: string]: ProcessStatusDto }) {
if (!states || Object.keys(states).length === 0) {
this.processesState.next('unknown');
Expand Down

0 comments on commit 36609af

Please sign in to comment.