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

refactor k8sVersion & k8sDistro

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2022-06-20 07:25:05 +03:00
parent d20238645d
commit 8d03944c9e

View File

@ -134,11 +134,19 @@ export class KubernetesCluster<
}
get k8sVersion() {
return this.metadata.kubeVersion?.replace("unknown", "") || "";
if (this.metadata.kubeVersion === "unknown") {
return "";
}
return this.metadata.kubeVersion;
}
get k8sDistro() {
return this.metadata.distro?.replace("unknown", "") || "";
if (this.metadata.distro === "unknown") {
return "";
}
return this.metadata.distro;
}
}