cluster-view fixes

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-08-10 15:37:06 +03:00
1 parent 31f4a75608
commit 402d07d8e5
9 files changed
+110 -113

No files matched your search

+6 -4
View File
@@ -62,11 +62,13 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
migrations: migrations,
});
if (ipcRenderer) {
ipcRenderer.on("cluster:state", (event, clusterState: ClusterState) => {
ipcRenderer.on("cluster:state", (event, state: ClusterState) => {
this.applyWithoutSync(() => {
logger.debug(`[CLUSTER-STORE]: received state update for cluster=${clusterState.id}`, clusterState);
const cluster = this.getById(clusterState.id);
if (cluster) cluster.updateModel(clusterState)
logger.debug(`[CLUSTER-STORE]: received push-state at ${location.host}`, state);
const cluster = this.getById(state.id);
if (cluster) {
cluster.updateModel(state)
}
})
})
}