form icon on edit dataset, dmp label in dataset table, bug fixes
This commit is contained in:
parent
3a37de1f9e
commit
bf7f6be531
|
@ -39,6 +39,7 @@ export class DatasetsComponent implements OnInit {
|
||||||
datasetResource: DataTableResource<Dataset>;
|
datasetResource: DataTableResource<Dataset>;
|
||||||
@Input() datasetCount = 0;
|
@Input() datasetCount = 0;
|
||||||
@Input() dmpIdforDatasets: string;
|
@Input() dmpIdforDatasets: string;
|
||||||
|
@Input() dmpLabelforDatasets: string;
|
||||||
dataset: any;
|
dataset: any;
|
||||||
|
|
||||||
//@ViewChild(DataTable) projectsTable;
|
//@ViewChild(DataTable) projectsTable;
|
||||||
|
@ -91,7 +92,7 @@ export class DatasetsComponent implements OnInit {
|
||||||
dt.id = resp.id;
|
dt.id = resp.id;
|
||||||
dt.name = resp.label;
|
dt.name = resp.label;
|
||||||
dt.uriDataset = resp.uri;
|
dt.uriDataset = resp.uri;
|
||||||
dt.dmp = resp.dmp.label;
|
dt.dmp = this.dmpLabelforDatasets; //to pairnw apo to datatable tou dmp
|
||||||
dt.profile = resp.profile.label;
|
dt.profile = resp.profile.label;
|
||||||
dt.profileId = resp.profile.id;
|
dt.profileId = resp.profile.id;
|
||||||
this.datasets.push(dt);
|
this.datasets.push(dt);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<i>Edit</i>
|
<i>Edit</i>
|
||||||
</template>
|
</template>
|
||||||
<template #dataTableCell let-item="item">
|
<template #dataTableCell let-item="item">
|
||||||
<a class="editGridColumn" (click) = "selectDataset(item)"><i class="fa fa-pencil fa-fw"></i></a> <!--data-toggle="modal" data-target="#exampleModalDmps" -->
|
<a class="editGridColumn" (click) = "selectDataset(item)"><i class="fa fa-file-text fa-fw"></i></a> <!--data-toggle="modal" data-target="#exampleModalDmps" -->
|
||||||
</template>
|
</template>
|
||||||
</data-table-column>
|
</data-table-column>
|
||||||
</data-table>
|
</data-table>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="exampleModalLabel">Create New DMP</h5>
|
<h5 class="modal-title" id="exampleModalLabel">Dataset</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -27,6 +27,7 @@ export class DmpComponent implements OnInit{
|
||||||
dmp:any;
|
dmp:any;
|
||||||
dmpResource :DataTableResource<Dmp>;
|
dmpResource :DataTableResource<Dmp>;
|
||||||
dmpIdforDatasets: string;
|
dmpIdforDatasets: string;
|
||||||
|
dmpLabelforDatasets:string;
|
||||||
@Input() dmpCount = 0;
|
@Input() dmpCount = 0;
|
||||||
@Input() projectsDropDown:DropdownField;
|
@Input() projectsDropDown:DropdownField;
|
||||||
@Input() dataSetVisibe:boolean;
|
@Input() dataSetVisibe:boolean;
|
||||||
|
@ -48,10 +49,10 @@ export class DmpComponent implements OnInit{
|
||||||
this.dataSetVisibe = false;
|
this.dataSetVisibe = false;
|
||||||
this.dmp = {
|
this.dmp = {
|
||||||
label: '',
|
label: '',
|
||||||
previous:'',
|
//previous:'',
|
||||||
version:'',
|
version:'',
|
||||||
profileData:'',
|
profileData:'',
|
||||||
profile:''
|
//profile:''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ export class DmpComponent implements OnInit{
|
||||||
this.dmps = [];
|
this.dmps = [];
|
||||||
this.serverService.getDmpOfUser().subscribe(
|
this.serverService.getDmpOfUser().subscribe(
|
||||||
response => {
|
response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
response.forEach(resp => {
|
response.forEach(resp => {
|
||||||
let dmp = new Dmp();
|
let dmp = new Dmp();
|
||||||
dmp.id = resp.id;
|
dmp.id = resp.id;
|
||||||
|
@ -189,8 +190,9 @@ signOut() {
|
||||||
this.serverService.logOut();
|
this.serverService.logOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
selectDmp(rowEvent){
|
selectDmp(rowEvent){
|
||||||
this.dmpIdforDatasets = rowEvent.row.item.id;
|
this.dmpIdforDatasets = rowEvent.row.item.id;
|
||||||
|
this.dmpLabelforDatasets = rowEvent.row.item.label;
|
||||||
if(this.dataSetVisibe == false)
|
if(this.dataSetVisibe == false)
|
||||||
this.dataSetVisibe = true;
|
this.dataSetVisibe = true;
|
||||||
else
|
else
|
||||||
|
@ -211,9 +213,9 @@ editRow(item){
|
||||||
|
|
||||||
newDmp(item){
|
newDmp(item){
|
||||||
this.dmp.label = "";
|
this.dmp.label = "";
|
||||||
this.dmp.previous = "";
|
//this.dmp.previous = "";
|
||||||
this.dmp.version = "";
|
this.dmp.version = "";
|
||||||
this.dmp.profile = "";
|
// this.dmp.profile = "";
|
||||||
this.dmp.profileData = "";
|
this.dmp.profileData = "";
|
||||||
this.dmp.project = "";
|
this.dmp.project = "";
|
||||||
$("#newDmpModal").modal("show");
|
$("#newDmpModal").modal("show");
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<span>Filter: </span>
|
<span>Filter: </span>
|
||||||
<input type="text" id="myInput" (keyup)="filterGrid()" placeholder="Search for projects.." title="Type in a name">
|
<input type="text" id="myInput" (keyup)="filterGrid()" placeholder="Search for projects.." title="Type in a name">
|
||||||
</div>
|
</div>
|
||||||
<data-table id="dmps-grid" headerTitle="My Dmps" [items]="dmps" [itemCount]="dmpCount" (reload)="reloadDmps($event)"
|
<data-table id="dmps-grid" headerTitle="My Dmps" [items]="dmps" [itemCount]="dmpCount" (reload)="reloadDmps($event)" [limit]="8"
|
||||||
[limit]="8" [sortBy]="'label'" [sortAsc]="true" [selectColumn]="true" [multiSelect]="false" [substituteRows]="false"
|
[sortBy]="'label'" [sortAsc]="true" [selectColumn]="true" [multiSelect]="false" [substituteRows]="false" [translations]="translations"
|
||||||
[translations]="translations" [indexColumnHeader]="'#'" [selectOnRowClick]="true" (rowClick)="selectDmp($event)">
|
[indexColumnHeader]="'#'" [selectOnRowClick]="true" (rowClick)="selectDmp($event)">
|
||||||
|
|
||||||
<data-table-column [property]="'label'" [header]="'Label'" [sortable]="true">
|
<data-table-column [property]="'label'" [header]="'Label'" [sortable]="true">
|
||||||
</data-table-column>
|
</data-table-column>
|
||||||
|
@ -37,7 +37,8 @@
|
||||||
<i>Actions</i>
|
<i>Actions</i>
|
||||||
</template>
|
</template>
|
||||||
<template #dataTableCell let-item="item">
|
<template #dataTableCell let-item="item">
|
||||||
<a class="editGridColumn" (click) = "editRow(item)"><i class="fa fa-pencil fa-fw"></i></a> <!--data-toggle="modal" data-target="#exampleModalDmps" -->
|
<a class="editGridColumn" (click)="editRow(item)"><i class="fa fa-pencil fa-fw"></i></a>
|
||||||
|
<!--data-toggle="modal" data-target="#exampleModalDmps" -->
|
||||||
</template>
|
</template>
|
||||||
</data-table-column>
|
</data-table-column>
|
||||||
</data-table>
|
</data-table>
|
||||||
|
@ -46,7 +47,8 @@
|
||||||
<!-- <span *ngIf="dmpsTable.selectedRow == null"><i>No item selected</i></span>
|
<!-- <span *ngIf="dmpsTable.selectedRow == null"><i>No item selected</i></span>
|
||||||
<span [textContent]="dmpsTable.selectedRow && dmpsTable.selectedRow.item.name"></span> -->
|
<span [textContent]="dmpsTable.selectedRow && dmpsTable.selectedRow.item.name"></span> -->
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-info" (click) = "newDmp(item)">New Dmp</button> <!-- data-toggle="modal" data-target="#newDmpModal" -->
|
<button type="button" class="btn btn-info" (click)="newDmp(item)">New Dmp</button>
|
||||||
|
<!-- data-toggle="modal" data-target="#newDmpModal" -->
|
||||||
|
|
||||||
<!-- <select class="form-control" [id]="datasetDropDownKey" [(ngModel)]="datasetDropDownKey">
|
<!-- <select class="form-control" [id]="datasetDropDownKey" [(ngModel)]="datasetDropDownKey">
|
||||||
<option *ngFor="let opt of datasetDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
<option *ngFor="let opt of datasetDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
||||||
|
@ -59,40 +61,52 @@
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="exampleModalLabel">Create New DMP</h5>
|
<h5 class="modal-title" id="exampleModalLabel">DMP</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="recipient-name" class="col-form-label">Project:</label>
|
<label for="recipient-name" class="col-form-label">Project:</label>
|
||||||
<select class="form-control" [id]="projectsDropDownKey" [(ngModel)]="dmp.project" [name]="projectsDropDown" #datasetfield>
|
<select class="form-control" [id]="projectsDropDownKey" [(ngModel)]="dmp.project" [name]="projectsDropDown" #datasetfield>
|
||||||
<option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
<option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="label-name" class="form-control-label">Previous:</label>
|
<label for="label-name" class="form-control-label">Previous:</label>
|
||||||
<input type="text" class="form-control" id="label-previous" [(ngModel)]= "dmp.previous" name = "previous">
|
<input type="text" class="form-control" id="label-previous" [(ngModel)]="dmp.previous" name="previous">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="label-name" class="form-control-label">Label:</label>
|
<label for="label-name" class="form-control-label">Label:</label>
|
||||||
<input type="text" class="form-control" id="label-name" [(ngModel)]= "dmp.label" name = "label">
|
<input type="text" class="form-control" id="label-name" [(ngModel)]="dmp.label" name="label">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="abbreviation-text" class="form-control-label">Version:</label>
|
<label for="abbreviation-text" class="form-control-label">Version:</label>
|
||||||
<input class="form-control" id="abbreviation-text" [(ngModel)]= "dmp.version" name = "version">
|
<input class="form-control" id="abbreviation-text" [(ngModel)]="dmp.version" name="version">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="reference-text" class="form-control-label">Profile Data:</label>
|
<label for="reference-text" class="form-control-label">Profile Data:</label>
|
||||||
<textarea class="form-control" id="reference-text" [(ngModel)]= "dmp.profileData" name = "profileData"></textarea>
|
<textarea class="form-control" id="reference-text" [(ngModel)]="dmp.profileData" name="profileData"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="panel panel-default">
|
||||||
<label for="uri-text" class="form-control-label">Profile:</label>
|
<div class="panel-heading">
|
||||||
<input class="form-control" id="uri-text" [(ngModel)]= "dmp.profile" name = "profile">
|
<span style="font-weight: bold;">Profile</span>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="uri-text" class="form-control-label">Label:</label>
|
||||||
|
<input class="form-control" id="uri-text" [(ngModel)]="dmp.profile" name="profile">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="uri-text" class="form-control-label">Definition:</label>
|
||||||
|
<input class="form-control" id="uri-text" [(ngModel)]="dmp.profileDefinition" name="profileDefinition">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="form-group">
|
<!-- <div class="form-group">
|
||||||
<label for="start-date" class="form-control-label">Start Date:</label>
|
<label for="start-date" class="form-control-label">Start Date:</label>
|
||||||
<input class="form-control" id="startDate-date" [(ngModel)]= "dmp.startDate" name = "startDate">
|
<input class="form-control" id="startDate-date" [(ngModel)]= "dmp.startDate" name = "startDate">
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,25 +114,25 @@
|
||||||
<label for="end-date" class="form-control-label">End Date:</label>
|
<label for="end-date" class="form-control-label">End Date:</label>
|
||||||
<input class="form-control" id="endDate-date" [(ngModel)]= "dmp.endDate" name = "endDate">
|
<input class="form-control" id="endDate-date" [(ngModel)]= "dmp.endDate" name = "endDate">
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="code-name" class="form-control-label">Code:</label>
|
<label for="code-name" class="form-control-label">Code:</label>
|
||||||
<input type="text" class="form-control" id="code-name" disabled>
|
<input type="text" class="form-control" id="code-name" disabled>
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-primary" (click)="SaveNewDmp();">Save Dmp</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
<button type="submit" class="btn btn-primary" (click)="SaveNewDmp();">Save Dmp</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--Modal for DMPs-->
|
<!--Modal for DMPs-->
|
||||||
<!-- <modal *ngIf="item && show" [(show)]="show" [item]="item" [(dataSetVisibe)]="dataSetVisibe"></modal> -->
|
<!-- <modal *ngIf="item && show" [(show)]="show" [item]="item" [(dataSetVisibe)]="dataSetVisibe"></modal> -->
|
||||||
|
|
||||||
<!--DATASET TABLE-->
|
<!--DATASET TABLE-->
|
||||||
<datasets-table *ngIf="dataSetVisibe" [dmpIdforDatasets]= "dmpIdforDatasets" [(dataSetVisibe)]="dataSetVisibe"></datasets-table>
|
<datasets-table *ngIf="dataSetVisibe" [dmpIdforDatasets]="dmpIdforDatasets" [dmpLabelforDatasets] = "dmpLabelforDatasets" [(dataSetVisibe)]="dataSetVisibe"></datasets-table>
|
||||||
|
|
||||||
<a href="#" (click)="signOut();" #isignOutBtn >Sign out</a>
|
<a href="#" (click)="signOut();" #isignOutBtn>Sign out</a>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
|
@ -16,16 +16,16 @@ export class RestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protocol: string = "http";
|
/* protocol: string = "http";
|
||||||
hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";//
|
hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";//
|
||||||
port: number = 8080;//8080;//
|
port: number = 8080;//8080;//
|
||||||
webappname: string = "dmp-backend";//"dmp-backend-new";//
|
webappname: string = "dmp-backend";//"dmp-backend-new";//*/
|
||||||
|
|
||||||
|
|
||||||
/*protocol: string = "http";
|
protocol: string = "http";
|
||||||
hostname: string = "dionysus.di.uoa.gr" ;
|
hostname: string = "dionysus.di.uoa.gr" ;
|
||||||
port: number = 7070;
|
port: number = 7070;
|
||||||
webappname: string = "dmp-backend";*/
|
webappname: string = "dmp-backend";
|
||||||
|
|
||||||
|
|
||||||
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/";
|
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/";
|
||||||
|
|
|
@ -110,7 +110,7 @@ export class ServerService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getDatasetForDmp(data:any){
|
public getDatasetForDmp(data:any){
|
||||||
return this.restBase.post("/dmp/getdatasets", data);
|
return this.restBase.post("dmp/getdatasets", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public createDatasetForDmp(data:any){
|
public createDatasetForDmp(data:any){
|
||||||
|
|
Loading…
Reference in New Issue