This commit is contained in:
annampak 2018-01-12 18:57:57 +02:00
commit 694807623b
8 changed files with 72 additions and 32 deletions

16
.gitignore vendored
View File

@ -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

View File

@ -5,8 +5,7 @@
<groupId>dmp-backend</groupId>
<artifactId>dmp-backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
@ -41,12 +40,11 @@
<dependencies>
<!-- <dependency> -->
<!-- <groupId>dmp-backend</groupId> -->
<!-- <artifactId>dmp-backend-commons</artifactId> -->
<!-- <version>${dmp-backend-commons.version}</version> -->
<!-- </dependency> -->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
@ -205,6 +203,15 @@
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/ui-resources</directory>
<excludes>
<exclude>node_modules/**</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>

View File

@ -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";
}
}

View File

@ -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<Dataset> {
this.dataRepositories = new DomainModelConverter<eu.eudat.entities.DataRepository, DataRepository>().fromDataModel(entity.getDataRepositories().stream().collect(Collectors.toList()), DataRepository.class);
this.services = new DomainModelConverter<eu.eudat.entities.Service, Service>().fromDataModel(entity.getServices().stream().collect(Collectors.toList()), Service.class);
this.created = entity.getCreated();
this.dmp = new DomainModelConverter<eu.eudat.entities.DMP, DataManagementPlan>().fromDataModel(Arrays.asList(entity.getDmp()), DataManagementPlan.class).get(0);
}
@Override

View File

@ -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

View File

@ -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'

View File

@ -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,9 +29,9 @@ 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,
@ -64,20 +64,20 @@ 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
});
});
}
});
@ -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()

View File

@ -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];