From: Michal Klobukowski Date: Thu, 13 Dec 2018 13:57:27 +0000 (+0100) Subject: Pass FILE_VIEWERS_CONFIG_URL to configuration X-Git-Tag: 1.4.0~71^2~17^2~8 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/09f5c7f7b6473444a2d6dc964c2beba6128f319a Pass FILE_VIEWERS_CONFIG_URL to configuration Feature #13540 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- diff --git a/src/common/config.ts b/src/common/config.ts index 4d96bbbf..db67ed8d 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -60,10 +60,15 @@ export const fetchConfig = () => { .catch(() => Promise.resolve(getDefaultConfig())) .then(config => Axios .get(getDiscoveryURL(config.API_HOST)) - .then(response => ({ + .then(response => ({ // TODO: After tests delete `|| '/vocabulary-example.json'` - config: {...response.data, vocabularyUrl: config.VOCABULARY_URL || '/vocabulary-example.json' }, - apiHost: config.API_HOST, + // TODO: After tests delete `|| '/file-viewers-example.json'` + config: { + ...response.data, + vocabularyUrl: config.VOCABULARY_URL || '/vocabulary-example.json', + fileViewersConfigUrl: config.FILE_VIEWERS_CONFIG_URL || '/file-viewers-example.json' + }, + apiHost: config.API_HOST, }))); };