Commit 46a7e552 authored by Rajkumar-D's avatar Rajkumar-D
Browse files

Merge branch 'K8-master' of https://github.com/enasequence/webin-portal into K8-master

parents 47d8581b e73221f3
......@@ -22,7 +22,7 @@ docker-build-dev:
- triggers
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=dev .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=dev --build-arg basePath=/ena/dev/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
docker-build-test:
......@@ -34,7 +34,7 @@ docker-build-test:
- triggers
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=test .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=test --build-arg basePath=/ena/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
#docker-build-prod:
......@@ -59,7 +59,7 @@ docker-build-prod:
- triggers
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production --build-arg basePath=/ena/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
......
......@@ -5,10 +5,12 @@ COPY package.json package-lock.json ./
RUN npm install
COPY . .
ARG configuration
RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration $configuration
ARG basePath
RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration $configuration --base-href=$basePath
### STAGE 2: Run ###
FROM nginx:1.17.1-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html/ena/submit/webin
ARG basePath
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html${basePath}
\ No newline at end of file
......@@ -8,15 +8,15 @@ version 7.3.8
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/ena/submit/webin`. The app will automatically reload if you change any of the source files.
Run `ng serve --base-href=/ena/dev/submit/webin/` for a dev server. Navigate to `http://localhost:4200/ena/dev/submit/webin`. The app will automatically reload if you change any of the source files.
## Production server
Run `ng build --prod` and then `ng serve --prod` for a production server. Navigate to `http://localhost:4200/ena/submit/webin`.
Run `ng build --prod` and then `ng serve --prod --base-href=/ena/submit/webin/` for a production server. Navigate to `http://localhost:4200/ena/submit/webin`.
## Docker image build (for local run/ test only)
Run `docker build -t dockerhub.ebi.ac.uk/enasequence/webin-portal . `
Run `docker build -t dockerhub.ebi.ac.uk/enasequence/webin-portal --build-arg configuration=dev --build-arg basePath=/ena/dev/submit/webin/ . `
## Docker image push (for local run/ test only)
......
......@@ -11,8 +11,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/ena/submit/webin/",
"deployUrl": "/ena/submit/webin/",
"outputPath": "dist/webin-portal",
"index": "src/index.html",
"main": "src/main.ts",
......@@ -172,4 +170,4 @@
"prefix": "app"
}
}
}
}
\ No newline at end of file
......@@ -108,14 +108,6 @@ export class AccountInfoComponent {
this.deleteContactRow(contactObj);
}
if (result.event === "CloseSuccess") {
if (!this.editMode) {
this._router.navigateByUrl("");
} else {
this._router.navigateByUrl("/accountInfo");
}
}
if (typeof contactObj != "undefined") {
this.updateMainContact(contactObj);
this.dataSource = new MatTableDataSource<any>(this.contactArray);
......
......@@ -71,8 +71,6 @@
<div style="text-align:center" *ngIf="action==='Error'">
<button type="button" mat-raised-button style="margin-left: 5px;" (click)="closePopup()">Ok</button>
</div>
<div style="text-align:center" *ngIf="action==='Success'">
<button type="button" mat-raised-button style="margin-left: 5px;" (click)="closeSuccessPopup()">Ok</button>
</div>
</form>
\ No newline at end of file
......@@ -58,9 +58,7 @@ export class ContactDialogModalComponent implements OnInit {
this.dialogRef.close({ event: 'close' });
}
closeSuccessPopup() {
this.dialogRef.close({ event: 'CloseSuccess' });
}
updateName(contact) {
var name = contact["firstName"] + " " + (contact["middleInitials"] || "") + " " + contact["surname"];
......
......@@ -73,14 +73,6 @@ export class DacManagementComponent implements OnInit {
this.deleteContactRow(contactObj);
}
if (result.event === "CloseSuccess") {
if (!this.editMode) {
// this._router.navigateByUrl("");
} else {
// this._router.navigateByUrl("/accountInfo");
}
}
if (typeof contactObj != "undefined") {
this.dataSource = new MatTableDataSource<any>(this.contactArray);
}
......
......@@ -44,7 +44,7 @@ export class LoginComponent implements OnInit {
ngOnInit() {
// console.log('LoginComponent.ngOnInit');
if (this._webinAuthenticationService.authenticated) {
this._router.navigateByUrl('');
//this._router.navigateByUrl('');
}
this.getTweet();
......
......@@ -17,7 +17,7 @@
<ul id="local-nav" class="dropdown menu float-left" data-description="navigational">
<li><a href="https://www.ebi.ac.uk/ena/browser/support">Support <i class="icon icon-generic"
data-icon="x"></i></a></li> <!-- ** Application specific content ** -->
<li *ngIf="isAuthenticated()"><a href="logout">Logout
<li *ngIf="isAuthenticated()"><a [routerLink]="['/login']" (click)='logout()'>Logout
<span>({{getAccount()}})</span> <!-- ** Application specific content ** -->
</a></li>
</ul>
......
......@@ -60,6 +60,10 @@ export class SidenavComponent implements OnDestroy, AfterViewChecked {
}
}
logout() {
this._webinAuthenticationService.logout();
}
isEga(): boolean {
return this._webinAuthenticationService.ega;
}
......
......@@ -7,12 +7,12 @@ export const environment = {
production: false,
envName: 'dev',
title: 'Webin submissions portal (DEV)',
webinServiceUrl: 'http://ves-ebi-5b:8110/ena/submit/drop-box/submit/',
webinUpdateRequestUrl: 'http://ves-ebi-5b:8110/ena/submit/drop-box/email/update-request/',
webinServiceUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/drop-box/submit',
webinUpdateRequestUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/drop-box/email/update-request/',
webinAuthenticationServiceUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/webin/auth/login',
webinAuthenticationTokenUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/webin/auth/token',
webinReportServiceUrl: 'http://ves-ebi-5b:8221/ena/submit/report',
webinXmlReportServiceUrl: 'http://ves-ebi-5b:8110/ena/submit/drop-box',
webinXmlReportServiceUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/drop-box',
webinAdminServiceUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/webin/auth/admin',
webinGdprServiceUrl: 'TODO',
pupMedUrl: 'https://www.ebi.ac.uk/europepmc/webservices/rest/search',
......
......@@ -6,8 +6,7 @@
export const environment = {
production: false,
title: 'Webin submissions portal (DEV)',
//webinServiceUrl: 'http://ves-ebi-5b:8110/ena/submit/drop-box/submit/',
webinServiceUrl: 'http://w10-d-5n6p02.windows.ebi.ac.uk:8110/ena/submit/drop-box/submit/',
webinServiceUrl: 'http://ves-ebi-5b:8110/ena/submit/drop-box/submit/',
webinUpdateRequestUrl: 'http://ves-ebi-5b:8110/ena/submit/drop-box/email/update-request/',
webinAuthenticationServiceUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/webin/auth/login',
webinAuthenticationTokenUrl: 'https://wwwdev.ebi.ac.uk/ena/dev/submit/webin/auth/token',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment