diff --git a/.gitignore b/.gitignore
index dfdbf7632..6aab11c55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,19 @@
dmp-frontend/dist.7z
.idea/
*.iml
+dmp-backend/src/main/ui-resources/static/vendor.bundle.js.map
+dmp-backend/src/main/ui-resources/static/vendor.bundle.js
+dmp-backend/src/main/ui-resources/static/unauthorized.module.chunk.js.map
+dmp-backend/src/main/ui-resources/static/unauthorized.module.chunk.js
+dmp-backend/src/main/ui-resources/static/styles.bundle.js.map
+dmp-backend/src/main/ui-resources/static/styles.bundle.js
+dmp-backend/src/main/ui-resources/static/polyfills.bundle.js.map
+dmp-backend/src/main/ui-resources/static/polyfills.bundle.js
+dmp-backend/src/main/ui-resources/static/main.bundle.js.map
+dmp-backend/src/main/ui-resources/static/main.bundle.js
+dmp-backend/src/main/ui-resources/static/lang/en.json
+dmp-backend/src/main/ui-resources/static/inline.bundle.js.map
+dmp-backend/src/main/ui-resources/static/inline.bundle.js
+dmp-backend/src/main/ui-resources/static/index.html
+dmp-backend/src/main/ui-resources/static/favicon.ico
+dmp-backend/src/main/ui-resources/static/assets/lang/en.json
diff --git a/dmp-backend/pom.xml b/dmp-backend/pom.xml
index 9469010e8..27faf1f1c 100644
--- a/dmp-backend/pom.xml
+++ b/dmp-backend/pom.xml
@@ -5,8 +5,7 @@
dmp-backend
dmp-backend
0.0.1-SNAPSHOT
-
-
+ war
org.springframework.boot
spring-boot-starter-parent
@@ -41,12 +40,11 @@
-
-
-
-
-
-
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ provided
+
@@ -205,6 +203,15 @@
+
+
+ src/main/ui-resources
+
+ node_modules/**
+
+
+
+
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/AngularController.java b/dmp-backend/src/main/java/eu/eudat/controllers/AngularController.java
new file mode 100644
index 000000000..3966e04de
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/AngularController.java
@@ -0,0 +1,15 @@
+package eu.eudat.controllers;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * Created by ikalyvas on 1/12/2018.
+ */
+@Controller
+public class AngularController {
+ @RequestMapping({ "/login/twitter", "/login/linkedin"})
+ public String index() {
+ return "forward:/index.html";
+ }
+}
diff --git a/dmp-backend/src/main/java/eu/eudat/models/datasetwizard/DatasetWizardModel.java b/dmp-backend/src/main/java/eu/eudat/models/datasetwizard/DatasetWizardModel.java
index c3e8d9c4f..42faa675b 100644
--- a/dmp-backend/src/main/java/eu/eudat/models/datasetwizard/DatasetWizardModel.java
+++ b/dmp-backend/src/main/java/eu/eudat/models/datasetwizard/DatasetWizardModel.java
@@ -1,5 +1,6 @@
package eu.eudat.models.datasetwizard;
+import eu.eudat.entities.DMP;
import eu.eudat.entities.Dataset;
import eu.eudat.models.DataModel;
import eu.eudat.models.dataset.DataRepository;
@@ -10,10 +11,7 @@ import eu.eudat.models.dmp.DataManagementPlan;
import eu.eudat.models.user.composite.DatasetProfile;
import eu.eudat.utilities.builders.DomainModelConverter;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -161,6 +159,7 @@ public class DatasetWizardModel implements DataModel {
this.dataRepositories = new DomainModelConverter().fromDataModel(entity.getDataRepositories().stream().collect(Collectors.toList()), DataRepository.class);
this.services = new DomainModelConverter().fromDataModel(entity.getServices().stream().collect(Collectors.toList()), Service.class);
this.created = entity.getCreated();
+ this.dmp = new DomainModelConverter().fromDataModel(Arrays.asList(entity.getDmp()), DataManagementPlan.class).get(0);
}
@Override
diff --git a/dmp-backend/src/main/resources/application.properties b/dmp-backend/src/main/resources/application.properties
index 119d0bb97..ebca4274c 100644
--- a/dmp-backend/src/main/resources/application.properties
+++ b/dmp-backend/src/main/resources/application.properties
@@ -1,7 +1,8 @@
##########################Security##########################################
#eu.eudat.security.portmapping.http = 7081
#eu.eudat.security.portmapping.https = 7444
-##########################/Security########################################
+########################/Security########################################
+server.port = 8080
##########################Persistence##########################################
database.driver-class-name=org.postgresql.Driver
@@ -53,7 +54,7 @@ twitter.login.redirect_uri = http://localhost:4200/login/twitter
########################Persistence/Hibernate/Batch##############################
-########################Persistence/Hibernate/Connection pool####################
+########################Persistence/Hibernate/Connection pool####################
#persistence.hibernate.connectionpool.provider_class = org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider
#persistence.hibernate.connectionpool.c3p0.min_size = 5
#persistence.hibernate.connectionpool.c3p0.max_size = 100
diff --git a/dmp-frontend/src/app/app.constants.ts b/dmp-frontend/src/app/app.constants.ts
index d599ff1c5..0392c05a9 100644
--- a/dmp-frontend/src/app/app.constants.ts
+++ b/dmp-frontend/src/app/app.constants.ts
@@ -1,5 +1,5 @@
export const HostConfiguration = {
- Server: 'http://192.168.32.96:8080/',
+ Server: 'http://localhost:4200/',
App: 'http://localhost:4200/'
//CASHost: 'https://login-devel.uoa.gr/login',
//Service: 'http://elkefinman/login'
diff --git a/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.ts
index b09e2b5e5..f4df96e26 100644
--- a/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.ts
+++ b/dmp-frontend/src/app/dataset-wizard/dataset-wizard.component.ts
@@ -1,7 +1,7 @@
import { DatasetProfileDefinitionModel } from '../models/DatasetProfileDefinitionModel';
import { TranslateService } from '@ngx-translate/core';
import { BaseErrorModel } from '../models/error/BaseErrorModel';
-import { ActivatedRoute, Router, Params} from '@angular/router';
+import { ActivatedRoute, Router, Params } from '@angular/router';
import { DatasetService } from '../services/dataset/dataset.service';
import { DatasetWizardModel } from '../models/datasets/DatasetWizardModel';
import { DatasetProfileCriteria } from '../models/criteria/dataset-profile/DatasetProfileCriteria';
@@ -29,17 +29,17 @@ export class DatasetWizardComponent implements AfterViewInit {
dmpAutoCompleteConfiguration: AutoCompleteConfiguration;
datasetProfileAutoCompleteConfiguration: AutoCompleteConfiguration;
- datasetWizardModel:DatasetWizardModel;
+ datasetWizardModel: DatasetWizardModel;
isNew = true;
- formGroup:FormGroup;
+ formGroup: FormGroup;
constructor(
private datasetWizardService: DatasetWizardService,
private formBuilder: FormBuilder,
private datasetService: DatasetService,
private route: ActivatedRoute,
- public snackBar: MatSnackBar,
+ public snackBar: MatSnackBar,
public router: Router,
- public language: TranslateService,
+ public language: TranslateService,
) {
}
@@ -64,25 +64,25 @@ export class DatasetWizardComponent implements AfterViewInit {
this.datasetWizardModel = JsonSerializer.fromJSONObject(data, DatasetWizardModel);
this.formGroup = this.datasetWizardModel.buildForm();
this.datasetProfileAutoCompleteConfiguration = new AutoCompleteConfiguration(this.datasetWizardService.getAvailableProfiles.bind(this.datasetWizardService), datasetProfileRequestItem);
- this.formGroup.get("dmp").valueChanges.subscribe(change=>{
- this.datasetProfileAutoCompleteConfiguration.requestItem.criteria.id=change.id
- }
- );
+ this.formGroup.get("dmp").valueChanges.subscribe(change => {
+ this.formGroup.get('profile').setValue(null, { emitEvent: false });
+ this.datasetProfileAutoCompleteConfiguration.requestItem.criteria.id = change.id
+ });
});
} else {
this.datasetWizardModel = new DatasetWizardModel();
setTimeout(() => {
this.formGroup = this.datasetWizardModel.buildForm();
this.datasetProfileAutoCompleteConfiguration = new AutoCompleteConfiguration(this.datasetWizardService.getAvailableProfiles.bind(this.datasetWizardService), datasetProfileRequestItem);
- this.formGroup.get("dmp").valueChanges.subscribe(change=>{
- this.datasetProfileAutoCompleteConfiguration.requestItem.criteria.id=change.id
- }
- );
+ this.formGroup.get("dmp").valueChanges.subscribe(change => {
+ this.formGroup.get('profile').setValue(null, { emitEvent: false });
+ this.datasetProfileAutoCompleteConfiguration.requestItem.criteria.id = change.id
+ });
});
}
});
-
-
+
+
}
ngAfterViewInit() {
@@ -125,8 +125,8 @@ export class DatasetWizardComponent implements AfterViewInit {
this.datasetWizardService.createDataset(this.formGroup.value).subscribe(
complete => {
this.datasetWizardService.getSingle(complete.id).subscribe(
- result=>{
- this.datasetWizardModel = JsonSerializer.fromJSONObject(result,DatasetWizardModel);
+ result => {
+ this.datasetWizardModel = JsonSerializer.fromJSONObject(result, DatasetWizardModel);
}
)
this.onCallbackSuccess()
diff --git a/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts b/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts
index 77bd66a04..de25e16af 100644
--- a/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts
+++ b/dmp-frontend/src/app/shared/components/autocomplete/autocomplete.component.ts
@@ -126,6 +126,8 @@ export class AutocompleteComponent implements OnInit {
optionSelected(event: any) {
this.hasSelectedItem = true;
this.control.setValue(event.option.value, { emitEvent: false });
+ this.filteredItems = [event.option.value];
+
//this.selectedDropdownItemChange.emit(event.option.value);
//this.form.updateValueAndValidity();
//this.options = [event.option.value];