mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix: cluster commands disappeared from Command Palette (#2886)
* Cluster commands disappeared from Command Palette, close #2760 Signed-off-by: Roman <ixrock@gmail.com> * refactoring: get rid of ClusterStore.active && ClusterStore.activeCluster (managed via catalog's entity) Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
d0dbb8744c
commit
643b0d861f
23 files changed
+99
-155
No files matched your search
@@ -50,6 +50,19 @@ export enum ClusterMetadataKey {
|
||||
PROMETHEUS = "prometheus"
|
||||
}
|
||||
|
||||
export enum ClusterMetricsResourceType {
|
||||
Cluster = "Cluster",
|
||||
Node = "Node",
|
||||
Pod = "Pod",
|
||||
Deployment = "Deployment",
|
||||
StatefulSet = "StatefulSet",
|
||||
Container = "Container",
|
||||
Ingress = "Ingress",
|
||||
VolumeClaim = "VolumeClaim",
|
||||
ReplicaSet = "ReplicaSet",
|
||||
DaemonSet = "DaemonSet",
|
||||
}
|
||||
|
||||
export type ClusterRefreshOptions = {
|
||||
refreshMetadata?: boolean
|
||||
};
|
||||
@@ -709,4 +722,8 @@ export class Cluster implements ClusterModel, ClusterState {
|
||||
|
||||
return true; // allowed by default for other resources
|
||||
}
|
||||
|
||||
isMetricHidden(resource: ClusterMetricsResourceType): boolean {
|
||||
return Boolean(this.preferences.hiddenMetrics?.includes(resource));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user