mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove auto-select clusters, clean up
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
4b5a4d8d1d
commit
55bb573421
2 files changed
+2
-9
No files matched your search
@@ -1,6 +1,5 @@
|
|||||||
import { app, remote } from "electron";
|
|
||||||
import { KubeConfig, V1Node, V1Pod } from "@kubernetes/client-node"
|
import { KubeConfig, V1Node, V1Pod } from "@kubernetes/client-node"
|
||||||
import fse, { ensureDirSync, writeFileSync } from "fs-extra";
|
import fse from "fs-extra";
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import os from "os"
|
import os from "os"
|
||||||
import yaml from "js-yaml"
|
import yaml from "js-yaml"
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export class AddCluster extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
refreshContexts(autoSelect = true) {
|
refreshContexts() {
|
||||||
this.selectedContexts.clear();
|
this.selectedContexts.clear();
|
||||||
this.kubeContexts.clear();
|
this.kubeContexts.clear();
|
||||||
|
|
||||||
@@ -91,12 +91,6 @@ export class AddCluster extends React.Component {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (autoSelect) {
|
|
||||||
const allContexts = Array.from(this.kubeContexts.keys());
|
|
||||||
if (allContexts.length <= 10) {
|
|
||||||
this.selectedContexts.replace(allContexts);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getContexts(config: KubeConfig): Map<string, KubeConfig> {
|
getContexts(config: KubeConfig): Map<string, KubeConfig> {
|
||||||
|
|||||||
Reference in new issue
Block a user