Merge branch 'master' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot
This commit is contained in:
commit
8874177986
|
@ -19,14 +19,14 @@
|
||||||
"testTsconfig": "tsconfig.spec.json",
|
"testTsconfig": "tsconfig.spec.json",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"styles": [
|
"styles": [
|
||||||
"./../node_modules/bootstrap/dist/css/bootstrap.min.css",
|
"./../node_modules/bootstrap/dist/css/bootstrap.min.css",
|
||||||
"styles.css"
|
"styles.css"
|
||||||
],
|
],
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"./../node_modules/jquery/dist/jquery.min.js",
|
"./../node_modules/jquery/dist/jquery.min.js",
|
||||||
"./../node_modules/bootstrap/dist/js/bootstrap.min.js",
|
"./../node_modules/bootstrap/dist/js/bootstrap.min.js",
|
||||||
"./assets/xml2json.min.js",
|
"./assets/xml2json.min.js",
|
||||||
"./assets/jquery.scrollTo.min.js"
|
"./assets/jquery.scrollTo.min.js"
|
||||||
],
|
],
|
||||||
"environmentSource": "environments/environment.ts",
|
"environmentSource": "environments/environment.ts",
|
||||||
"environments": {
|
"environments": {
|
||||||
|
|
|
@ -526,6 +526,12 @@
|
||||||
"graceful-fs": "4.1.11"
|
"graceful-fs": "4.1.11"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"moment": {
|
||||||
|
"version": "2.18.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz",
|
||||||
|
"integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "0.7.2",
|
"version": "0.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
|
||||||
|
@ -2220,6 +2226,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"date-fns": {
|
||||||
|
"version": "1.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz",
|
||||||
|
"integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw=="
|
||||||
|
},
|
||||||
"date-now": {
|
"date-now": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
|
||||||
|
@ -5404,10 +5415,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"moment": {
|
"moment": {
|
||||||
"version": "2.18.1",
|
"version": "2.19.1",
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz",
|
||||||
"integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=",
|
"integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@ -5490,6 +5500,20 @@
|
||||||
"resolved": "https://registry.npmjs.org/ng-sidebar/-/ng-sidebar-6.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/ng-sidebar/-/ng-sidebar-6.0.4.tgz",
|
||||||
"integrity": "sha1-QtxRdV6FPBiBs7iFg1T0yEWpbzM="
|
"integrity": "sha1-QtxRdV6FPBiBs7iFg1T0yEWpbzM="
|
||||||
},
|
},
|
||||||
|
"ng2-datepicker": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/ng2-datepicker/-/ng2-datepicker-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-09Hwrf9IHsWzp/2FPSGo00P/XtiHSsHLBCeFCK1LG1nuuhNZbQ7LXLR+e+znhjPJyTkhelmODkhmy5DByYWpcA==",
|
||||||
|
"requires": {
|
||||||
|
"date-fns": "1.29.0",
|
||||||
|
"ngx-slimscroll": "3.4.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ngx-slimscroll": {
|
||||||
|
"version": "3.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ngx-slimscroll/-/ngx-slimscroll-3.4.1.tgz",
|
||||||
|
"integrity": "sha512-PMbOai2OeXCFCHnPigYXquN6fAUeAc+CC3AhHugt9wIp8xUB6lIt8OqOWS3IPRRaeKQWyxFCuDfiPKY8n2QuOQ=="
|
||||||
|
},
|
||||||
"ngx-webstorage": {
|
"ngx-webstorage": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/ngx-webstorage/-/ngx-webstorage-1.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/ngx-webstorage/-/ngx-webstorage-1.8.0.tgz",
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"flat": "^4.0.0",
|
"flat": "^4.0.0",
|
||||||
"jquery": "^3.2.1",
|
"jquery": "^3.2.1",
|
||||||
|
"moment": "^2.19.1",
|
||||||
"ng-sidebar": "^6.0.4",
|
"ng-sidebar": "^6.0.4",
|
||||||
|
"ng2-datepicker": "^2.1.3",
|
||||||
"ngx-webstorage": "^1.8.0",
|
"ngx-webstorage": "^1.8.0",
|
||||||
"rxjs": "^5.4.2",
|
"rxjs": "^5.4.2",
|
||||||
"zone.js": "^0.8.17"
|
"zone.js": "^0.8.17"
|
||||||
|
|
|
@ -1,27 +1,32 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { PageNotFoundComponent } from './not-found.component';
|
import { PageNotFoundComponent } from './not-found.component';
|
||||||
|
import { EmptyComponent } from './empty.component';
|
||||||
import { DynamicFormComponent } from './form/dynamic-form.component';
|
import { DynamicFormComponent } from './form/dynamic-form.component';
|
||||||
import { AuthGuard } from './guards/auth.guard';
|
import { AuthGuard } from './guards/auth.guard';
|
||||||
import { ProjectsComponent } from './projects/projects.component';
|
import { ProjectsComponent } from './projects/projects.component';
|
||||||
import { DatasetsComponent } from './datasets/dataset.component';
|
import { DatasetsComponent } from './datasets/dataset.component';
|
||||||
import { DmpComponent } from './dmps/dmp.component';
|
import { DmpComponent } from './dmps/dmp.component';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
|
||||||
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||||
{ path: 'login', component: MainSignInComponent},
|
{ path: 'login', component: MainSignInComponent},
|
||||||
{ path: 'projects', component: ProjectsComponent},
|
//{ path: 'projects', component: ProjectsComponent},
|
||||||
{ path: 'dmps', component: DmpComponent},
|
//{ path: 'dmps', component: DmpComponent},
|
||||||
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
{ path: 'workspace', component: UserWorkspaceComponent},
|
||||||
|
//{ path: '', component: EmptyComponent},
|
||||||
|
//{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
||||||
{ path: '**', component: PageNotFoundComponent },
|
{ path: '**', component: PageNotFoundComponent },
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
redirectTo: 'app-root',
|
redirectTo: 'app-root',
|
||||||
pathMatch: 'full'
|
pathMatch: 'full'
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
|
|
||||||
<div id="appSidebar" class="sidenav child_div">
|
<div id="appSidebar" class="sidenav child_div">
|
||||||
<!--<a href="javascript:void(0)" class="closebtn" (click)='slideNav()'>×</a>-->
|
<!--<a href="javascript:void(0)" class="closebtn" (click)='slideNav()'>×</a>-->
|
||||||
<a href="#">About</a>
|
<a class="cursor">My Workspace</a>
|
||||||
<a href="#">Services</a>
|
<a class="cursor">Orphan Datasets</a>
|
||||||
<a href="#">Clients</a>
|
<a class="cursor">Clients</a>
|
||||||
<a href="#">Contact</a>
|
<a class="cursor">Contact</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="appBody" class="child_div">
|
<div id="appBody" class="child_div">
|
||||||
|
|
|
@ -21,6 +21,7 @@ import { DynamicFormGroupComponent } from './form/dynamic-form-group/dynamic-for
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { AuthGuard } from './guards/auth.guard';
|
import { AuthGuard } from './guards/auth.guard';
|
||||||
import { PageNotFoundComponent } from './not-found.component';
|
import { PageNotFoundComponent } from './not-found.component';
|
||||||
|
import { EmptyComponent } from './empty.component';
|
||||||
import { TocComponent } from './form/tableOfContents/toc.component';
|
import { TocComponent } from './form/tableOfContents/toc.component';
|
||||||
|
|
||||||
import { PaginationService } from './services/pagination.service';
|
import { PaginationService } from './services/pagination.service';
|
||||||
|
@ -57,9 +58,11 @@ import { ProjectsComponent } from './projects/projects.component';
|
||||||
import { ProjectRoutingModule } from './projects/project-routing.module';
|
import { ProjectRoutingModule } from './projects/project-routing.module';
|
||||||
import { ProjectDetailComponent } from './projects/project.detail';
|
import { ProjectDetailComponent } from './projects/project.detail';
|
||||||
import { ModalComponent } from './modal/modal.component';
|
import { ModalComponent } from './modal/modal.component';
|
||||||
|
import { NgDatepickerModule } from 'ng2-datepicker';
|
||||||
|
|
||||||
import { StatusToString } from './pipes/various/status-to-string';
|
import { StatusToString } from './pipes/various/status-to-string';
|
||||||
import { SidebarModule } from 'ng-sidebar';
|
import { SidebarModule } from 'ng-sidebar';
|
||||||
|
import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,11 +78,13 @@ import { SidebarModule } from 'ng-sidebar';
|
||||||
GooggleSignInComponent,
|
GooggleSignInComponent,
|
||||||
MainSignInComponent,
|
MainSignInComponent,
|
||||||
PageNotFoundComponent,
|
PageNotFoundComponent,
|
||||||
|
EmptyComponent,
|
||||||
ModalComponent,
|
ModalComponent,
|
||||||
ProjectDetailComponent,
|
ProjectDetailComponent,
|
||||||
ProjectsComponent,
|
ProjectsComponent,
|
||||||
DmpComponent,
|
DmpComponent,
|
||||||
DatasetsComponent,
|
DatasetsComponent,
|
||||||
|
UserWorkspaceComponent,
|
||||||
|
|
||||||
ProjectTableFilterPipe,
|
ProjectTableFilterPipe,
|
||||||
DmpVersionFilterPipe,
|
DmpVersionFilterPipe,
|
||||||
|
@ -102,6 +107,7 @@ import { SidebarModule } from 'ng-sidebar';
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
AngularDraggableModule,
|
AngularDraggableModule,
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
|
NgDatepickerModule,
|
||||||
SidebarModule.forRoot()
|
SidebarModule.forRoot()
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
@ -87,8 +87,7 @@ export class DatasetsComponent implements OnInit {
|
||||||
this.datasetProfileDropDown.options = [];
|
this.datasetProfileDropDown.options = [];
|
||||||
this.saveAndDescribe = false;
|
this.saveAndDescribe = false;
|
||||||
this.statusDropDown = new DropdownField();
|
this.statusDropDown = new DropdownField();
|
||||||
this.statusDropDown.options =[];
|
this.statusDropDown.options= [{key:'', value:null},{key:'0', value:"Active"},{key:'1', value:"Inactive"}]
|
||||||
this.statusDropDown.options= [{key:'0', value:"active"},{key:'1', value:"inactive"}]
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,6 +114,7 @@ export class DatasetsComponent implements OnInit {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SaveDataset(){
|
SaveDataset(){
|
||||||
if(this.dataset.id ==null){
|
if(this.dataset.id ==null){
|
||||||
this.dataset.dmp = { "id": this.dmpIdforDatasets }
|
this.dataset.dmp = { "id": this.dmpIdforDatasets }
|
||||||
|
@ -130,7 +130,6 @@ export class DatasetsComponent implements OnInit {
|
||||||
$("#newDatasetModal").modal("hide");
|
$("#newDatasetModal").modal("hide");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
this.dataset.dmp = { "id": this.dmpIdforDatasets }
|
this.dataset.dmp = { "id": this.dmpIdforDatasets }
|
||||||
this.dataset.profile = { "id": this.dataset.profile }
|
this.dataset.profile = { "id": this.dataset.profile }
|
||||||
|
@ -166,10 +165,11 @@ 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.dataset.label = item.label;
|
this.dataset.label = item.label;
|
||||||
this.dataset.uri = item.uri;
|
this.dataset.uri = item.uri;
|
||||||
//this.dataset.dmp = item.dmp;
|
//this.dataset.dmp = item.dmp;
|
||||||
this.dataset.profile = item.profile.id;
|
this.dataset.profile = item.profile==null ? null : item.profile.id;
|
||||||
this.dataset.id = item.id;
|
this.dataset.id = item.id;
|
||||||
$("#newDatasetModal").modal("show");
|
$("#newDatasetModal").modal("show");
|
||||||
}
|
}
|
||||||
|
@ -192,8 +192,22 @@ export class DatasetsComponent implements OnInit {
|
||||||
this.SaveDataset();
|
this.SaveDataset();
|
||||||
}
|
}
|
||||||
|
|
||||||
describeDataset(item) {debugger;
|
describeDataset(item) {
|
||||||
this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profile.id, datasetId:item.id}]));
|
this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profile.id, datasetId:item.id}]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteRow(dataset, $event){
|
||||||
|
this.serverService.deleteDataset(dataset).subscribe(
|
||||||
|
response => {
|
||||||
|
console.log("Deleted Successfully the dataset")
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
console.log("Could not delete the dataset")
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.getDatasets();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,9 @@
|
||||||
</th>
|
</th>
|
||||||
<th colspan="1">
|
<th colspan="1">
|
||||||
<!-- <input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' /> -->
|
<!-- <input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' /> -->
|
||||||
<select class="form-control" [id]="statusid" [(ngModel)]="statusFilter" [name]="statusDropDown"
|
<select class="form-control" [id]="statusid" [(ngModel)]="statusFilter" [name]="statusDropDown" #datasetfield >
|
||||||
#datasetfield >
|
|
||||||
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
||||||
</select>
|
</select>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<button class="btn btn-default" (click)="getDatasets()">
|
<button class="btn btn-default" (click)="getDatasets()">
|
||||||
|
@ -63,7 +62,7 @@
|
||||||
<td>{{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
<td>{{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
||||||
<td>{{dataset?.status | statusToString }}</td>
|
<td>{{dataset?.status | statusToString }}</td>
|
||||||
<td><a class="editGridColumn" (click)="editRow(dataset, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit Properties" id="editDataset"></i>
|
<td><a class="editGridColumn" (click)="editRow(dataset, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit Properties" id="editDataset"></i>
|
||||||
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete Dataset"></i>
|
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" (click)="deleteRow(dataset, $event)" title="delete Dataset"></i>
|
||||||
<i class="fa fa-list-alt fa-fw" data-toggle="tooltip" title="describe dataset" id="describeDataset"></i></a></td>
|
<i class="fa fa-list-alt fa-fw" data-toggle="tooltip" title="describe dataset" id="describeDataset"></i></a></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -84,13 +83,13 @@
|
||||||
<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">Dataset</h5>
|
<h5 class="modal-title" >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>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
<form #newProjectForm="ngForm" (ngSubmit)="SaveDataset()">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="recipient-name" class="col-form-label">Dataset Profile:</label>
|
<label for="recipient-name" class="col-form-label">Dataset Profile:</label>
|
||||||
<select class="form-control" [id]="datasetProfileDropDownKey" [(ngModel)]="dataset.profile" [name]="datasetProfileDropDown"
|
<select class="form-control" [id]="datasetProfileDropDownKey" [(ngModel)]="dataset.profile" [name]="datasetProfileDropDown"
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import {DataTableModule} from 'angular2-datatable';
|
|
||||||
import { DatasetTableFilterPipe } from '../pipes/dataset-table-filter.pipe';
|
|
||||||
import { DatasetStatusFilterPipe } from '../pipes/dataset-status-filter.pipe';
|
|
||||||
|
|
||||||
|
|
||||||
import { DatasetsComponent } from './dataset.component';
|
|
||||||
|
|
||||||
import { DatasetRoutingModule } from './dataset-routing.module';
|
|
||||||
//import { ProjectDetailComponent } from './project.detail';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
DatasetRoutingModule,
|
|
||||||
DataTableModule
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
DatasetsComponent,
|
|
||||||
StatusToString,
|
|
||||||
DatasetTableFilterPipe,
|
|
||||||
DatasetStatusFilterPipe
|
|
||||||
//ProjectDetailComponent
|
|
||||||
],
|
|
||||||
providers: [ ],
|
|
||||||
exports: [
|
|
||||||
DatasetsComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class DatasetsModule {}
|
|
||||||
|
|
||||||
*/
|
|
|
@ -216,6 +216,24 @@ newDmp(item){
|
||||||
$("#newDmpModal").modal("show");
|
$("#newDmpModal").modal("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteRow(dmp, $event){
|
||||||
|
console.log("delete row")
|
||||||
|
console.log(dmp);
|
||||||
|
console.log($event)
|
||||||
|
|
||||||
|
this.serverService.deleteDmp(dmp).subscribe(
|
||||||
|
response => {
|
||||||
|
console.log("Deleted Successfully the dmp")
|
||||||
|
},
|
||||||
|
(err: HttpErrorResponse) => {
|
||||||
|
console.log("Could not delete the dmp")
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.getDmps();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,9 +70,8 @@
|
||||||
<td>{{dmp?.status | statusToString }}</td>
|
<td>{{dmp?.status | statusToString }}</td>
|
||||||
<td><a class="editGridColumn" (click)="editRow(dmp, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i>
|
<td><a class="editGridColumn" (click)="editRow(dmp, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i>
|
||||||
<i class="fa fa-clone fa-fw" data-toggle="tooltip" title="create new version" id="changeVersionDMP"></i>
|
<i class="fa fa-clone fa-fw" data-toggle="tooltip" title="create new version" id="changeVersionDMP"></i>
|
||||||
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete DMP"></i>
|
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" (click)="deleteRow(dmp, $event)" title="delete DMP"></i>
|
||||||
<i class="fa fa-table fa-fw" data-toggle="tooltip" title="show dataset for this DMP" id="showDatasets"></i></a></td>
|
<i class="fa fa-table fa-fw" data-toggle="tooltip" title="show dataset for this DMP" id="showDatasets"></i></a></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
|
@ -124,7 +123,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="abbreviation-text" class="form-control-label">Description:</label>
|
<label for="abbreviation-text" class="form-control-label">Description:</label>
|
||||||
<textarea class="form-control" id="abbreviation-text" [(ngModel)]="dmp.description" name="description"></textarea>
|
<textarea rows="3" class="form-control" id="abbreviation-text" [(ngModel)]="dmp.description" name="description"></textarea>
|
||||||
</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>
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: ''
|
||||||
|
})
|
||||||
|
export class EmptyComponent {}
|
|
@ -57,7 +57,7 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit {
|
||||||
//simple_notifier("success",null,"Successful login");
|
//simple_notifier("success",null,"Successful login");
|
||||||
let profile = googleUser.getBasicProfile();
|
let profile = googleUser.getBasicProfile();
|
||||||
this.tokenService.login(googleUser.getAuthResponse().id_token, TokenProvider.google, profile.getName(), profile.getEmail());
|
this.tokenService.login(googleUser.getAuthResponse().id_token, TokenProvider.google, profile.getName(), profile.getEmail());
|
||||||
this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
//simple_notifier("danger",null,"Failed to login");
|
//simple_notifier("danger",null,"Failed to login");
|
||||||
|
|
|
@ -37,6 +37,10 @@ export class MainSignInComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.createProjectEditorForm();
|
this.createProjectEditorForm();
|
||||||
|
//debugger;
|
||||||
|
if(this.tokenService.isLoggedIn()){
|
||||||
|
this.router.navigate(['workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +53,7 @@ export class MainSignInComponent implements OnInit {
|
||||||
simple_notifier("success",null,"Successful login");
|
simple_notifier("success",null,"Successful login");
|
||||||
|
|
||||||
this.tokenService.login(response['token'], TokenProvider.native, this.creds.username, response['email']);
|
this.tokenService.login(response['token'], TokenProvider.native, this.creds.username, response['email']);
|
||||||
this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
simple_notifier("danger",null,"Failed to login");
|
simple_notifier("danger",null,"Failed to login");
|
||||||
|
|
|
@ -6,16 +6,14 @@ import { Pipe, PipeTransform } from "@angular/core";
|
||||||
})
|
})
|
||||||
export class DatasetStatusFilterPipe implements PipeTransform {
|
export class DatasetStatusFilterPipe implements PipeTransform {
|
||||||
|
|
||||||
transform(array: any[], status: string): any {
|
transform(array: any[], status: number): any {
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
||||||
return _.filter(array, row => {
|
return _.filter(array, row => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
row.uri.indexOf(status) > -1 ||
|
row.status == status
|
||||||
|
|
||||||
//row.version == query ||
|
|
||||||
row.id.indexOf(status) > -1
|
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,9 @@ export class DatasetTableFilterPipe implements PipeTransform {
|
||||||
if (row.id == null) row.id = "";
|
if (row.id == null) row.id = "";
|
||||||
return (
|
return (
|
||||||
|
|
||||||
row.label.indexOf(query) > -1 ||
|
row.label.indexOf(query) > -1
|
||||||
|
//|| row.version == query
|
||||||
//row.version == query ||
|
//|| row.id.indexOf(query) > -1
|
||||||
row.id.indexOf(query) > -1
|
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
|
|
|
@ -30,10 +30,10 @@
|
||||||
<mfDefaultSorter by="endDate">End Date</mfDefaultSorter>
|
<mfDefaultSorter by="endDate">End Date</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
<mfDefaultSorter by="description">Definition</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter>Actions </mfDefaultSorter>
|
<mfDefaultSorter>Actions </mfDefaultSorter>
|
||||||
|
@ -47,13 +47,13 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr *ngFor="let project of mf.data" class="hover">
|
<tr *ngFor="let project of mf.data" class="hover">
|
||||||
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{project.id}}</td>
|
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{project?.id}}</td>
|
||||||
<td>{{project?.label}}</td>
|
<td>{{project?.label}}</td>
|
||||||
<td>{{project?.abbreviation}}</td>
|
<td>{{project?.abbreviation}}</td>
|
||||||
<td>{{project?.startDate}}</td>
|
<td>{{project?.startdate | date:'yyyy-MM-dd HH:mm:ss Z' }}</td>
|
||||||
<td>{{project?.endDate}}</td>
|
<td>{{project?.enddate | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
||||||
<td>{{project?.description}}</td>
|
<td>{{project?.status | statusToString}}</td>
|
||||||
<td>{{project?.status}}</td>
|
<td>{{project?.definition}}</td>
|
||||||
<td><a class="editGridColumn" (click)="editRow(project, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i>
|
<td><a class="editGridColumn" (click)="editRow(project, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i>
|
||||||
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete project"></i></a></td>
|
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete project"></i></a></td>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewProject()">
|
<form #newProjectForm="ngForm" (ngSubmit)="SaveProject()">
|
||||||
<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)]= "project.label" name = "label">
|
<input type="text" class="form-control" id="label-name" [(ngModel)]= "project.label" name = "label">
|
||||||
|
@ -99,21 +99,21 @@
|
||||||
</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)]= "project.startDate" name = "startDate">
|
<input class="form-control" type='date' class="form-control" [(ngModel)]= "project.startdate" id='start-date' name = "startdate"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<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)]= "project.endDate" name = "endDate">
|
<input class="form-control" type='date' class="form-control" [(ngModel)]= "project.enddate" id='end-date' name = "enddate"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="code-name" class="form-control-label">Description:</label>
|
<label for="code-name" class="form-control-label">Definition:</label>
|
||||||
<input type="text" class="form-control" name="desc" id="descr" [(ngModel)]= "project.description">
|
<textarea rows="3" class="form-control" name="desc" id="definition" [(ngModel)]= "project.definition"> </textarea>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
<button type="submit" class="btn btn-primary" (click)="SaveNewProject();">Save project</button>
|
<button type="submit" class="btn btn-primary" (click)="SaveProject();">Save project</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import {DataTableModule} from 'angular2-datatable';
|
|
||||||
import { ProjectTableFilterPipe } from '../pipes/project-table-filter.pipe';
|
|
||||||
|
|
||||||
import { ProjectsComponent } from './projects.component';
|
|
||||||
|
|
||||||
import { ProjectRoutingModule } from './project-routing.module';
|
|
||||||
import { ProjectDetailComponent } from './project.detail';
|
|
||||||
import { DatasetsModule } from '../datasets/dataset.module';
|
|
||||||
import { ModalComponent } from '../modal/modal.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
ProjectRoutingModule,
|
|
||||||
DataTableModule,
|
|
||||||
DatasetsModule
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
ProjectsComponent,
|
|
||||||
ProjectDetailComponent,
|
|
||||||
ModalComponent,
|
|
||||||
ProjectTableFilterPipe
|
|
||||||
],
|
|
||||||
providers: [ ]
|
|
||||||
})
|
|
||||||
export class ProjectsModule {}
|
|
||||||
|
|
||||||
*/
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
|
import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
|
||||||
|
import {Observable} from 'rxjs/Observable';
|
||||||
import {GoogleSignInSuccess} from 'angular-google-signin';
|
import {GoogleSignInSuccess} from 'angular-google-signin';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { ServerService } from '../../app/services/server.service';
|
import { ServerService } from '../../app/services/server.service';
|
||||||
|
@ -13,12 +14,16 @@ import { ModalComponent } from '../modal/modal.component';
|
||||||
import { HttpErrorResponse } from '@angular/common/http';
|
import { HttpErrorResponse } from '@angular/common/http';
|
||||||
import { FormGroup, FormControl } from '@angular/forms'; //na dw an xreiazontai
|
import { FormGroup, FormControl } from '@angular/forms'; //na dw an xreiazontai
|
||||||
import { NgForm } from '@angular/forms';
|
import { NgForm } from '@angular/forms';
|
||||||
|
import { DatepickerOptions } from 'ng2-datepicker';
|
||||||
|
import { StatusToString} from '../pipes/various/status-to-string';
|
||||||
|
|
||||||
import { ProjectTableFilterPipe } from '../pipes/project-table-filter.pipe';
|
import { ProjectTableFilterPipe } from '../pipes/project-table-filter.pipe';
|
||||||
|
|
||||||
|
|
||||||
declare var $ :any;
|
declare var $ :any;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'projects',
|
selector: 'projects',
|
||||||
templateUrl: 'project.html',
|
templateUrl: 'project.html',
|
||||||
|
@ -52,7 +57,6 @@ export class ProjectsComponent implements OnInit{
|
||||||
// END ALTERNATIVE
|
// END ALTERNATIVE
|
||||||
|
|
||||||
returnUrl: string;
|
returnUrl: string;
|
||||||
@Input() projects: Project[];
|
|
||||||
@Input() projectCount = 0;
|
@Input() projectCount = 0;
|
||||||
@Input() datasetDropDown:DropdownField;
|
@Input() datasetDropDown:DropdownField;
|
||||||
//@Input() dataSetVisibe:boolean;
|
//@Input() dataSetVisibe:boolean;
|
||||||
|
@ -66,60 +70,59 @@ export class ProjectsComponent implements OnInit{
|
||||||
@ViewChild(DataTable) datasetsTable;
|
@ViewChild(DataTable) datasetsTable;
|
||||||
@ViewChild('isignOutBtn') isignOutBtn;
|
@ViewChild('isignOutBtn') isignOutBtn;
|
||||||
|
|
||||||
|
|
||||||
|
options: DatepickerOptions = {
|
||||||
|
minYear: 1900,
|
||||||
|
maxYear: 2050,
|
||||||
|
displayFormat: 'MMM D[,] YYYY',
|
||||||
|
barTitleFormat: 'MMMM YYYY',
|
||||||
|
firstCalendarDay: 0 // 0 - Sunday, 1 - Monday
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private serverService: ServerService,
|
private serverService: ServerService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router){
|
private router: Router) {
|
||||||
this.datasetDropDown = new DropdownField();
|
this.datasetDropDown = new DropdownField();
|
||||||
this.datasetDropDown.options = [];
|
this.datasetDropDown.options = [];
|
||||||
this.datasets = [];
|
this.datasets = [];
|
||||||
this.project = {
|
this.project = this.getEmptyProject();
|
||||||
label: '',
|
|
||||||
abbreviation:'',
|
|
||||||
reference:'',
|
|
||||||
uri:'',
|
|
||||||
definition:'',
|
|
||||||
endDate:'',
|
|
||||||
startDate:''
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngAfterViewInit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getEmptyProject(){
|
||||||
|
return {
|
||||||
|
label: '',
|
||||||
|
abbreviation:'',
|
||||||
|
reference:'',
|
||||||
|
uri:'',
|
||||||
|
definition:'',
|
||||||
|
enddate:'',
|
||||||
|
startdate:''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.projects = [];
|
|
||||||
this.getProjects();
|
this.getProjects();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getProjects(){
|
getProjects(){
|
||||||
this.serverService.getProjectOfUer().subscribe(
|
this.serverService.getProjectsOfUser().subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
|
console.log(this.tableData)
|
||||||
response.forEach(resp => {
|
},
|
||||||
let pr = new Project();
|
err => {
|
||||||
pr.id = resp.id;
|
|
||||||
pr.label = resp.label;
|
}
|
||||||
pr.abbreviation = resp.abbreviation;
|
|
||||||
pr.definition = resp.definition;
|
|
||||||
pr.uri = resp.uri;
|
|
||||||
this.projects.push(pr);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// (err: HttpErrorResponse) => {
|
|
||||||
// if (err.error instanceof Error) {
|
|
||||||
// // A client-side or network error occurred. Handle it accordingly.
|
|
||||||
// console.log('An error occurred:', err.error.message);
|
|
||||||
// } else {
|
|
||||||
// // The backend returned an unsuccessful response code.
|
|
||||||
// // The response body may contain clues as to what went wrong,
|
|
||||||
// if(err.status == 401){
|
|
||||||
// this.isignOutBtn.nativeElement.click();
|
|
||||||
// }
|
|
||||||
// console.log(`Backend returned code ${err.status}, body was: ${err.error}`);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,45 +149,36 @@ showDatasets(){debugger; //dmpId, event
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// editRow(item){
|
|
||||||
// this.show = true;
|
|
||||||
// this.item = item;
|
|
||||||
// }
|
|
||||||
|
|
||||||
SaveNewProject(){
|
SaveProject(){
|
||||||
console.log(this.project);
|
|
||||||
//this.http.post('http://someurl', JSON.stringify(this.project))
|
let action : Observable<any>;
|
||||||
this.serverService.createProject(this.project)
|
|
||||||
.subscribe(
|
if(this.project.id == null) //means it's a new one
|
||||||
|
action = this.serverService.createProject(this.project);
|
||||||
|
else
|
||||||
|
action = this.serverService.updateProject(this.project);
|
||||||
|
action.subscribe(
|
||||||
response =>{
|
response =>{
|
||||||
console.log("response");
|
console.log("response");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("#newEditProjectModal").modal("hide");
|
$("#newEditProjectModal").modal("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
newProject(item){
|
newProject(item){
|
||||||
this.project.label = "";
|
this.project = this.getEmptyProject();
|
||||||
this.project.id = null;
|
|
||||||
this.project.abbreviation = "";
|
|
||||||
this.project.reference = "";
|
|
||||||
this.project.uri = "";
|
|
||||||
this.project.definition = "";
|
|
||||||
$("#newEditProjectModal").modal("show");
|
$("#newEditProjectModal").modal("show");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
editRow(item, event){
|
editRow(item, event){
|
||||||
if (event.toElement.id == "editDMP"){
|
|
||||||
this.project.label = item.label;
|
this.project = item; //this will have id - that defines whether it's an update or not
|
||||||
this.project.abbreviation = item.abbreviation;
|
|
||||||
this.project.reference = item.reference;
|
|
||||||
this.project.uri = item.uri;
|
|
||||||
this.project.definition = item.definition;
|
|
||||||
this.project.id = item.id;
|
|
||||||
$("#newEditProjectModal").modal("show");
|
$("#newEditProjectModal").modal("show");
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,14 @@ 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" ;
|
||||||
|
|
|
@ -81,7 +81,7 @@ export class ServerService {
|
||||||
return this.restBase.get("dmp/listDMPLabelID");
|
return this.restBase.get("dmp/listDMPLabelID");
|
||||||
}
|
}
|
||||||
|
|
||||||
public getProjectOfUer(){
|
public getProjectsOfUser(){
|
||||||
return this.restBase.get("project/getofuser");
|
return this.restBase.get("project/getofuser");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +89,10 @@ export class ServerService {
|
||||||
return this.restBase.post("project/createofuser", data);
|
return this.restBase.post("project/createofuser", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public updateProject(data:any){
|
||||||
|
return this.restBase.post("project/update", data);
|
||||||
|
}
|
||||||
|
|
||||||
public getAllDataSet(){
|
public getAllDataSet(){
|
||||||
return this.restBase.get("dataset/getAll");
|
return this.restBase.get("dataset/getAll");
|
||||||
}
|
}
|
||||||
|
@ -106,6 +110,9 @@ export class ServerService {
|
||||||
return this.restBase.post("dmp/update", data);
|
return this.restBase.post("dmp/update", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public deleteDmp(dmp: any){
|
||||||
|
return this.restBase.post("dmp/softdelete", dmp);
|
||||||
|
}
|
||||||
|
|
||||||
public getDatasetForDmp(data:any){
|
public getDatasetForDmp(data:any){
|
||||||
return this.restBase.post("dmp/getdatasets", data);
|
return this.restBase.post("dmp/getdatasets", data);
|
||||||
|
@ -127,6 +134,11 @@ public updateDatsetsProfile(data:any){
|
||||||
return this.restBase.post("dataset/update", data);
|
return this.restBase.post("dataset/update", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public deleteDataset(dataset: any){
|
||||||
|
return this.restBase.post("dataset/softdelete", dataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logOut() {
|
logOut() {
|
||||||
this.tokenService.logout();
|
this.tokenService.logout();
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="active">
|
||||||
|
<a href="#my-dmps" data-toggle="tab">My DMPs</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#all-projects" data-toggle="tab">Projects</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tab-content clearfix">
|
||||||
|
<div class="tab-pane active" id="my-dmps">
|
||||||
|
<dmps></dmps>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="all-projects">
|
||||||
|
<projects></projects>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="3a">
|
||||||
|
<h3>We applied clearfix to the tab-content to rid of the gap between the tab and the content</h3>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="4a">
|
||||||
|
<h3>We use css to change the background color of the content to be equal to the tab</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { UserWorkspaceComponent } from './user-workspace.component';
|
||||||
|
|
||||||
|
describe('UserWorkspaceComponent', () => {
|
||||||
|
let component: UserWorkspaceComponent;
|
||||||
|
let fixture: ComponentFixture<UserWorkspaceComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ UserWorkspaceComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(UserWorkspaceComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
import { DmpComponent } from '../dmps/dmp.component';
|
||||||
|
import { ProjectsComponent } from '../projects/projects.component';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'user-workspace',
|
||||||
|
templateUrl: './user-workspace.component.html',
|
||||||
|
styleUrls: ['./user-workspace.component.css']
|
||||||
|
})
|
||||||
|
export class UserWorkspaceComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,15 +37,13 @@
|
||||||
|
|
||||||
<!-- font-awesome css -->
|
<!-- font-awesome css -->
|
||||||
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
|
||||||
|
|
||||||
<!-- my custom global code and css -->
|
<!-- my custom global code and css -->
|
||||||
<link rel="stylesheet" type="text/css" href="assets/custom.css">
|
<link rel="stylesheet" type="text/css" href="assets/custom.css">
|
||||||
<script src="assets/custom.js"></script>
|
<script src="assets/custom.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue