Merge branch 'master' into 15530-wb2-logincluster
[arvados-workbench2.git] / src / common / config.ts
index 1f668292c32c3a5abfbdefee99dd2b3a7ecee441..758a77ba91ed688c5c81ea2dd8d2be3dd6dff23e 100644 (file)
@@ -46,6 +46,9 @@ export interface ClusterConfigJSON {
         FileViewersConfigURL: string;
         WelcomePageHTML: string;
     };
+    Login: {
+        LoginCluster: string;
+    };
 }
 
 export class Config {
@@ -61,6 +64,7 @@ export class Config {
     workbench2Url: string;
     vocabularyUrl: string;
     fileViewersConfigUrl: string;
+    loginCluster: string;
     clusterConfig: ClusterConfigJSON;
 }
 
@@ -113,6 +117,7 @@ remove the entire ${varName} entry from ${WORKBENCH_CONFIG_URL}`);
                 config.workbench2Url = clusterConfigJSON.Services.Workbench2.ExternalURL;
                 config.workbenchUrl = clusterConfigJSON.Services.Workbench1.ExternalURL;
                 config.keepWebServiceUrl = clusterConfigJSON.Services.WebDAV.ExternalURL;
+                config.loginCluster = clusterConfigJSON.Login.LoginCluster;
                 config.clusterConfig = clusterConfigJSON;
                 mapRemoteHosts(clusterConfigJSON, config);
 
@@ -144,6 +149,9 @@ export const mockClusterConfigJSON = (config: Partial<ClusterConfigJSON>): Clust
         FileViewersConfigURL: "",
         WelcomePageHTML: "",
     },
+    Login: {
+        LoginCluster: "",
+    },
     ...config
 });
 
@@ -158,6 +166,7 @@ export const mockConfig = (config: Partial<Config>): Config => ({
     workbench2Url: "",
     vocabularyUrl: "",
     fileViewersConfigUrl: "",
+    loginCluster: "",
     clusterConfig: mockClusterConfigJSON({}),
     ...config
 });