From a8c1c124dcfc4baeb16ea5a0f8725a69c3f9ace2 Mon Sep 17 00:00:00 2001 From: Marie Salm Date: Wed, 28 Jul 2021 11:17:23 +0200 Subject: [PATCH] add environment variables of pattern atlas ui (#160) --- src/assets/env.js | 1 + src/assets/env.js.template | 2 ++ src/environments/environment.ts | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/assets/env.js b/src/assets/env.js index 6ca4ae31..759a207d 100644 --- a/src/assets/env.js +++ b/src/assets/env.js @@ -9,6 +9,7 @@ window['env']['NISQ_ANALYZER_HOST_NAME'] = 'localhost'; window['env']['PATTERN_ATLAS_HOST_NAME'] = 'localhost'; window['env']['LATEX_RENDERER_HOST_NAME'] = 'localhost'; + window['env']['PATTERN_ATLAS_UI_HOST_NAME'] = 'localhost'; window['env']['CONFIG_SERVER_PORT'] = 2379; window['env']['QC_ATLAS_PORT'] = 6626; window['env']['NISQ_ANALYZER_PORT'] = 5010; diff --git a/src/assets/env.js.template b/src/assets/env.js.template index 1492ebf9..6d10984d 100644 --- a/src/assets/env.js.template +++ b/src/assets/env.js.template @@ -8,10 +8,12 @@ window['env']['QC_ATLAS_HOST_NAME'] = "${QC_ATLAS_HOST_NAME}"; window['env']['NISQ_ANALYZER_HOST_NAME'] = "${NISQ_ANALYZER_HOST_NAME}"; window['env']['PATTERN_ATLAS_HOST_NAME'] = "${PATTERN_ATLAS_HOST_NAME}"; + window['env']['PATTERN_ATLAS_UI_HOST_NAME'] = "${PATTERN_ATLAS_UI_HOST_NAME}"; window['env']['LATEX_RENDERER_HOST_NAME'] ="${LATEX_RENDERER_HOST_NAME}"; window['env']['QC_ATLAS_PORT'] = "${QC_ATLAS_PORT}"; window['env']['NISQ_ANALYZER_PORT'] = "${NISQ_ANALYZER_PORT}"; window['env']['PATTERN_ATLAS_PORT'] = "${PATTERN_ATLAS_PORT}"; + window['env']['PATTERN_ATLAS_UI_PORT'] = "${PATTERN_ATLAS_UI_PORT}"; window['env']['LATEX_RENDERER_PORT'] ="${LATEX_RENDERER_PORT}"; })(this); diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 264d7b65..0d3e40dd 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -20,9 +20,9 @@ export const environment = { ? `http://${window['env']['PATTERN_ATLAS_HOST_NAME']}:${window['env']['PATTERN_ATLAS_PORT']}/patternatlas` : 'http://localhost:1977/patternatlas', PATTERN_ATLAS_UI_URL: - window['env']['PATTERN_ATLAS_HOST_NAME'] && - window['env']['PATTERN_ATLAS_PORT'] - ? `http://${window['env']['PATTERN_ATLAS_HOST_NAME']}:${window['env']['PATTERN_ATLAS_UI_PORT']}` + window['env']['PATTERN_ATLAS_UI_HOST_NAME'] && + window['env']['PATTERN_ATLAS_UI_PORT'] + ? `http://${window['env']['PATTERN_ATLAS_UI_HOST_NAME']}:${window['env']['PATTERN_ATLAS_UI_PORT']}` : 'http://localhost:1978', LATEX_RENDERER_API_URL: window['env']['LATEX_RENDERER_HOST_NAME'] &&