1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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 2020-08-27 10:34:30 +03:00
parent 659d8bd0ab
commit 5a55ab02da

View File

@ -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>
);
}