Skip to content

Commit

Permalink
add environment variables of pattern atlas ui (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
salmma authored Jul 28, 2021
1 parent 3cd09b8 commit a8c1c12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/assets/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/assets/env.js.template
Original file line number Diff line number Diff line change
Expand Up @@ -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);

6 changes: 3 additions & 3 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'] &&
Expand Down

0 comments on commit a8c1c12

Please sign in to comment.