Skip to content
Snippets Groups Projects
Commit 02f0965d authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

WS-157: display WS version on frontend

parent 8f536292
No related branches found
No related tags found
1 merge request!960WS-157: display WS version on frontend
Pipeline #5423 passed
......@@ -18,7 +18,7 @@
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@ngx-env/builder:browser",
"options": {
"outputPath": "dist/archive2",
"index": "src/index.html",
......@@ -53,7 +53,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
......@@ -77,7 +76,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
......@@ -101,7 +99,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
......@@ -119,7 +116,7 @@
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@ngx-env/builder:dev-server",
"options": {
"browserTarget": "archive2:build"
},
......@@ -133,13 +130,13 @@
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@ngx-env/builder:extract-i18n",
"options": {
"browserTarget": "archive2:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@ngx-env/builder:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
......
......@@ -38,6 +38,7 @@
"@angular/compiler-cli": "~12.2.11",
"@angular/language-service": "~12.2.11",
"@angular/localize": "^12.2.16",
"@ngx-env/builder": "^2.0.2",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^8.10.66",
......
......@@ -20,6 +20,7 @@
<a href="" class="btn btn-link">Diversity</a>
</p>
<p class="small text-muted ml-2">The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc.</p>
<p class="small text-muted ml-2"><span>Workspaces Version: {{this.version}}</span></p>
</div>
</div>
</footer>
......@@ -17,6 +17,7 @@
* along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
*/
import { Component, OnInit } from '@angular/core';
import { environment } from "src/environments/environment";
@Component({
selector: 'app-footer',
......@@ -25,6 +26,7 @@ import { Component, OnInit } from '@angular/core';
})
export class FooterComponent implements OnInit {
version = environment.ws_version;
constructor() { }
ngOnInit() {
......
/*
* Copyright (C) 2021 Associated Universities, Inc. Washington DC, USA.
*
* This file is part of NRAO Workspaces.
*
* Workspaces is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Workspaces is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
*/
declare var process: {
env: {
NG_APP_ENV: string;
// Replace the line below with your environment variable for better type checking
NG_APP_WS_VERSION: string;
};
};
......@@ -21,5 +21,6 @@ export const environment = {
// archive search services
apiUrl: 'https://webtest.aoc.nrao.edu/archive-service/',
// workspace services
workspacesUrl: 'https://ws-dev.nrao.edu/'
workspacesUrl: 'https://ws-dev.nrao.edu/',
ws_version: process.env.NG_APP_WS_VERSION,
};
......@@ -22,4 +22,5 @@ export const environment = {
apiUrl: "https://data.nrao.edu/archive-service/",
// workspace services
workspacesUrl: "http://ws.nrao.edu/",
ws_version: process.env.NG_APP_WS_VERSION,
};
......@@ -21,5 +21,6 @@ export const environment = {
// archive search services
apiUrl: 'https://webtest.aoc.nrao.edu/archive-service/',
// workspace services
workspacesUrl: 'http://shipman.aoc.nrao.edu:3457/'
workspacesUrl: 'http://shipman.aoc.nrao.edu:3457/',
ws_version: process.env.NG_APP_WS_VERSION,
};
......@@ -26,6 +26,7 @@ export const environment = {
apiUrl: 'https://webtest.aoc.nrao.edu/archive-service/',
// workspace services
workspacesUrl: 'http://localhost:3457/',
ws_version: process.env.NG_APP_WS_VERSION,
};
/*
......
......@@ -247,6 +247,8 @@ services:
build:
context: .
dockerfile: ./apps/web/Dockerfile.local
environment:
NG_APP_WS_VERSION: "local"
init: true
ports:
- "4200:4200"
......
......@@ -100,6 +100,7 @@ services:
environment:
DL_HOST: ${DL_HOST}
ENV_HOST: ${ENV_HOST}
NG_APP_WS_VERSION: ${TAG}
deploy:
placement:
constraints:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment