diff --git a/dmp-backend/Docker/dmp-backend.env b/dmp-backend/Docker/dmp-backend.env
new file mode 100644
index 000000000..eada87b0c
--- /dev/null
+++ b/dmp-backend/Docker/dmp-backend.env
@@ -0,0 +1 @@
+PROFILE=staging
\ No newline at end of file
diff --git a/dmp-backend/Dockerfile b/dmp-backend/Dockerfile
index 8701a23a0..4b9954a9e 100644
--- a/dmp-backend/Dockerfile
+++ b/dmp-backend/Dockerfile
@@ -1,11 +1,23 @@
-FROM openjdk:8-jdk-alpine
-RUN apk add --update \
- curl \
- && rm -rf /var/cache/apk/*
-VOLUME /tmp
-ARG PROFILE=production
-ENV PROF $PROFILE
-ADD web/src/main/resources/ProjectConfiguration.xml /tmp/ProjectConfiguration.xml
-ADD web/src/main/resources/ExternalUrls.xml /tmp/ExternalUrls.xml
-ADD web/target/web-1.0-SNAPSHOT.jar app.jar
-ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom" ,"-Dspring.profiles.active=${PROF}","-jar","/app.jar"]
\ No newline at end of file
+FROM maven:3-jdk-8-alpine AS MAVEN_BUILD
+
+
+
+COPY pom.xml /build/
+COPY data /build/data/
+COPY elastic /build/elastic/
+COPY logging /build/logging/
+COPY queryable /build/queryable/
+COPY web /build/web/
+
+
+
+WORKDIR /build/
+RUN mvn package
+
+
+
+FROM openjdk:8-jre-alpine
+WORKDIR /app
+
+COPY --from=MAVEN_BUILD /build/web/target/web-1.0-SNAPSHOT.jar /app/app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom" ,"-Dspring.profiles.active=${PROFILE}","-jar","/app/app.jar"]
\ No newline at end of file
diff --git a/dmp-backend/web/src/main/resources/config/application-devel.properties b/dmp-backend/web/src/main/resources/config/application-devel.properties
index 7051f6667..c7cb9d05e 100644
--- a/dmp-backend/web/src/main/resources/config/application-devel.properties
+++ b/dmp-backend/web/src/main/resources/config/application-devel.properties
@@ -77,4 +77,7 @@ zenodo.login.redirect_uri=http://localhost:4200/login/external/zenodo
#############CONTACT EMAIL CONFIGURATIONS#########
contact_email.mail=
-language.path=tempLang/i18n/
\ No newline at end of file
+language.path=i18n/
+
+#############LOGGING#########
+logging.config=classpath:logging/logback-${spring.profiles.active}.xml
\ No newline at end of file
diff --git a/dmp-backend/web/src/main/resources/config/application.properties b/dmp-backend/web/src/main/resources/config/application.properties
index 610c84be8..229e7ed48 100644
--- a/dmp-backend/web/src/main/resources/config/application.properties
+++ b/dmp-backend/web/src/main/resources/config/application.properties
@@ -1,4 +1,4 @@
-server.port=8080
+server.port=8081
server.tomcat.max-threads = 20
server.tomcat.max-connections = 10000
logging.file=/logs/spring-boot-logging.log
@@ -79,7 +79,7 @@ database.lock-fail-interval=120000
##########################MISC##########################################
#############USER GUIDE#########
-userguide.path=guide/
+userguide.path=user-guide/
#############NOTIFICATION#########
notification.rateInterval=30000
@@ -90,7 +90,7 @@ notification.finalised.subject=[OpenDMP] The {name} has been finalised
notification.modifiedFinalised.subject=[OpenDMP] The {name} has been modified and finalised
#############LOGGING#########
-logging.config=classpath:logging/logback-${spring.profiles.active}.xml
+logging.config=file:/app/logging/logback-${spring.profiles.active}.xml
#############TEMP#########
temp.temp=tmp/
\ No newline at end of file
diff --git a/dmp-backend/web/src/main/resources/logging/logback-production.xml b/dmp-backend/web/src/main/resources/logging/logback-production.xml
index 9b27c97dc..f62bc4664 100644
--- a/dmp-backend/web/src/main/resources/logging/logback-production.xml
+++ b/dmp-backend/web/src/main/resources/logging/logback-production.xml
@@ -7,9 +7,9 @@
- /files/logs/openDMP.log
+ /app/logs/openDMP.log
- /files/logs/openDMP-%d{yyyy-MM-dd}.%i.log
+ /app/logs/openDMP-%d{yyyy-MM-dd}.%i.log
100MB
diff --git a/dmp-backend/web/src/main/resources/logging/logback-staging.xml b/dmp-backend/web/src/main/resources/logging/logback-staging.xml
index f1e40e210..143e8a18f 100644
--- a/dmp-backend/web/src/main/resources/logging/logback-staging.xml
+++ b/dmp-backend/web/src/main/resources/logging/logback-staging.xml
@@ -7,9 +7,9 @@
- /files/logs/openDMP.log
+ /app/logs/openDMP.log
- /files/logs/openDMP-%d{yyyy-MM-dd}.%i.log
+ /app/logs/openDMP-%d{yyyy-MM-dd}.%i.log
100MB
diff --git a/dmp-frontend/Dockerfile b/dmp-frontend/Dockerfile
index a1aaa80d3..5e6fe52b2 100644
--- a/dmp-frontend/Dockerfile
+++ b/dmp-frontend/Dockerfile
@@ -1,17 +1,32 @@
-FROM johnpapa/angular-cli as angular
-WORKDIR /app
-COPY package.json /app/
-RUN npm cache clear --force && npm install
-
-COPY ./ /app/
-ARG env=dev
-ARG aot=--no-aot
-RUN echo $env
-RUN echo $aot
-RUN if [ "$env" = "prod" ]; then ng build --$env --$aot; else ng build --$aot; fi
-
-# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
-FROM nginx:1.13
-COPY --from=angular /app/dist/ /usr/share/nginx/html
-COPY --from=angular /app/static/ /usr/share/nginx/static
-COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
+# stage1 as builder
+FROM node:12-alpine as builder
+
+WORKDIR /page
+
+# copy the package.json to install dependencies
+COPY package.json /page
+
+# Install the dependencies and make the folder
+RUN npm install
+
+COPY . /page
+
+# Build the project and copy the files
+RUN npm run ng build -- --deploy-url=/ --prod
+
+FROM nginx:alpine
+
+#!/bin/sh
+
+COPY nginx.conf /etc/nginx
+COPY mime.types /etc/nginx
+
+## Remove default nginx index page
+RUN rm -rf /usr/share/nginx/html/*
+
+# Copy from the stahg 1
+COPY --from=builder /page/dist /usr/share/nginx/html
+
+EXPOSE 4200
+
+ENTRYPOINT ["nginx", "-g", "daemon off;", "-p", "/usr/share/nginx"]
diff --git a/dmp-frontend/mime.types b/dmp-frontend/mime.types
new file mode 100644
index 000000000..62bd4b668
--- /dev/null
+++ b/dmp-frontend/mime.types
@@ -0,0 +1,48 @@
+types {
+ text/html html htm shtml;
+ text/css css;
+ text/xml xml rss;
+ image/gif gif;
+ image/jpeg jpeg jpg;
+ application/x-javascript js;
+ text/plain txt;
+ text/x-component htc;
+ text/mathml mml;
+ image/png png;
+ image/x-icon ico;
+ image/x-jng jng;
+ image/vnd.wap.wbmp wbmp;
+ application/java-archive jar war ear;
+ application/mac-binhex40 hqx;
+ application/pdf pdf;
+ application/x-cocoa cco;
+ application/x-java-archive-diff jardiff;
+ application/x-java-jnlp-file jnlp;
+ application/x-makeself run;
+ application/x-perl pl pm;
+ application/x-pilot prc pdb;
+ application/x-rar-compressed rar;
+ application/x-redhat-package-manager rpm;
+ application/x-sea sea;
+ application/x-shockwave-flash swf;
+ application/x-stuffit sit;
+ application/x-tcl tcl tk;
+ application/x-x509-ca-cert der pem crt;
+ application/x-xpinstall xpi;
+ application/zip zip;
+ application/octet-stream deb;
+ application/octet-stream bin exe dll;
+ application/octet-stream dmg;
+ application/octet-stream eot;
+ application/octet-stream iso img;
+ application/octet-stream msi msp msm;
+ audio/mpeg mp3;
+ audio/x-realaudio ra;
+ video/mpeg mpeg mpg;
+ video/quicktime mov;
+ video/x-flv flv;
+ video/x-msvideo avi;
+ video/x-ms-wmv wmv;
+ video/x-ms-asf asx asf;
+ video/x-mng mng;
+}
\ No newline at end of file
diff --git a/dmp-frontend/nginx.conf b/dmp-frontend/nginx.conf
new file mode 100644
index 000000000..7b29b4cb8
--- /dev/null
+++ b/dmp-frontend/nginx.conf
@@ -0,0 +1,35 @@
+
+events {
+ worker_connections 4096; ## Default: 1024
+}
+
+http {
+ include ./mime.types;
+ server {
+
+ listen 4200;
+
+ sendfile on;
+
+ gzip on;
+ gzip_http_version 1.1;
+ gzip_disable "MSIE [1-6]\.";
+ gzip_min_length 1100;
+ gzip_vary on;
+ gzip_proxied expired no-cache no-store private auth;
+ gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
+ gzip_comp_level 9;
+
+
+
+
+
+ location / {
+ root /usr/share/nginx/html;
+ try_files $uri $uri/ /index.html =404;
+ add_header Cache-Control "no-store, no-cache, must-revalidate";
+ }
+
+ }
+
+}
diff --git a/dmp-frontend/src/app/core/model/dmp/dmp.ts b/dmp-frontend/src/app/core/model/dmp/dmp.ts
index 721c42608..15f226b0a 100644
--- a/dmp-frontend/src/app/core/model/dmp/dmp.ts
+++ b/dmp-frontend/src/app/core/model/dmp/dmp.ts
@@ -1,4 +1,4 @@
-import { Status } from "../../common/enum/Status";
+import { Status } from "../../common/enum/status";
import { DmpProfile, DmpProfileDefinition } from "../dmp-profile/dmp-profile";
import { OrganizationModel } from "../organisation/organization";
import { GrantListingModel } from "../grant/grant-listing";
diff --git a/dmp-frontend/src/app/core/model/funder/funder.ts b/dmp-frontend/src/app/core/model/funder/funder.ts
index 8a0046dfb..a266d90ea 100644
--- a/dmp-frontend/src/app/core/model/funder/funder.ts
+++ b/dmp-frontend/src/app/core/model/funder/funder.ts
@@ -1,4 +1,4 @@
-import { Status } from "../../common/enum/Status";
+import { Status } from "../../common/enum/status";
export class FunderModel {
id: string;
diff --git a/dmp-frontend/src/app/core/model/grant/grant-listing.ts b/dmp-frontend/src/app/core/model/grant/grant-listing.ts
index 9573ae4b6..d6d2fba85 100644
--- a/dmp-frontend/src/app/core/model/grant/grant-listing.ts
+++ b/dmp-frontend/src/app/core/model/grant/grant-listing.ts
@@ -1,6 +1,6 @@
import { UrlListingItem } from "../../../library/url-listing/url-listing-item";
import { GrantType } from '../../common/enum/grant-type';
-import { Status } from '../../common/enum/Status';
+import { Status } from '../../common/enum/status';
export interface GrantListingModel {
id?: string;
diff --git a/dmp-frontend/src/app/core/model/organisation/organization.ts b/dmp-frontend/src/app/core/model/organisation/organization.ts
index 5fd54c7ab..9cdc13e05 100644
--- a/dmp-frontend/src/app/core/model/organisation/organization.ts
+++ b/dmp-frontend/src/app/core/model/organisation/organization.ts
@@ -1,4 +1,4 @@
-import { Status } from "../../common/enum/Status";
+import { Status } from "../../common/enum/status";
export interface OrganizationModel {
id: string;
diff --git a/dmp-frontend/src/app/core/model/project/project.ts b/dmp-frontend/src/app/core/model/project/project.ts
index 6f401f312..bd467a575 100644
--- a/dmp-frontend/src/app/core/model/project/project.ts
+++ b/dmp-frontend/src/app/core/model/project/project.ts
@@ -1,4 +1,4 @@
-import { Status } from "../../common/enum/Status";
+import { Status } from "../../common/enum/status";
import { UrlListingItem } from "../../../library/url-listing/url-listing-item";
import { ProjectType } from "../../common/enum/project-type";
diff --git a/dmp-frontend/src/app/core/services/auth/auth.service.ts b/dmp-frontend/src/app/core/services/auth/auth.service.ts
index a50261ba0..9b61514c4 100644
--- a/dmp-frontend/src/app/core/services/auth/auth.service.ts
+++ b/dmp-frontend/src/app/core/services/auth/auth.service.ts
@@ -5,7 +5,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { Credential } from '@app/core/model/auth/credential';
import { LoginInfo } from '@app/core/model/auth/login-info';
-import { Principal } from '@app/core/model/auth/Principal';
+import { Principal } from '@app/core/model/auth/principal';
import { ConfigurableProvider } from '@app/core/model/configurable-provider/configurableProvider';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { BaseService } from '@common/base/base.service';
diff --git a/dmp-frontend/src/app/core/services/lock/lock.service.ts b/dmp-frontend/src/app/core/services/lock/lock.service.ts
index a816163e5..3404f1cc0 100644
--- a/dmp-frontend/src/app/core/services/lock/lock.service.ts
+++ b/dmp-frontend/src/app/core/services/lock/lock.service.ts
@@ -17,18 +17,18 @@ export class LockService {
}
checkLockStatus(id: string): Observable {
- return this.http.get(`${this.actionUrl}target/status/${id}`, {headers: this.headers});
+ return this.http.get(`${this.actionUrl}target/status/${id}`, { headers: this.headers });
}
unlockTarget(id: string): Observable {
- return this.http.delete(`${this.actionUrl}target/unlock/${id}`, {headers: this.headers});
+ return this.http.delete(`${this.actionUrl}target/unlock/${id}`, { headers: this.headers });
}
getSingle(id: string): Observable {
- return this.http.get(`${this.actionUrl}target/${id}`, {headers: this.headers});
+ return this.http.get(`${this.actionUrl}target/${id}`, { headers: this.headers });
}
createOrUpdate(lock: LockModel): Observable {
- return this.http.post(`${this.actionUrl}`, lock, {headers: this.headers});
+ return this.http.post(`${this.actionUrl}`, lock, { headers: this.headers });
}
}
diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
index 6e9b89b8b..bff497006 100644
--- a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
+++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material';
import { Router } from '@angular/router';
import { RecentActivityType } from '@app/core/common/enum/recent-activity-type';
-import { Principal } from '@app/core/model/auth/Principal';
+import { Principal } from '@app/core/model/auth/principal';
import { DataTableRequest } from '@app/core/model/data-table/data-table-request';
import { DmpListingModel } from '@app/core/model/dmp/dmp-listing';
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria';
@@ -10,7 +10,7 @@ import { AuthService } from '@app/core/services/auth/auth.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
-import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
+import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { BaseComponent } from '@common/base/base.component';
import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver';
diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts
index 889b303b5..1a03c4a27 100644
--- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts
+++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts
@@ -34,7 +34,7 @@ import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver';
import { Observable, of as observableOf, interval } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
-import { Principal } from "@app/core/model/auth/Principal";
+import { Principal } from "@app/core/model/auth/principal";
import { Role } from "@app/core/common/enum/role";
import { LockService } from '@app/core/services/lock/lock.service';
import { Location } from '@angular/common';
@@ -109,7 +109,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
// displayFn: (item) => item['label'],
// titleFn: (item) => item['label']
// };
- switch(tabToNav) {
+ switch (tabToNav) {
case 'general':
this.selectedTab = 0;
break;
@@ -130,52 +130,52 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
.subscribe(async data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
- this.dmp = new DmpEditorModel();
- this.dmp.grant = new GrantTabModel();
- this.dmp.project = new ProjectFormModel();
- this.dmp.funder = new FunderFormModel();
- this.dmp.fromModel(data);
- this.formGroup = this.dmp.buildForm();
- this.setIsUserOwner();
- if (!this.isUserOwner) {
- this.isFinalized = true;
- this.formGroup.disable();
- }
+ this.dmp = new DmpEditorModel();
+ this.dmp.grant = new GrantTabModel();
+ this.dmp.project = new ProjectFormModel();
+ this.dmp.funder = new FunderFormModel();
+ this.dmp.fromModel(data);
+ this.formGroup = this.dmp.buildForm();
+ this.setIsUserOwner();
+ if (!this.isUserOwner) {
+ this.isFinalized = true;
+ this.formGroup.disable();
+ }
- //this.registerFormEventsForDmpProfile(this.dmp.definition);
- if (!this.editMode || this.dmp.status === DmpStatus.Finalized || lockStatus) {
- this.isFinalized = true;
- this.formGroup.disable();
- }
-
- if (this.isAuthenticated) {
- if (!lockStatus) {
- this.lock = new LockModel(data.id, this.getUserFromDMP());
-
- this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
- this.lock.id = Guid.parse(result);
- interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
- });
+ //this.registerFormEventsForDmpProfile(this.dmp.definition);
+ if (!this.editMode || this.dmp.status === DmpStatus.Finalized || lockStatus) {
+ this.isFinalized = true;
+ this.formGroup.disable();
}
- // if (!this.isAuthenticated) {
- const breadCrumbs = [];
- breadCrumbs.push({
- parentComponentName: null,
- label: this.language.instant('NAV-BAR.MY-DMPS'),
- url: "/plans"
- });
- breadCrumbs.push({
- parentComponentName: 'DmpListingComponent',
- label: this.dmp.label,
- url: '/plans/edit/' + this.dmp.id,
- // notFoundResolver: [await this.grantService.getSingle(this.dmp.grant.id).map(x => ({ label: x.label, url: '/grants/edit/' + x.id }) as BreadcrumbItem).toPromise()]
+
+ if (this.isAuthenticated) {
+ if (!lockStatus) {
+ this.lock = new LockModel(data.id, this.getUserFromDMP());
+
+ this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
+ this.lock.id = Guid.parse(result);
+ interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
+ });
+ }
+ // if (!this.isAuthenticated) {
+ const breadCrumbs = [];
+ breadCrumbs.push({
+ parentComponentName: null,
+ label: this.language.instant('NAV-BAR.MY-DMPS'),
+ url: "/plans"
+ });
+ breadCrumbs.push({
+ parentComponentName: 'DmpListingComponent',
+ label: this.dmp.label,
+ url: '/plans/edit/' + this.dmp.id,
+ // notFoundResolver: [await this.grantService.getSingle(this.dmp.grant.id).map(x => ({ label: x.label, url: '/grants/edit/' + x.id }) as BreadcrumbItem).toPromise()]
+ }
+ );
+ this.breadCrumbs = observableOf(breadCrumbs);
}
- );
- this.breadCrumbs = observableOf(breadCrumbs);
- }
- this.associatedUsers = data.associatedUsers;
- this.people = data.users;
- })
+ this.associatedUsers = data.associatedUsers;
+ this.people = data.users;
+ })
});
} else if (publicId != null) {
this.isNew = false;
@@ -567,7 +567,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
private pumpLock() {
this.lock.touchedAt = new Date();
- this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe( async result => this.lock.id = Guid.parse(result));
+ this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => this.lock.id = Guid.parse(result));
}
// advancedClicked() {
diff --git a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/funder-form-model.ts b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/funder-form-model.ts
index 76adf4e24..4ad0c6e7d 100644
--- a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/funder-form-model.ts
+++ b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/funder-form-model.ts
@@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { Status } from '@app/core/common/enum/Status';
+import { Status } from '@app/core/common/enum/status';
import { FunderModel } from '@app/core/model/funder/funder';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
diff --git a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab-model.ts b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab-model.ts
index afba9fce2..4c01cfbfc 100644
--- a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab-model.ts
+++ b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab-model.ts
@@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { Status } from '@app/core/common/enum/Status';
+import { Status } from '@app/core/common/enum/status';
import { GrantListingModel } from '@app/core/model/grant/grant-listing';
import { ValidJsonValidator } from '@app/library/auto-complete/auto-complete-custom-validator';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
diff --git a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts
index 797dfee69..826221b30 100644
--- a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts
+++ b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts
@@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { Status } from '@app/core/common/enum/Status';
+import { Status } from '@app/core/common/enum/status';
import { ProjectModel } from '@app/core/model/project/project';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
diff --git a/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts b/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts
index 1c303c446..e5f6b992c 100644
--- a/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts
+++ b/dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts
@@ -3,7 +3,7 @@ import { FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { TranslateService } from '@ngx-translate/core';
-import { Principal } from '../../../../core/model/auth/Principal';
+import { Principal } from '../../../../core/model/auth/principal';
import { UserInfoListingModel } from '../../../../core/model/user/user-info-listing';
import { AuthService } from '../../../../core/services/auth/auth.service';
import { DmpService } from '../../../../core/services/dmp/dmp.service';
diff --git a/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.ts b/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.ts
index 77f63bd4d..0f20ccc2d 100644
--- a/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.ts
+++ b/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.ts
@@ -5,7 +5,7 @@ import { DmpInvitationDialogComponent } from '../../invitation/dmp-invitation.co
import { Router, ActivatedRoute } from '@angular/router';
import { DatasetService } from '../../../../core/services/dataset/dataset.service';
import { AuthService } from '../../../../core/services/auth/auth.service';
-import { Principal } from '../../../../core/model/auth/Principal';
+import { Principal } from '../../../../core/model/auth/principal';
import { TranslateService } from '@ngx-translate/core';
import { DmpStatus } from '../../../../core/common/enum/dmp-status';
diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts
index ca3ded5cc..ea0064270 100644
--- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts
+++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts
@@ -4,7 +4,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { DatasetStatus } from '@app/core/common/enum/dataset-status';
import { DmpStatus } from '@app/core/common/enum/dmp-status';
-import { Principal } from '@app/core/model/auth/Principal';
+import { Principal } from '@app/core/model/auth/principal';
import { DatasetOverviewModel } from '@app/core/model/dataset/dataset-overview';
import { DatasetsToBeFinalized } from '@app/core/model/dataset/datasets-toBeFinalized';
import { DmpOverviewModel } from '@app/core/model/dmp/dmp-overview';
@@ -357,7 +357,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
maxWidth: '600px',
restoreFocus: false,
data: {
- message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ZENODO-DOI', { 'username': this.hasDOIToken ? this.authentication.current().zenodoEmail : 'default'}),
+ message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ZENODO-DOI', { 'username': this.hasDOIToken ? this.authentication.current().zenodoEmail : 'default' }),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
}
diff --git a/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard-editor.model.ts b/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard-editor.model.ts
index 4582e91e8..7edeacf8d 100644
--- a/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard-editor.model.ts
+++ b/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard-editor.model.ts
@@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
-import { Status } from '@app/core/common/enum/Status';
+import { Status } from '@app/core/common/enum/status';
import { DmpProfile, DmpProfileDefinition } from '@app/core/model/dmp-profile/dmp-profile';
import { DmpModel } from '@app/core/model/dmp/dmp';
import { DmpDynamicField } from '@app/core/model/dmp/dmp-dynamic-field';
diff --git a/dmp-frontend/src/app/ui/explore-dmp/listing-item/explore-dmp-listing-item.component.ts b/dmp-frontend/src/app/ui/explore-dmp/listing-item/explore-dmp-listing-item.component.ts
index 468b239d6..327bc33be 100644
--- a/dmp-frontend/src/app/ui/explore-dmp/listing-item/explore-dmp-listing-item.component.ts
+++ b/dmp-frontend/src/app/ui/explore-dmp/listing-item/explore-dmp-listing-item.component.ts
@@ -1,6 +1,6 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { DmpListingModel } from '../../../core/model/dmp/dmp-listing';
-import { Principal } from '../../../core/model/auth/Principal';
+import { Principal } from '../../../core/model/auth/principal';
import { AuthService } from '../../../core/services/auth/auth.service';
import { TranslateService } from '@ngx-translate/core';
import { Router, ActivatedRoute } from '@angular/router';
@@ -21,7 +21,7 @@ export class ExploreDmpListingItemComponent implements OnInit {
private translate: TranslateService,
private router: Router,
private route: ActivatedRoute
- ) { }
+ ) { }
ngOnInit() {
}
diff --git a/dmp-frontend/src/app/ui/grant/editor/grant-editor.model.ts b/dmp-frontend/src/app/ui/grant/editor/grant-editor.model.ts
index 8b783111c..28769e4a8 100644
--- a/dmp-frontend/src/app/ui/grant/editor/grant-editor.model.ts
+++ b/dmp-frontend/src/app/ui/grant/editor/grant-editor.model.ts
@@ -3,7 +3,7 @@ import { BackendErrorValidator } from '@common/forms/validation/custom-validator
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
import { ValidationContext } from '@common/forms/validation/validation-context';
import { GrantType } from '../../../core/common/enum/grant-type';
-import { Status } from '../../../core/common/enum/Status';
+import { Status } from '../../../core/common/enum/status';
import { ContentFile, GrantListingModel } from '../../../core/model/grant/grant-listing';
export class GrantEditorModel {
diff --git a/dmp-frontend/src/app/ui/misc/navigation/user-dialog/user-dialog.component.ts b/dmp-frontend/src/app/ui/misc/navigation/user-dialog/user-dialog.component.ts
index 326dd5280..21d7e79bc 100644
--- a/dmp-frontend/src/app/ui/misc/navigation/user-dialog/user-dialog.component.ts
+++ b/dmp-frontend/src/app/ui/misc/navigation/user-dialog/user-dialog.component.ts
@@ -2,7 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Router } from '@angular/router';
-import { Principal } from '../../../../core/model/auth/Principal';
+import { Principal } from '../../../../core/model/auth/principal';
import { AuthService } from '../../../../core/services/auth/auth.service';
@Component({
diff --git a/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard-model.ts b/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard-model.ts
index fa213f870..3ec776427 100644
--- a/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard-model.ts
+++ b/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard-model.ts
@@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { Status } from '@app/core/common/enum/Status';
+import { Status } from '@app/core/common/enum/status';
import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile';
import { DmpProfileDefinition } from '@app/core/model/dmp-profile/dmp-profile';
import { DmpModel } from '@app/core/model/dmp/dmp';
diff --git a/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard-model.ts b/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard-model.ts
index b8f30cc6e..90cbdd8ae 100644
--- a/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard-model.ts
+++ b/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard-model.ts
@@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
-import { Status } from '@app/core/common/enum/Status';
+import { Status } from '@app/core/common/enum/status';
import { GrantListingModel } from '@app/core/model/grant/grant-listing';
import { ValidJsonValidator } from '@app/library/auto-complete/auto-complete-custom-validator';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
diff --git a/dmp-frontend/src/app/ui/sidebar/sidebar.component.ts b/dmp-frontend/src/app/ui/sidebar/sidebar.component.ts
index 9321cb07c..39335f81d 100644
--- a/dmp-frontend/src/app/ui/sidebar/sidebar.component.ts
+++ b/dmp-frontend/src/app/ui/sidebar/sidebar.component.ts
@@ -3,7 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { AuthService } from '../../core/services/auth/auth.service';
import { UserDialogComponent } from '../misc/navigation/user-dialog/user-dialog.component';
-import { Principal } from '../../core/model/auth/Principal';
+import { Principal } from '../../core/model/auth/principal';
import { AppRole } from '../../core/common/enum/app-role';
import { Router } from '@angular/router';
import { Location } from '@angular/common';
@@ -51,8 +51,8 @@ export const ADMIN_ROUTES: RouteInfo[] = [
{ path: '/dmp-profiles', title: 'SIDE-BAR.DMP-TEMPLATES', icon: 'library_books' },
{ path: '/dataset-profiles', title: 'SIDE-BAR.DATASET-TEMPLATES', icon: 'library_books' },
{ path: '/users', title: 'SIDE-BAR.USERS', icon: 'people' },
- { path: '/language-editor', title: 'SIDE-BAR.LANGUAGE-EDITOR', icon: 'language'},
- { path: '/user-guide-editor', title: 'SIDE-BAR.GUIDE-EDITOR', icon: 'import_contacts'}
+ { path: '/language-editor', title: 'SIDE-BAR.LANGUAGE-EDITOR', icon: 'language' },
+ { path: '/user-guide-editor', title: 'SIDE-BAR.GUIDE-EDITOR', icon: 'import_contacts' }
];
// export const HISTORY_ROUTES: RouteInfo[] = [
// { path: '/typography', title: 'SIDE-BAR.HISTORY-VISITED', icon: 'visibility'},
diff --git a/dmp-frontend/src/assets/config/config.json b/dmp-frontend/src/assets/config/config.json
index 7674363b7..5f916f361 100644
--- a/dmp-frontend/src/assets/config/config.json
+++ b/dmp-frontend/src/assets/config/config.json
@@ -1,6 +1,6 @@
{
"production": false,
- "Server": "http://localhost:8080/api/",
+ "Server": "http://localhost:8081/api/",
"App": "http://localhost:4200/",
"HelpService": {
"Enabled": false,
diff --git a/docker-compose.yml b/docker-compose.yml
index 1b94552b3..ac90b8444 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,212 +1,41 @@
----
-version: '3'
-services:
- # The environment variable "TAG" is used throughout this file to
- # specify the version of the images to run. The default is set in the
- # '.env' file in this folder. It can be overridden with any normal
- # technique for setting environment variables, for example:
- #
- # TAG=6.0.0-beta1 docker-compose up
- #
- # REF: https://docs.docker.com/compose/compose-file/#variable-substitution
- #
- # Also be sure to set the ELASTIC_VERSION variable. For released versions,
- # ${TAG} and ${ELASTIC_VERSION} will be identical, but for pre-release
- # versions, ${TAG} might contain an extra build identifier, like
- # "6.0.0-beta1-3eab5b40", so a full invocation might look like:
- #
- # ELASTIC_VERSION=6.0.0-beta1 TAG=6.0.0-beta1-3eab5b40 docker-compose up
- #
-
-##########################DMP######################################################################
+version: '2.2'
+services:
dmp-backend:
- build:
- context: ./dmp-backend
- args:
- PROFILE: ${PROFILE}
- container_name: dmp-backend
- ports: ['0.0.0.0:8080:8080']
- links:
- # - logstash:logstash
- - elasticsearch-dmp:elasticsearch-dmp
- networks: ['stack','elasticsearch-dmp']
+ build:
+ context: ./dmp-backend
+ container_name: opendmp-backend
+ env_file: ./dmp-backend/Docker/dmp-backend.env
+ restart: unless-stopped
+ mem_limit: 2048m
+ ports:
+ - "8081:8081"
+ networks:
+ - opendmp-backend-network
+ volumes:
+ - ./openDMP/dmp-backend/config:/app/config
+ - ./openDMP/dmp-backend/user-guide:/app/user-guide
+ - ./openDMP/dmp-backend/i18n:/app/i18n
+ - ./openDMP/dmp-backend/externalUrls:/app/externalUrls
+ - ./openDMP/dmp-backend/templates:/app/templates
+ - ./openDMP/dmp-backend/opendmp-logs:/app/logs
+ - ./openDMP/dmp-backend/tmp:/app/tmp
+ - ./openDMP/dmp-backend/logging:/app/logging
dmp-frontend:
build:
- context: ./dmp-frontend
- args:
- env: ${ENV}
- aot: ${AOT}
- container_name: dmp-frontend
- volumes:
- - ./static:/usr/share/nginx/static
- - /srv/docker/wwwcert:/usr/share/nginx/wwwcert
- ports: ['0.0.0.0:80:80']
- networks: ['stack']
-
-##########################ELASTIC######################################################################
- elasticsearch-dmp:
- image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
- container_name: elasticsearch-dmp
- volumes:
- - ./elastic-config/elasticsearch-custom.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- environment: ['http.host=0.0.0.0','transport.host=0.0.0.0','discovery.type=single-node']
- ports: ['0.0.0.0:9201:9200','0.0.0.0:9301:9300']
- networks: ['elasticsearch-dmp']
- volumes:
- - esdata-dmp:/usr/share/elasticsearch/data
-
-##########################ELK-STACK######################################################################
-
- elasticsearch:
- image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
- container_name: elasticsearch
- environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1', 'ELASTIC_PASSWORD=${ELASTIC_PASSWORD}','discovery.type=single-node']
- ports: ['0.0.0.0:9200:9200']
- networks: ['stack']
- volumes:
- - esdata:/usr/share/elasticsearch/data
-
- kibana:
- image: docker.elastic.co/kibana/kibana:${TAG}
- container_name: kibana
- ports: ['0.0.0.0:5601:5601']
- networks: ['stack']
- depends_on: ['elasticsearch']
-
- logstash:
- image: docker.elastic.co/logstash/logstash:${TAG}
- container_name: logstash
+ context: ./dmp-frontend
+ container_name: opendmp-frontend
+ mem_limit: 2048m
+ restart: unless-stopped
+ ports:
+ - "8080:4200"
volumes:
- - ./ELK.Docker/config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
- ports: ['0.0.0.0:31311:31311']
-
- networks: ['stack']
- depends_on: ['elasticsearch', 'setup_logstash']
-
- #filebeat:
- # image: docker.elastic.co/beats/filebeat:${TAG}
- # container_name: filebeat
- # command: -e -E 'output.elasticsearch.password=${ELASTIC_PASSWORD}'
- # networks: ['stack']
- # depends_on: ['elasticsearch', 'setup_filebeat']
-
- #heartbeat:
- # image: docker.elastic.co/beats/heartbeat:${TAG}
- # container_name: heartbeat
- # command: -e -E 'output.elasticsearch.password=${ELASTIC_PASSWORD}'
- # networks: ['stack']
- # depends_on: ['elasticsearch', 'setup_heartbeat']
-
- # Run a short-lived container to set up Logstash.
- setup_logstash:
- image: centos:7
- container_name: setup_logstash
- volumes: ['./ELK.Docker/scripts/setup-logstash.sh:/usr/local/bin/setup-logstash.sh:ro']
- command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-logstash.sh | tr -d "\r" | bash']
- environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
- networks: ['stack']
- depends_on: ['elasticsearch']
-
- setup_kibana:
- image: centos:7
- container_name: setup_kibana
- volumes: ['./ELK.Docker/scripts/setup-kibana.sh:/usr/local/bin/setup-kibana.sh:ro']
- command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-kibana.sh | tr -d "\r" | bash']
- environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
- networks: ['stack']
- depends_on: ['elasticsearch']
-
- #setup_filebeat:
- # image: docker.elastic.co/beats/filebeat:${TAG}
- # container_name: setup_filebeat
- # volumes: ['./ELK.Docker/scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
- # command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s filebeat']
- # environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
- # networks: ['stack']
- # depends_on: ['kibana']
-
- #setup_heartbeat:
- # image: docker.elastic.co/beats/heartbeat:${TAG}
- # container_name: setup_heartbeat
- # volumes: ['./ELK.Docker/scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
- # command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s heartbeat']
- # environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
- # networks: ['stack']
- # depends_on: ['kibana']
-
-##########################DOCSBOX######################################################################
- # web:
- # restart: always
- # build: ./docsbox-master/docsbox
- # expose:
- # - "8000"
- # links:
- # - redis:redis
- # volumes:
- # - docsbox:/home/docsbox
- # - media:/home/docsbox/media
- # command: gunicorn -b :8000 docsbox:app
- # networks: ['stack']
-
- # rqworker:
- # restart: always
- # build: ./docsbox-master/docsbox
- # links:
- # - redis:redis
- # volumes:
- # - web
- # command: rq worker -c docsbox.settings
- # networks: ['stack']
-
- # rqscheduler:
- # restart: always
- # build: ./docsbox-master/docsbox
- # links:
- # - redis:redis
- # volumes:
- # - web
- # command: rqscheduler -H redis -p 6379 -d 0
- # networks: ['stack']
-
- # nginx:
- # restart: always
- # build: ./docsbox-master/nginx/
- # ports:
- # - "81:80"
- # volumes:
- # - web
- # links:
- # - web:web
- # networks: ['stack']
-
- # redis:
- # restart: always
- # image: redis:latest
- # expose:
- # - "6379"
- # volumes:
- # - redisdata:/data
- # networks: ['stack']
-
-
-##########################SETTINGS######################################################################
-
-volumes:
- esdata:
- driver: local
- esdata-dmp:
- driver: local
- #redisdata:
- # driver: local
- # docsbox:
- # driver: local
- # media:
- # driver: local
-networks:
- stack: {}
- elasticsearch-dmp: {}
-
-
-
+ - ./openDMP/dmp-frontend/static-files:/usr/share/nginx/static
+ - ./openDMP/dmp-frontend/webapp/config:/usr/share/nginx/html/assets/config
+ networks:
+ - opendmp-frontend-network
+
+networks:
+ opendmp-frontend-network:
+ opendmp-backend-network:
\ No newline at end of file
diff --git a/openDMP/dmp-backend/opendmp-logs/.gitkeep b/openDMP/dmp-backend/opendmp-logs/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/openDMP/dmp-backend/tmp/.gitkeep b/openDMP/dmp-backend/tmp/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/openDMP/dmp-frontend/static-files/.gitkeep b/openDMP/dmp-frontend/static-files/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/openDMP/dmp-frontend/webapp/.gitkeep b/openDMP/dmp-frontend/webapp/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/guide/UserGuideDRAFT.html b/user-guide/UserGuideDRAFT.html
similarity index 100%
rename from guide/UserGuideDRAFT.html
rename to user-guide/UserGuideDRAFT.html