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