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>;
|
||||
@Input() datasetCount = 0;
|
||||
@Input() dmpIdforDatasets: string;
|
||||
@Input() dmpLabelforDatasets: string;
|
||||
dataset: any;
|
||||
|
||||
//@ViewChild(DataTable) projectsTable;
|
||||
|
@ -91,7 +92,7 @@ export class DatasetsComponent implements OnInit {
|
|||
dt.id = resp.id;
|
||||
dt.name = resp.label;
|
||||
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.profileId = resp.profile.id;
|
||||
this.datasets.push(dt);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<i>Edit</i>
|
||||
</template>
|
||||
<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>
|
||||
</data-table-column>
|
||||
</data-table>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<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">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
|
@ -27,6 +27,7 @@ export class DmpComponent implements OnInit{
|
|||
dmp:any;
|
||||
dmpResource :DataTableResource<Dmp>;
|
||||
dmpIdforDatasets: string;
|
||||
dmpLabelforDatasets:string;
|
||||
@Input() dmpCount = 0;
|
||||
@Input() projectsDropDown:DropdownField;
|
||||
@Input() dataSetVisibe:boolean;
|
||||
|
@ -48,10 +49,10 @@ export class DmpComponent implements OnInit{
|
|||
this.dataSetVisibe = false;
|
||||
this.dmp = {
|
||||
label: '',
|
||||
previous:'',
|
||||
//previous:'',
|
||||
version:'',
|
||||
profileData:'',
|
||||
profile:''
|
||||
//profile:''
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +64,7 @@ export class DmpComponent implements OnInit{
|
|||
this.dmps = [];
|
||||
this.serverService.getDmpOfUser().subscribe(
|
||||
response => {
|
||||
console.log(response);
|
||||
console.log(response);
|
||||
response.forEach(resp => {
|
||||
let dmp = new Dmp();
|
||||
dmp.id = resp.id;
|
||||
|
@ -189,8 +190,9 @@ signOut() {
|
|||
this.serverService.logOut();
|
||||
}
|
||||
|
||||
selectDmp(rowEvent){
|
||||
selectDmp(rowEvent){
|
||||
this.dmpIdforDatasets = rowEvent.row.item.id;
|
||||
this.dmpLabelforDatasets = rowEvent.row.item.label;
|
||||
if(this.dataSetVisibe == false)
|
||||
this.dataSetVisibe = true;
|
||||
else
|
||||
|
@ -211,9 +213,9 @@ editRow(item){
|
|||
|
||||
newDmp(item){
|
||||
this.dmp.label = "";
|
||||
this.dmp.previous = "";
|
||||
//this.dmp.previous = "";
|
||||
this.dmp.version = "";
|
||||
this.dmp.profile = "";
|
||||
// this.dmp.profile = "";
|
||||
this.dmp.profileData = "";
|
||||
this.dmp.project = "";
|
||||
$("#newDmpModal").modal("show");
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<span>Filter: </span>
|
||||
<input type="text" id="myInput" (keyup)="filterGrid()" placeholder="Search for projects.." title="Type in a name">
|
||||
</div>
|
||||
<data-table id="dmps-grid" headerTitle="My Dmps" [items]="dmps" [itemCount]="dmpCount" (reload)="reloadDmps($event)"
|
||||
[limit]="8" [sortBy]="'label'" [sortAsc]="true" [selectColumn]="true" [multiSelect]="false" [substituteRows]="false"
|
||||
[translations]="translations" [indexColumnHeader]="'#'" [selectOnRowClick]="true" (rowClick)="selectDmp($event)">
|
||||
<data-table id="dmps-grid" headerTitle="My Dmps" [items]="dmps" [itemCount]="dmpCount" (reload)="reloadDmps($event)" [limit]="8"
|
||||
[sortBy]="'label'" [sortAsc]="true" [selectColumn]="true" [multiSelect]="false" [substituteRows]="false" [translations]="translations"
|
||||
[indexColumnHeader]="'#'" [selectOnRowClick]="true" (rowClick)="selectDmp($event)">
|
||||
|
||||
<data-table-column [property]="'label'" [header]="'Label'" [sortable]="true">
|
||||
</data-table-column>
|
||||
|
@ -37,7 +37,8 @@
|
|||
<i>Actions</i>
|
||||
</template>
|
||||
<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>
|
||||
</data-table-column>
|
||||
</data-table>
|
||||
|
@ -46,7 +47,8 @@
|
|||
<!-- <span *ngIf="dmpsTable.selectedRow == null"><i>No item selected</i></span>
|
||||
<span [textContent]="dmpsTable.selectedRow && dmpsTable.selectedRow.item.name"></span> -->
|
||||
</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">
|
||||
<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-content">
|
||||
<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">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
||||
<div class="form-group">
|
||||
<label for="recipient-name" class="col-form-label">Project:</label>
|
||||
<select class="form-control" [id]="projectsDropDownKey" [(ngModel)]="dmp.project" [name]="projectsDropDown" #datasetfield>
|
||||
<div class="form-group">
|
||||
<label for="recipient-name" class="col-form-label">Project:</label>
|
||||
<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>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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 class="form-group">
|
||||
<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 class="form-group">
|
||||
<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 class="form-group">
|
||||
<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 class="form-group">
|
||||
<label for="uri-text" class="form-control-label">Profile:</label>
|
||||
<input class="form-control" id="uri-text" [(ngModel)]= "dmp.profile" name = "profile">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<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 class="form-group">
|
||||
<!-- <div class="form-group">
|
||||
<label for="start-date" class="form-control-label">Start Date:</label>
|
||||
<input class="form-control" id="startDate-date" [(ngModel)]= "dmp.startDate" name = "startDate">
|
||||
</div>
|
||||
|
@ -100,25 +114,25 @@
|
|||
<label for="end-date" class="form-control-label">End Date:</label>
|
||||
<input class="form-control" id="endDate-date" [(ngModel)]= "dmp.endDate" name = "endDate">
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label for="code-name" class="form-control-label">Code:</label>
|
||||
<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 class="form-group">
|
||||
<label for="code-name" class="form-control-label">Code:</label>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Modal for DMPs-->
|
||||
<!-- <modal *ngIf="item && show" [(show)]="show" [item]="item" [(dataSetVisibe)]="dataSetVisibe"></modal> -->
|
||||
|
||||
<!--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>
|
|
@ -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";//
|
||||
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" ;
|
||||
port: number = 7070;
|
||||
webappname: string = "dmp-backend";*/
|
||||
webappname: string = "dmp-backend";
|
||||
|
||||
|
||||
proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/";
|
||||
|
|
|
@ -110,7 +110,7 @@ export class ServerService {
|
|||
}
|
||||
|
||||
public getDatasetForDmp(data:any){
|
||||
return this.restBase.post("/dmp/getdatasets", data);
|
||||
return this.restBase.post("dmp/getdatasets", data);
|
||||
}
|
||||
|
||||
public createDatasetForDmp(data:any){
|
||||
|
|
Loading…
Reference in New Issue