mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
auto-refresh status only for active (selected) cluster
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
e7fc6b4a35
commit
aab91863fc
7 files changed
+37
-26
No files matched your search
@@ -12,7 +12,7 @@ export interface ClusterContextValue {
|
||||
|
||||
export function getClusterContext(): ClusterContextValue {
|
||||
return {
|
||||
clusterId: clusterStore.activeCluster,
|
||||
clusterId: clusterStore.activeClusterId,
|
||||
workspaceId: workspaceStore.currentWorkspace,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ interface Props {
|
||||
@observer
|
||||
export class ClustersMenu extends React.Component<Props> {
|
||||
selectCluster = (cluster: Cluster) => {
|
||||
clusterStore.activeCluster = cluster.id;
|
||||
clusterStore.activeClusterId = cluster.id;
|
||||
console.log('load lens for cluster:', cluster)
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export class ClustersMenu extends React.Component<Props> {
|
||||
return (
|
||||
<div className={cssNames("ClustersMenu flex gaps column", className)}>
|
||||
{clusters.map(cluster => {
|
||||
const isActive = cluster.id === clusterStore.activeCluster;
|
||||
const isActive = cluster.id === clusterStore.activeClusterId;
|
||||
return (
|
||||
<ClusterIcon
|
||||
key={cluster.id}
|
||||
|
||||
Reference in new issue
Block a user