mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: object-curly-spacing (error) (#4198)
This commit is contained in:
1 parent
0759b80435
commit
41863e87ce
89 files changed
+230
-216
No files matched your search
@@ -35,7 +35,7 @@ export class DetectorRegistry extends Singleton {
|
||||
}
|
||||
|
||||
async detectForCluster(cluster: Cluster): Promise<ClusterMetadata> {
|
||||
const results: {[key: string]: ClusterDetectionResult } = {};
|
||||
const results: { [key: string]: ClusterDetectionResult } = {};
|
||||
|
||||
for (const detectorClass of this.registry) {
|
||||
const detector = new detectorClass(cluster);
|
||||
|
||||
@@ -30,86 +30,86 @@ export class DistributionDetector extends BaseClusterDetector {
|
||||
this.version = await this.getKubernetesVersion();
|
||||
|
||||
if (this.isRke()) {
|
||||
return { value: "rke", accuracy: 80};
|
||||
return { value: "rke", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isRancherDesktop()) {
|
||||
return { value: "rancher-desktop", accuracy: 80};
|
||||
return { value: "rancher-desktop", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isK3s()) {
|
||||
return { value: "k3s", accuracy: 80};
|
||||
return { value: "k3s", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isGKE()) {
|
||||
return { value: "gke", accuracy: 80};
|
||||
return { value: "gke", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isEKS()) {
|
||||
return { value: "eks", accuracy: 80};
|
||||
return { value: "eks", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isIKS()) {
|
||||
return { value: "iks", accuracy: 80};
|
||||
return { value: "iks", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isAKS()) {
|
||||
return { value: "aks", accuracy: 80};
|
||||
return { value: "aks", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isDigitalOcean()) {
|
||||
return { value: "digitalocean", accuracy: 90};
|
||||
return { value: "digitalocean", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isK0s()) {
|
||||
return { value: "k0s", accuracy: 80};
|
||||
return { value: "k0s", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isVMWare()) {
|
||||
return { value: "vmware", accuracy: 90};
|
||||
return { value: "vmware", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isMirantis()) {
|
||||
return { value: "mirantis", accuracy: 90};
|
||||
return { value: "mirantis", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isAlibaba()) {
|
||||
return { value: "alibaba", accuracy: 90};
|
||||
return { value: "alibaba", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isHuawei()) {
|
||||
return { value: "huawei", accuracy: 90};
|
||||
return { value: "huawei", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isTke()) {
|
||||
return { value: "tencent", accuracy: 90};
|
||||
return { value: "tencent", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isMinikube()) {
|
||||
return { value: "minikube", accuracy: 80};
|
||||
return { value: "minikube", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isMicrok8s()) {
|
||||
return { value: "microk8s", accuracy: 80};
|
||||
return { value: "microk8s", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isKind()) {
|
||||
return { value: "kind", accuracy: 70};
|
||||
return { value: "kind", accuracy: 70 };
|
||||
}
|
||||
|
||||
if (this.isDockerDesktop()) {
|
||||
return { value: "docker-desktop", accuracy: 80};
|
||||
return { value: "docker-desktop", accuracy: 80 };
|
||||
}
|
||||
|
||||
if (this.isCustom() && await this.isOpenshift()) {
|
||||
return { value: "openshift", accuracy: 90};
|
||||
return { value: "openshift", accuracy: 90 };
|
||||
}
|
||||
|
||||
if (this.isCustom()) {
|
||||
return { value: "custom", accuracy: 10};
|
||||
return { value: "custom", accuracy: 10 };
|
||||
}
|
||||
|
||||
return { value: "unknown", accuracy: 10};
|
||||
return { value: "unknown", accuracy: 10 };
|
||||
}
|
||||
|
||||
public async getKubernetesVersion() {
|
||||
|
||||
@@ -29,7 +29,7 @@ export class NodesCountDetector extends BaseClusterDetector {
|
||||
if (!this.cluster.accessible) return null;
|
||||
const nodeCount = await this.getNodeCount();
|
||||
|
||||
return { value: nodeCount, accuracy: 100};
|
||||
return { value: nodeCount, accuracy: 100 };
|
||||
}
|
||||
|
||||
protected async getNodeCount(): Promise<number> {
|
||||
|
||||
@@ -29,7 +29,7 @@ export class VersionDetector extends BaseClusterDetector {
|
||||
public async detect() {
|
||||
const version = await this.getKubernetesVersion();
|
||||
|
||||
return { value: version, accuracy: 100};
|
||||
return { value: version, accuracy: 100 };
|
||||
}
|
||||
|
||||
public async getKubernetesVersion() {
|
||||
|
||||
Reference in new issue
Block a user