Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot into Development
This commit is contained in:
commit
869d69bc0d
|
@ -47,13 +47,13 @@ public class DatasetProfile implements Serializable {
|
||||||
private Set<Dataset> dataset;
|
private Set<Dataset> dataset;
|
||||||
|
|
||||||
|
|
||||||
@OneToOne(fetch = FetchType.EAGER)
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
||||||
@JoinColumn(name = "\"Ruleset\"", nullable = true)
|
@JoinColumn(name = "\"Ruleset\"", nullable = true)
|
||||||
private DatasetProfileRuleset ruleset;
|
private DatasetProfileRuleset ruleset;
|
||||||
|
|
||||||
|
|
||||||
@OneToOne(fetch = FetchType.EAGER)
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
||||||
@JoinColumn(name = "\"Viewstyle\"", nullable = true)
|
@JoinColumn(name = "\"Viewstyle\"", nullable = true)
|
||||||
private DatasetProfileViewstyle viewstyle;
|
private DatasetProfileViewstyle viewstyle;
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class Dataset implements DataModel<entities.Dataset>{
|
||||||
this.label = entity.getLabel();
|
this.label = entity.getLabel();
|
||||||
this.properties = entity.getProperties();
|
this.properties = entity.getProperties();
|
||||||
this.reference = entity.getReference();
|
this.reference = entity.getReference();
|
||||||
this.dmp = entity.getDmp();
|
//this.dmp = entity.getDmp();
|
||||||
this.description = entity.getDescription();
|
this.description = entity.getDescription();
|
||||||
this.profile = entity.getProfile();
|
this.profile = entity.getProfile();
|
||||||
this.registries = new DomainModelConverter<entities.Registry,Registry>().fromDataModel(entity.getRegistries().stream().collect(Collectors.toList()), Registry.class);
|
this.registries = new DomainModelConverter<entities.Registry,Registry>().fromDataModel(entity.getRegistries().stream().collect(Collectors.toList()), Registry.class);
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class DMPs {
|
||||||
DMP d = dMPDao.read(dmp.getId());
|
DMP d = dMPDao.read(dmp.getId());
|
||||||
d.setStatus(new Short("-1"));
|
d.setStatus(new Short("-1"));
|
||||||
dMPDao.update(d);
|
dMPDao.update(d);
|
||||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("{\"msg\":\"Could not soft delete DMP!\"");
|
return ResponseEntity.status(HttpStatus.OK).body("{\"msg\":\"deleted DMP!\"");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("{\"msg\":\"Could not soft delete DMP!\"");
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("{\"msg\":\"Could not soft delete DMP!\"");
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class DatasetProfiles {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<DatasetProfile> allDatasetProfiles = datasetProfileDao.getAll();
|
List<DatasetProfile> allDatasetProfiles = datasetProfileDao.getAll();
|
||||||
|
|
||||||
return new ResponseEntity<Object>(SerializerProvider.toJson(allDatasetProfiles), HttpStatus.OK);
|
return new ResponseEntity<Object>(SerializerProvider.toJson(allDatasetProfiles), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
catch(Exception ex) {
|
catch(Exception ex) {
|
||||||
|
|
|
@ -134,9 +134,9 @@ export class DatasetsComponent implements OnInit {
|
||||||
properties: '',
|
properties: '',
|
||||||
profile: { "id": '' },
|
profile: { "id": '' },
|
||||||
dmp: { "id": '' },
|
dmp: { "id": '' },
|
||||||
services:[],
|
services: [],
|
||||||
registries:[],
|
registries: [],
|
||||||
dataRepositories:[]
|
dataRepositories: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +203,6 @@ export class DatasetsComponent implements OnInit {
|
||||||
this.serverService.getDatasetForDmp({ "id": dmpid }).subscribe(
|
this.serverService.getDatasetForDmp({ "id": dmpid }).subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log("could not retrieve dataset for dpm: " + dmpid);
|
console.log("could not retrieve dataset for dpm: " + dmpid);
|
||||||
|
@ -216,14 +215,15 @@ export class DatasetsComponent implements OnInit {
|
||||||
|
|
||||||
editRow(item, event) {
|
editRow(item, event) {
|
||||||
if (event.toElement.id == "editDataset") {
|
if (event.toElement.id == "editDataset") {
|
||||||
//this.dataset = item;
|
this.spinnerService.show();
|
||||||
|
this.serverService.getDatasetByID(item.id).subscribe(item => {
|
||||||
this.serverService.getDatasetByID(item.id).subscribe(item=>{
|
this.dataset = item;
|
||||||
this.dataset = item;
|
this.dataset.profile = item.profile.id;
|
||||||
this.dataset.profile = item.profile.id;
|
$("#newDatasetModal").modal("show");
|
||||||
$("#newDatasetModal").modal("show");
|
},
|
||||||
}
|
error => simple_notifier("danger", null, "Could not Open Dataset"),
|
||||||
)
|
() => this.spinnerService.hide()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
else if (event.toElement.id == "describeDataset") {
|
else if (event.toElement.id == "describeDataset") {
|
||||||
this.describeDataset(item);
|
this.describeDataset(item);
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { NgForm } from '@angular/forms';
|
||||||
import { DatasetsComponent } from '../datasets/dataset.component';
|
import { DatasetsComponent } from '../datasets/dataset.component';
|
||||||
import { StatusToString } from '../pipes/various/status-to-string';
|
import { StatusToString } from '../pipes/various/status-to-string';
|
||||||
import { MenuItem } from 'primeng/primeng';
|
import { MenuItem } from 'primeng/primeng';
|
||||||
|
import { Ng4LoadingSpinnerService } from 'ng4-loading-spinner';
|
||||||
|
|
||||||
declare var $: any;
|
declare var $: any;
|
||||||
|
|
||||||
|
@ -59,7 +60,9 @@ export class DmpComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
private serverService: ServerService,
|
private serverService: ServerService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private spinnerService: Ng4LoadingSpinnerService
|
||||||
|
) {
|
||||||
this.projectsDropDown = new DropdownField();
|
this.projectsDropDown = new DropdownField();
|
||||||
this.projectsDropDown.options = [];
|
this.projectsDropDown.options = [];
|
||||||
this.statusDropDown = new DropdownField();
|
this.statusDropDown = new DropdownField();
|
||||||
|
@ -190,12 +193,16 @@ export class DmpComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
editDmp(item) {
|
editDmp(item) {
|
||||||
this.serverService.getDmp(item.id).subscribe(result=>{
|
this.spinnerService.show();
|
||||||
|
this.serverService.getDmp(item.id).subscribe(result => {
|
||||||
this.dmp = result;
|
this.dmp = result;
|
||||||
this.dmp.project = result.project.id
|
this.dmp.project = result.project.id
|
||||||
$("#newDmpModal").modal("show");
|
$("#newDmpModal").modal("show");
|
||||||
})
|
},
|
||||||
|
error => simple_notifier("danger", null, "Failed to Open DMP"),
|
||||||
|
() => this.spinnerService.hide()
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneDmp(item) {
|
cloneDmp(item) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div [formGroup]="form">
|
<div [formGroup]="form">
|
||||||
<p-radioButton name="{{field.id}}" [value]="true" label="Yes" formControlName="value"></p-radioButton>
|
<p-radioButton name="{{field.id}}" value="true" label="Yes" formControlName="value"></p-radioButton>
|
||||||
<br>
|
<br>
|
||||||
<p-radioButton name="{{field.id}}" [value]="false" label="No" formControlName="value"></p-radioButton>
|
<p-radioButton name="{{field.id}}" value="false" label="No" formControlName="value"></p-radioButton>
|
||||||
</div>
|
</div>
|
|
@ -13,6 +13,6 @@ export class PaginationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public isElementVisible(elementPage: number):boolean {
|
public isElementVisible(elementPage: number):boolean {
|
||||||
return elementPage == this.currentPageIndex ; //TODO
|
return elementPage == this.currentPageIndex ; //TODO
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue