1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

cluster-state serialization fix

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-07-16 21:11:57 +03:00
parent 5b98674d80
commit 3f8fe0fe1b
2 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@ export function sendMessage({ channel, webContentId, filter, args = [] }: IpcMes
}
views.forEach(webContent => {
const type = webContent.getType();
logger.info(`[IPC]: sending message "${channel}" to webContentId(${type})=${webContent.id}`);
logger.info(`[IPC]: sending message "${channel}" to ${type}=${webContent.id}`);
webContent.send(channel, ...[args].flat());
})
}

View File

@ -312,7 +312,7 @@ export class Cluster implements ClusterModel {
// serializable full-featured state of the cluster
getState(): ClusterState {
return {
const state: ClusterState = {
...this.toJSON(),
apiUrl: this.apiUrl,
online: this.online,
@ -324,6 +324,9 @@ export class Cluster implements ClusterModel {
isAdmin: this.isAdmin,
features: this.features,
eventCount: this.eventCount,
}
};
return toJS(state, {
recurseEverything: true
})
}
}