From d6f01be62e4fafe316fefb8b429abbe13a1e742d Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Mon, 1 Mar 2021 11:51:57 +0200 Subject: [PATCH] Improve notification text Signed-off-by: Lauri Nevala --- src/renderer/ipc/invalid-kubeconfig-handler.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/renderer/ipc/invalid-kubeconfig-handler.tsx b/src/renderer/ipc/invalid-kubeconfig-handler.tsx index df8c959f63..cadf7e4e3f 100644 --- a/src/renderer/ipc/invalid-kubeconfig-handler.tsx +++ b/src/renderer/ipc/invalid-kubeconfig-handler.tsx @@ -17,13 +17,15 @@ export const invalidKubeconfigHandler = { function InvalidKubeconfigListener(event: IpcRendererEvent, ...[clusterId]: InvalidKubeConfigArgs): void { const notificationId = `invalid-kubeconfig:${clusterId}`; const cluster = clusterStore.getById(clusterId); + const contextName = cluster.name !== cluster.contextName ? `(context: ${cluster.contextName})` : ""; Notifications.error( (
- Cluster with invalid Kubeconfig Detected! -

Cluster {cluster.name} has invalid kubeconfig and cannot be displayed. - Please fix the { e.preventDefault(); shell.showItemInFolder(cluster.kubeConfigPath); }}>kubeconfig manually or remove the cluster.

+ Cluster with Invalid Kubeconfig Detected! +

Cluster {cluster.name} has invalid kubeconfig {contextName} and cannot be displayed. + Please fix the { e.preventDefault(); shell.showItemInFolder(cluster.kubeConfigPath); }}>kubeconfig manually and restart Lens + or remove the cluster.

Do you want to remove the cluster now?