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:
parent
5b98674d80
commit
3f8fe0fe1b
@ -31,7 +31,7 @@ export function sendMessage({ channel, webContentId, filter, args = [] }: IpcMes
|
|||||||
}
|
}
|
||||||
views.forEach(webContent => {
|
views.forEach(webContent => {
|
||||||
const type = webContent.getType();
|
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());
|
webContent.send(channel, ...[args].flat());
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -312,7 +312,7 @@ export class Cluster implements ClusterModel {
|
|||||||
|
|
||||||
// serializable full-featured state of the cluster
|
// serializable full-featured state of the cluster
|
||||||
getState(): ClusterState {
|
getState(): ClusterState {
|
||||||
return {
|
const state: ClusterState = {
|
||||||
...this.toJSON(),
|
...this.toJSON(),
|
||||||
apiUrl: this.apiUrl,
|
apiUrl: this.apiUrl,
|
||||||
online: this.online,
|
online: this.online,
|
||||||
@ -324,6 +324,9 @@ export class Cluster implements ClusterModel {
|
|||||||
isAdmin: this.isAdmin,
|
isAdmin: this.isAdmin,
|
||||||
features: this.features,
|
features: this.features,
|
||||||
eventCount: this.eventCount,
|
eventCount: this.eventCount,
|
||||||
}
|
};
|
||||||
|
return toJS(state, {
|
||||||
|
recurseEverything: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user