1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-07-12 14:30:22 +03:00
parent aab91863fc
commit 002176ac25

View File

@ -17,19 +17,6 @@ enum ClusterStatus {
Offline = 0
}
export interface ClusterState extends ClusterModel {
url: string;
online?: boolean;
accessible?: boolean;
failureReason?: string;
nodes?: number;
eventCount?: number;
version?: string;
distribution?: string;
isAdmin?: boolean;
features?: FeatureStatusMap;
}
export class Cluster implements ClusterModel {
public id: ClusterId;
public kubeCtl: Kubectl
@ -274,24 +261,4 @@ export class Cluster implements ClusterModel {
recurseEverything: true
})
}
// todo: use for push-updates to lens view
getState(): ClusterState {
const storeModel = this.toJSON();
return toJS({
...storeModel,
url: this.url,
online: this.online,
accessible: this.accessible,
failureReason: this.failureReason,
nodes: this.nodes,
version: this.version,
distribution: this.distribution,
isAdmin: this.isAdmin,
features: this.features,
eventCount: this.eventCount,
}, {
recurseEverything: true
})
}
}