Skip to content

Commit

Permalink
ipp: make api urls configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
vs49688 committed Sep 8, 2021
1 parent 6521374 commit ef97032
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ angular.module('microvolution', [
}])
.constant('settings', {
'URLs': {
'base': '/client/',
'apiBase': '/client/api/',
'base': window.__env.base,
'apiBase': window.__env.apiBase,
'oauthStart': 'login',
'logout': 'end_session?service=wiener',
'sessionInfo': 'session_info?service=wiener',
'accessToken': 'access_token?service=wiener',
'resourceApiBase': 'https://backend.nimrod-portal.cloud.edu.au/wienerbackend/api/',
// 'resourceApiBase': 'http://localhost/wienerbackend/api/',
'resourceApiBase': window.__env.resourceApiBase,
'home': 'execute/home',
'stop': 'execute/stop',
'listJobs': 'execute/listall',
Expand Down
7 changes: 7 additions & 0 deletions env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(function (window) {
window.__env = window.__env || {};

window.__env.resourceApiBase = 'https://backend.nimrod-portal.cloud.edu.au/wienerbackend/api/';
window.__env.base = '/client/';
window.__env.apiBase = '/client/api/';
}(this))
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ <h2 class="section__title">Partners</h2>
<link rel="stylesheet" href="node_modules/ng-sortable/dist/ng-sortable.min.css">
<link rel="stylesheet" href="node_modules/ng-sortable/dist/ng-sortable.style.min.css">

<script src="env.js"></script>
<script src="app.js"></script>
<script src="services/services.module.js"></script>
<script src="services/services.service.js"></script>
Expand Down

0 comments on commit ef97032

Please sign in to comment.