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 (#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:
parent
4196576e99
commit
0a1f952e13
@ -66,6 +66,10 @@
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
color: var(--textColorSecondary);
|
color: var(--textColorSecondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
@include pseudo-link;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,12 +2,21 @@ import React from "react";
|
|||||||
import { Cluster } from "../../../main/cluster";
|
import { Cluster } from "../../../main/cluster";
|
||||||
import { SubTitle } from "../layout/sub-title";
|
import { SubTitle } from "../layout/sub-title";
|
||||||
import { Table, TableCell, TableRow } from "../table";
|
import { Table, TableCell, TableRow } from "../table";
|
||||||
|
import { autobind } from "../../utils";
|
||||||
|
import { shell } from "electron";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
cluster: Cluster;
|
cluster: Cluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Status extends React.Component<Props> {
|
export class Status extends React.Component<Props> {
|
||||||
|
|
||||||
|
@autobind()
|
||||||
|
openKubeconfig() {
|
||||||
|
const { cluster } = this.props;
|
||||||
|
shell.showItemInFolder(cluster.kubeConfigPath)
|
||||||
|
}
|
||||||
|
|
||||||
renderStatusRows() {
|
renderStatusRows() {
|
||||||
const { cluster } = this.props;
|
const { cluster } = this.props;
|
||||||
const rows = [
|
const rows = [
|
||||||
@ -27,6 +36,10 @@ export class Status extends React.Component<Props> {
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>Kubeconfig</TableCell>
|
||||||
|
<TableCell className="link value" onClick={this.openKubeconfig}>{cluster.kubeConfigPath}</TableCell>
|
||||||
|
</TableRow>
|
||||||
</Table>
|
</Table>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user