cluster-view fixes

Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Roman authored and Lauri Nevala committed 2020-08-18 11:53:25 +03:00
1 parent ceca2d705c
commit 8e6d886210
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)
}
})
})
}