mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix spelling
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
e71ee75581
commit
d5c78a4989
@ -32,6 +32,8 @@ import { KubernetesCluster, KubernetesClusterPrometheusMetrics, KubernetesCluste
|
|||||||
import { ipcMainOn } from "../common/ipc";
|
import { ipcMainOn } from "../common/ipc";
|
||||||
import { once } from "lodash";
|
import { once } from "lodash";
|
||||||
|
|
||||||
|
const logPrefix = "[CLUSTER-MANAGER]:";
|
||||||
|
|
||||||
export class ClusterManager extends Singleton {
|
export class ClusterManager extends Singleton {
|
||||||
private store = ClusterStore.getInstance();
|
private store = ClusterStore.getInstance();
|
||||||
deleting = observable.set<ClusterId>();
|
deleting = observable.set<ClusterId>();
|
||||||
@ -73,7 +75,7 @@ export class ClusterManager extends Singleton {
|
|||||||
if (removedClusters.length > 0) {
|
if (removedClusters.length > 0) {
|
||||||
const meta = removedClusters.map(cluster => cluster.getMeta());
|
const meta = removedClusters.map(cluster => cluster.getMeta());
|
||||||
|
|
||||||
logger.info(`[CLUSTER-MANAGER]: removing clusters`, meta);
|
logger.info(`${logPrefix} removing clusters`, meta);
|
||||||
removedClusters.forEach(cluster => cluster.disconnect());
|
removedClusters.forEach(cluster => cluster.disconnect());
|
||||||
this.store.removedClusters.clear();
|
this.store.removedClusters.clear();
|
||||||
}
|
}
|
||||||
@ -172,9 +174,9 @@ export class ClusterManager extends Singleton {
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === "ENOENT" && error.path === entity.spec.kubeconfigPath) {
|
if (error.code === "ENOENT" && error.path === entity.spec.kubeconfigPath) {
|
||||||
console.warn("[CLUSTER-MANGER]: kubeconfig file disappeared", { path: entity.spec.kubeconfigPath });
|
console.warn(`${logPrefix} kubeconfig file disappeared`, { path: entity.spec.kubeconfigPath });
|
||||||
} else {
|
} else {
|
||||||
console.error(`[CLUSTER-MANAGER]: failed to add cluster: ${error}`);
|
console.error(`${logPrefix} failed to add cluster: ${error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -187,7 +189,7 @@ export class ClusterManager extends Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected onNetworkOffline = () => {
|
protected onNetworkOffline = () => {
|
||||||
logger.info("[CLUSTER-MANAGER]: network is offline");
|
logger.info(`${logPrefix} network is offline`);
|
||||||
this.store.clustersList.forEach((cluster) => {
|
this.store.clustersList.forEach((cluster) => {
|
||||||
if (!cluster.disconnected) {
|
if (!cluster.disconnected) {
|
||||||
cluster.online = false;
|
cluster.online = false;
|
||||||
@ -198,7 +200,7 @@ export class ClusterManager extends Singleton {
|
|||||||
};
|
};
|
||||||
|
|
||||||
protected onNetworkOnline = () => {
|
protected onNetworkOnline = () => {
|
||||||
logger.info("[CLUSTER-MANAGER]: network is online");
|
logger.info(`${logPrefix} network is online`);
|
||||||
this.store.clustersList.forEach((cluster) => {
|
this.store.clustersList.forEach((cluster) => {
|
||||||
if (!cluster.disconnected) {
|
if (!cluster.disconnected) {
|
||||||
cluster.refreshConnectionStatus().catch((e) => e);
|
cluster.refreshConnectionStatus().catch((e) => e);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user