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 committed 2020-08-27 10:34:30 +03:00
1 parent 659d8bd0ab
commit 5a55ab02da
1 file changed
+13
@@ -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 key="kubeconfig">
<TableCell>Kubeconfig</TableCell>
<TableCell className="value" onClick={this.openKubeconfig}><a>{cluster.kubeConfigPath}</a></TableCell>
</TableRow>
</Table>
);
}