From 0a1f952e13004cdf0de64bf7971f54d7e7fba927 Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Thu, 27 Aug 2020 16:15:56 +0300 Subject: [PATCH] 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 --- .../+cluster-settings/cluster-settings.scss | 4 ++++ .../components/+cluster-settings/status.tsx | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/renderer/components/+cluster-settings/cluster-settings.scss b/src/renderer/components/+cluster-settings/cluster-settings.scss index 4070c2eb7b..d179889f12 100644 --- a/src/renderer/components/+cluster-settings/cluster-settings.scss +++ b/src/renderer/components/+cluster-settings/cluster-settings.scss @@ -66,6 +66,10 @@ word-break: break-word; color: var(--textColorSecondary); } + + .link { + @include pseudo-link; + } } } } diff --git a/src/renderer/components/+cluster-settings/status.tsx b/src/renderer/components/+cluster-settings/status.tsx index ff0436598c..d722fe8ea8 100644 --- a/src/renderer/components/+cluster-settings/status.tsx +++ b/src/renderer/components/+cluster-settings/status.tsx @@ -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 { + + @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 { ); })} + + Kubeconfig + {cluster.kubeConfigPath} + ); }