X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b6f9b49e6fed67626ae969a6864f45f002fcfd47..f9dde5c781766b8be71d43d0f031c201a0edcfbb:/src/common/config.ts diff --git a/src/common/config.ts b/src/common/config.ts index db67ed8d..3961d5aa 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -35,7 +35,9 @@ export interface Config { packageVersion: string; parameters: {}; protocol: string; - remoteHosts: string; + remoteHosts: { + [key: string]: string + }; remoteHostsViaDNS: boolean; resources: {}; revision: string; @@ -102,7 +104,7 @@ export const mockConfig = (config: Partial): Config => ({ packageVersion: '', parameters: {}, protocol: '', - remoteHosts: '', + remoteHosts: {}, remoteHostsViaDNS: false, resources: {}, revision: '', @@ -133,4 +135,5 @@ const getDefaultConfig = (): ConfigJSON => ({ FILE_VIEWERS_CONFIG_URL: "", }); -const getDiscoveryURL = (apiHost: string) => `${window.location.protocol}//${apiHost}/discovery/v1/apis/arvados/v1/rest`; +export const DISCOVERY_URL = 'discovery/v1/apis/arvados/v1/rest'; +const getDiscoveryURL = (apiHost: string) => `${window.location.protocol}//${apiHost}/${DISCOVERY_URL}`;