From fec738a21a4107bf60c3bcff7d274697833e01dd Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 1 Oct 2020 16:51:46 -0400 Subject: [PATCH] 16927: Remove clusterConfigJSON local variable Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- src/common/config.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/config.ts b/src/common/config.ts index 1504cdcc..afbeb5ae 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -157,7 +157,6 @@ export const fetchConfig = () => { return Axios.get(getClusterConfigURL(workbenchConfig.API_HOST)).then(async response => { const apiRevision = await getApiRevision(response.data.Services.Controller.ExternalURL.replace(/\/+$/, '')); const config = { ...buildConfig(response.data), apiRevision }; - const clusterConfigJSON = config.clusterConfig; const warnLocalConfig = (varName: string) => console.warn( `A value for ${varName} was found in ${WORKBENCH_CONFIG_URL}. To use the Arvados centralized configuration instead, \ remove the entire ${varName} entry from ${WORKBENCH_CONFIG_URL}`); @@ -171,7 +170,7 @@ remove the entire ${varName} entry from ${WORKBENCH_CONFIG_URL}`); fileViewerConfigUrl = workbenchConfig.FILE_VIEWERS_CONFIG_URL; } else { - fileViewerConfigUrl = clusterConfigJSON.Workbench.FileViewersConfigURL || "/file-viewers-example.json"; + fileViewerConfigUrl = config.clusterConfig.Workbench.FileViewersConfigURL || "/file-viewers-example.json"; } config.fileViewersConfigUrl = fileViewerConfigUrl; @@ -181,7 +180,7 @@ remove the entire ${varName} entry from ${WORKBENCH_CONFIG_URL}`); vocabularyUrl = workbenchConfig.VOCABULARY_URL; } else { - vocabularyUrl = clusterConfigJSON.Workbench.VocabularyURL || "/vocabulary-example.json"; + vocabularyUrl = config.clusterConfig.Workbench.VocabularyURL || "/vocabulary-example.json"; } config.vocabularyUrl = vocabularyUrl; -- 2.30.2