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

Tweak notification text and improve verifier callback

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2021-02-25 16:14:18 +02:00
parent 4a9d4610d5
commit 5fba5091ca

View File

@ -10,7 +10,7 @@ export const invalidKubeconfigHandler = {
channel: InvalidKubeconfigChannel,
listener: InvalidKubeconfigListener,
verifier: (args: [unknown]): args is InvalidKubeConfigArgs => {
return args.length === 1;
return args.length === 1 && typeof args[0] === "string" && !!clusterStore.getById(args[0]);
},
};
@ -22,8 +22,8 @@ function InvalidKubeconfigListener(event: IpcRendererEvent, ...[clusterId]: Inva
(
<div className="flex column gaps">
<b>Cluster with invalid Kubeconfig Detected!</b>
<p>Cluster <b>{cluster.name}</b> has invalid <a href="#" onClick={(e) => { e.preventDefault(); shell.showItemInFolder(cluster.kubeConfigPath); }}>Kubeconfig</a> and cannot be displayed.
Please fix the Kubeconfig or remove the cluster. </p>
<p>Cluster <b>{cluster.name}</b> has invalid kubeconfig and cannot be displayed.
Please fix the <a href="#" onClick={(e) => { e.preventDefault(); shell.showItemInFolder(cluster.kubeConfigPath); }}>kubeconfig</a> manually or remove the cluster. </p>
<p>Do you want to remove the cluster now?</p>
<div className="flex gaps row align-left box grow">
<Button active outlined label="Remove" onClick={()=> {