Allow user to select Kubeconfig from filesystem (#740)

* Allow user to select Kubeconfig from filesystem, fix #738

Signed-off-by: Roman <ixrock@gmail.com>

Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
authored and GitHub committed 2020-08-28 08:43:51 +03:00
1 parent 0a1f952e13
commit b8994a453f
24 files changed
+1113 -263

No files matched your search

@@ -76,8 +76,10 @@ export class ClustersMenu extends React.Component<Props> {
label: _i18n._(t`Remove`),
},
ok: () => {
if (clusterStore.activeClusterId === cluster.id) {
navigate(landingURL());
}
clusterStore.removeById(cluster.id);
navigate(landingURL());
},
message: <p>Are you sure want to remove cluster <b title={cluster.id}>{cluster.contextName}</b>?</p>,
})
@@ -94,7 +96,7 @@ export class ClustersMenu extends React.Component<Props> {
const clusters = clusterStore.getByWorkspaceId(workspaceStore.currentWorkspaceId);
const noClustersInScope = clusters.length === 0;
const isLanding = navigation.getPath() === landingURL();
const showStartupHint = this.showHint && isLanding && noClustersInScope;
const showStartupHint = this.showHint && isLanding && noClustersInScope; // fixme: broken, move to landing.tsx
return (
<div
className={cssNames("ClustersMenu flex column", className)}