Display path to cluster's kubeconfig file in cluster settings (#751)

* Display path to cluster's kubeconfig file in cluster settings

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-08-27 16:15:56 +03:00
1 parent 4196576e99
commit 0a1f952e13
2 files changed
+17

No files matched your search

@@ -66,6 +66,10 @@
word-break: break-word;
color: var(--textColorSecondary);
}
.link {
@include pseudo-link;
}
}
}
}
@@ -2,12 +2,21 @@ import React from "react";
import { Cluster } from "../../../main/cluster";
import { SubTitle } from "../layout/sub-title";
import { Table, TableCell, TableRow } from "../table";
import { autobind } from "../../utils";
import { shell } from "electron";
interface Props {
cluster: Cluster;
}
export class Status extends React.Component<Props> {
@autobind()
openKubeconfig() {
const { cluster } = this.props;
shell.showItemInFolder(cluster.kubeConfigPath)
}
renderStatusRows() {
const { cluster } = this.props;
const rows = [
@@ -27,6 +36,10 @@ export class Status extends React.Component<Props> {
</TableRow>
);
})}
<TableRow>
<TableCell>Kubeconfig</TableCell>
<TableCell className="link value" onClick={this.openKubeconfig}>{cluster.kubeConfigPath}</TableCell>
</TableRow>
</Table>
);
}