mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: infinite spinner with no-clusters view
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
be52b4ad93
commit
4087cf025e
5 files changed
+15
-6
No files matched your search
@@ -4,7 +4,7 @@ import filenamify from "filenamify";
|
||||
import { app, ipcRenderer } from "electron";
|
||||
import { copyFile, ensureDir, unlink } from "fs-extra";
|
||||
import { action, computed, observable, toJS } from "mobx";
|
||||
import { appProto } from "./vars";
|
||||
import { appProto, noClustersHost } from "./vars";
|
||||
import { BaseStore } from "./base-store";
|
||||
import { Cluster, ClusterState } from "../main/cluster";
|
||||
import migrations from "../migrations/cluster-store"
|
||||
@@ -200,6 +200,10 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
||||
|
||||
export const clusterStore = ClusterStore.getInstance<ClusterStore>();
|
||||
|
||||
export function isNoClustersView() {
|
||||
return location.hostname === noClustersHost
|
||||
}
|
||||
|
||||
export function getHostedClusterId() {
|
||||
return location.hostname.split(".")[0];
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ export const rendererDir = path.join(contextDir, "src/renderer");
|
||||
export const htmlTemplate = path.resolve(rendererDir, "template.html");
|
||||
export const sassCommonVars = path.resolve(rendererDir, "components/vars.scss");
|
||||
|
||||
// System pages
|
||||
export const noClustersHost = "no-clusters.localhost"
|
||||
|
||||
// Apis
|
||||
export const apiPrefix = "/api" // local router apis
|
||||
export const apiKubePrefix = "/api-kube" // k8s cluster apis
|
||||
|
||||
Reference in new issue
Block a user