diff --git a/dmp-frontend/package-lock.json b/dmp-frontend/package-lock.json
index 27d9d0aaa..bb0dd8802 100644
--- a/dmp-frontend/package-lock.json
+++ b/dmp-frontend/package-lock.json
@@ -594,6 +594,58 @@
"resolved": "https://registry.npmjs.org/angular2-draggable/-/angular2-draggable-1.0.7.tgz",
"integrity": "sha1-NeH4HIzPPdljDyMmVYuILMEvDyk="
},
+ "angular2-number-picker": {
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/angular2-number-picker/-/angular2-number-picker-0.8.8.tgz",
+ "integrity": "sha1-YmlNjaSBfarjZU43O8zevYKZKCw=",
+ "requires": {
+ "@angular/common": "2.4.10",
+ "@angular/compiler": "2.4.10",
+ "@angular/core": "2.4.10",
+ "@angular/forms": "2.4.10",
+ "@angular/platform-browser": "2.4.10",
+ "@angular/platform-browser-dynamic": "2.4.10",
+ "rxjs": "5.4.3",
+ "zone.js": "0.7.8"
+ },
+ "dependencies": {
+ "@angular/common": {
+ "version": "2.4.10",
+ "resolved": "https://registry.npmjs.org/@angular/common/-/common-2.4.10.tgz",
+ "integrity": "sha1-o6aC0iKPow7CPdDrV8joh/uiaZc="
+ },
+ "@angular/compiler": {
+ "version": "2.4.10",
+ "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-2.4.10.tgz",
+ "integrity": "sha1-9R/TSCCyoCx8th+89JhzxYBW+ww="
+ },
+ "@angular/core": {
+ "version": "2.4.10",
+ "resolved": "https://registry.npmjs.org/@angular/core/-/core-2.4.10.tgz",
+ "integrity": "sha1-C4MgplBlll2ZhkWx9c0892m0Qeo="
+ },
+ "@angular/forms": {
+ "version": "2.4.10",
+ "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-2.4.10.tgz",
+ "integrity": "sha1-BiEzqq3h87PJYvFZMgjFQbYi/QY="
+ },
+ "@angular/platform-browser": {
+ "version": "2.4.10",
+ "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-2.4.10.tgz",
+ "integrity": "sha1-y/JWCBSPtP/vlsxQBbpdez4JOQY="
+ },
+ "@angular/platform-browser-dynamic": {
+ "version": "2.4.10",
+ "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-2.4.10.tgz",
+ "integrity": "sha1-jfJd7CsGrcaQzJvCZEjezK682Ow="
+ },
+ "zone.js": {
+ "version": "0.7.8",
+ "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.8.tgz",
+ "integrity": "sha1-Tz/og01EWX8mOQU6D6Q43zT//e0="
+ }
+ }
+ },
"ansi-escapes": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz",
@@ -5433,6 +5485,11 @@
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
"dev": true
},
+ "ng-sidebar": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/ng-sidebar/-/ng-sidebar-6.0.4.tgz",
+ "integrity": "sha1-QtxRdV6FPBiBs7iFg1T0yEWpbzM="
+ },
"ngx-webstorage": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/ngx-webstorage/-/ngx-webstorage-1.8.0.tgz",
diff --git a/dmp-frontend/package.json b/dmp-frontend/package.json
index e58999961..1f0489d05 100644
--- a/dmp-frontend/package.json
+++ b/dmp-frontend/package.json
@@ -26,10 +26,12 @@
"angular-google-signin": "^0.1.5",
"angular2-datatable": "^0.6.0",
"angular2-draggable": "^1.0.7",
+ "angular2-number-picker": "^0.8.8",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"flat": "^4.0.0",
"jquery": "^3.2.1",
+ "ng-sidebar": "^6.0.4",
"ngx-webstorage": "^1.8.0",
"rxjs": "^5.4.2",
"zone.js": "^0.8.17"
diff --git a/dmp-frontend/src/app/app.component.css b/dmp-frontend/src/app/app.component.css
index 372eb2f17..0955e30ae 100644
--- a/dmp-frontend/src/app/app.component.css
+++ b/dmp-frontend/src/app/app.component.css
@@ -34,4 +34,105 @@
.cursor{
cursor: pointer;
-}
\ No newline at end of file
+}
+
+
+.navbar-title
+{
+ position: absolute;
+ width: 100%;
+ left: 0;
+ text-align: center;
+ margin:0 auto;
+}
+.navbar-toggle {
+ z-index:3;
+}
+
+.arrange-horizontally > * {
+ display: inline-block;
+ /*text-align: center;*/
+ white-space: nowrap
+}
+.arrange-vertically > * {
+ display: block;
+}
+
+
+/* FOR THE SIDEBAR */
+
+.parent_div{
+ height:100%;
+ width:100%;
+ float:left;
+}
+.child_div{
+ height:100%;
+ /*
+ width:100%;
+ */
+ float:left;
+}
+
+
+.sidenav {
+ /*
+ position: absolute;
+ padding-bottom: 500px;
+ */
+
+ z-index: 1;
+ overflow-x: hidden;
+ height: 100%;
+ width: 0px;
+ top: 0px;
+ left: 0px;
+ background-color: #111;
+ transition: 0.5s;
+ padding-top: 60px;
+}
+
+.sidenav.expanded{
+ width: 15%;
+}
+
+#appBody {
+ width : 100%;
+ transition: 0.5s;
+}
+#appBody.expanded{
+ width: 85%;
+}
+
+
+
+.sidenav a {
+ padding: 8px 8px 8px 32px;
+ text-decoration: none;
+ font-size: 25px;
+ color: #818181;
+ display: block;
+ transition: 0.3s;
+}
+
+.sidenav a:hover {
+ color: #f1f1f1;
+}
+
+.sidenav .closebtn {
+ position: absolute;
+ top: 0;
+ right: 25px;
+ font-size: 36px;
+ margin-left: 50px;
+}
+
+#main {
+ transition: margin-left .5s;
+ padding: 16px;
+}
+
+@media screen and (max-height: 450px) {
+ .sidenav {padding-top: 15px;}
+ .sidenav a {font-size: 18px;}
+}
diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html
index 22fd1ba02..4d428c521 100644
--- a/dmp-frontend/src/app/app.component.html
+++ b/dmp-frontend/src/app/app.component.html
@@ -1,55 +1,66 @@
-
-
-
+
+
+
+
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts
index bd676656a..376914a2a 100644
--- a/dmp-frontend/src/app/app.component.ts
+++ b/dmp-frontend/src/app/app.component.ts
@@ -6,6 +6,7 @@ import { TokenService, TokenProvider } from './services/login/token.service';
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
+declare var $ :any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
@@ -16,6 +17,7 @@ export class AppComponent implements OnInit {
fields: any[];
+ sliderExpanded : boolean = false;
constructor(private tokenService : TokenService, private router: Router) {
@@ -23,11 +25,20 @@ export class AppComponent implements OnInit {
ngOnInit() {
-
-
}
+
+ slideNav(){
+
+ $("#appSidebar").toggleClass("expanded");
+ $("#appBody").toggleClass("expanded");
+
+
+ }
+
+
+
//loggedInAs : string = null;
showLogin : boolean = false;
diff --git a/dmp-frontend/src/app/app.module.ts b/dmp-frontend/src/app/app.module.ts
index 50c21d18d..ec617c3eb 100644
--- a/dmp-frontend/src/app/app.module.ts
+++ b/dmp-frontend/src/app/app.module.ts
@@ -22,12 +22,12 @@ import { AppRoutingModule } from './app-routing.module';
import { AuthGuard } from './guards/auth.guard';
import { PageNotFoundComponent } from './not-found.component';
import { TocComponent } from './form/tableOfContents/toc.component';
-import { ProjectsModule } from './projects/project.module';
+
import { PaginationService } from './services/pagination.service';
import { EestoreService } from './services/eestore.service';
import { GlobalInterceptor } from './services/interceptor';
-import { DatasetsModule } from './datasets/dataset.module';
-import { DmpModule } from './dmps/dmp.module';
+
+
import { TabModule } from './tabs/tab.module';
import { AngularDraggableModule } from 'angular2-draggable';
@@ -38,6 +38,33 @@ import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component
import { HTTP_INTERCEPTORS } from '@angular/common/http';
+
+
+import { CommonModule } from '@angular/common';
+
+import { DatasetTableFilterPipe } from './pipes/dataset-table-filter.pipe';
+import { DatasetStatusFilterPipe } from './pipes/dataset-status-filter.pipe';
+import { DatasetsComponent } from './datasets/dataset.component';
+import { DatasetRoutingModule } from './datasets/dataset-routing.module';
+
+import { DmpComponent } from './dmps/dmp.component';
+import { DmpTableFilterPipe } from './pipes/dmp-table-filter.pipe';
+import { DmpVersionFilterPipe } from './pipes/dmp-version-filter.pipe';
+import { DmpRoutingModule } from './dmps/dmp-routing.module';
+
+import { ProjectTableFilterPipe } from './pipes/project-table-filter.pipe';
+import { ProjectsComponent } from './projects/projects.component';
+import { ProjectRoutingModule } from './projects/project-routing.module';
+import { ProjectDetailComponent } from './projects/project.detail';
+import { ModalComponent } from './modal/modal.component';
+
+import { StatusToString } from './pipes/various/status-to-string';
+import { SidebarModule } from 'ng-sidebar';
+
+
+
+
+
@NgModule({
declarations: [
AppComponent,
@@ -45,10 +72,21 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
DynamicFormFieldComponent,
DynamicFormGroupComponent,
TocComponent,
- //LoginComponent,
GooggleSignInComponent,
MainSignInComponent,
- PageNotFoundComponent
+ PageNotFoundComponent,
+ ModalComponent,
+ ProjectDetailComponent,
+ ProjectsComponent,
+ DmpComponent,
+ DatasetsComponent,
+
+ ProjectTableFilterPipe,
+ DmpVersionFilterPipe,
+ DmpTableFilterPipe,
+ DatasetTableFilterPipe,
+ DatasetStatusFilterPipe,
+ StatusToString
],
imports: [
BrowserModule,
@@ -57,12 +95,14 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
HttpModule,
HttpClientModule,
TabModule,
- ProjectsModule,
- DmpModule,
- DatasetsModule,
+ DmpRoutingModule,
+ CommonModule,
+ DatasetRoutingModule,
+ ProjectRoutingModule,
AppRoutingModule,
AngularDraggableModule,
- DataTableModule
+ DataTableModule,
+ SidebarModule.forRoot()
],
providers: [{
@@ -71,7 +111,6 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
multi: true,
},
ServerService, dataModelBuilder, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService
-
],
bootstrap: [AppComponent]
})
diff --git a/dmp-frontend/src/app/datasets/dataset.component.ts b/dmp-frontend/src/app/datasets/dataset.component.ts
index 56d0a581f..b8d4deae9 100644
--- a/dmp-frontend/src/app/datasets/dataset.component.ts
+++ b/dmp-frontend/src/app/datasets/dataset.component.ts
@@ -5,10 +5,10 @@ import { ServerService } from '../../app/services/server.service';
import { Project } from '../entities/model/project';
import { Dataset } from '../entities/model/dataset';
import { Dmp } from '../entities/model/dmp';
-//import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
import {DataTable} from 'angular2-datatable';
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
import { Param } from '../entities/model/param';
+import { StatusToString } from '../pipes/various/status-to-string';
declare var $: any;
diff --git a/dmp-frontend/src/app/datasets/dataset.html b/dmp-frontend/src/app/datasets/dataset.html
index 58dc1c8b5..3a417d6a7 100644
--- a/dmp-frontend/src/app/datasets/dataset.html
+++ b/dmp-frontend/src/app/datasets/dataset.html
@@ -1,6 +1,8 @@
+
+
@@ -36,17 +38,20 @@
Description
|
- Status
- |
+ Created at
+
- Actions
+ Status
+ |
+
+ Actions
|
- No elements |
+ No elements |
@@ -55,7 +60,8 @@
{{dataset?.uri}} |
{{dataset?.profile?.label}} |
{{dataset?.description}} |
- {{dataset?.status}} |
+ {{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}} |
+ {{dataset?.status | statusToString }} |
|
diff --git a/dmp-frontend/src/app/datasets/dataset.module.ts b/dmp-frontend/src/app/datasets/dataset.module.ts
index 688158eff..0b1ab1cdc 100644
--- a/dmp-frontend/src/app/datasets/dataset.module.ts
+++ b/dmp-frontend/src/app/datasets/dataset.module.ts
@@ -1,3 +1,4 @@
+/*
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
@@ -5,6 +6,7 @@ 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';
@@ -19,6 +21,7 @@ import { DatasetRoutingModule } from './dataset-routing.module';
],
declarations: [
DatasetsComponent,
+ StatusToString,
DatasetTableFilterPipe,
DatasetStatusFilterPipe
//ProjectDetailComponent
@@ -28,4 +31,6 @@ import { DatasetRoutingModule } from './dataset-routing.module';
DatasetsComponent
]
})
-export class DatasetsModule {}
\ No newline at end of file
+export class DatasetsModule {}
+
+*/
\ No newline at end of file
diff --git a/dmp-frontend/src/app/dmps/dmp.component.ts b/dmp-frontend/src/app/dmps/dmp.component.ts
index ceff52473..3abaafd51 100644
--- a/dmp-frontend/src/app/dmps/dmp.component.ts
+++ b/dmp-frontend/src/app/dmps/dmp.component.ts
@@ -5,7 +5,7 @@ import { ServerService } from '../../app/services/server.service';
import { Dmp } from '../entities/model/dmp';
import { Dataset } from '../entities/model/dataset';
import { Project } from '../entities/model/project';
-//import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
+
import {DataTable} from 'angular2-datatable';
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
import { Param } from '../entities/model/param';
@@ -14,6 +14,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import { FormGroup, FormControl } from '@angular/forms'; //na dw an xreiazontai
import { NgForm } from '@angular/forms';
import { DatasetsComponent } from '../datasets/dataset.component';
+import { StatusToString } from '../pipes/various/status-to-string';
declare var $ :any;
@@ -49,7 +50,7 @@ export class DmpComponent implements OnInit{
showIDs : boolean = false;
// END ALTERNATIVE
- //@Input() dmps: Dmp[];
+
dmp:any;
@Input() dmpTableVisible: boolean;
@Input() dmpCount = 0;
@@ -60,12 +61,7 @@ export class DmpComponent implements OnInit{
dmpIdforDatasets: string;
dmpLabelforDatasets:string;
@ViewChild(DatasetsComponent) datasetsComponent:DatasetsComponent;
- /*dmpResource :DataTableResource;
-
- @ViewChild(DataTable) dmpsTable;
- @ViewChild(DataTable) datasetsTable;
- */
@ViewChild('isignOutBtn') isignOutBtn;
constructor(
@@ -75,13 +71,13 @@ export class DmpComponent implements OnInit{
this.projectsDropDown = new DropdownField();
this.projectsDropDown.options = [];
this.statusDropDown = new DropdownField();
- this.statusDropDown.options =[];
- this.statusDropDown.options= [{key:'0', value:"active"},{key:'1', value:"inactive"}]
+ this.statusDropDown.options= [{key:'0', value:"Active"},{key:'1', value:"Inactive"}]
//this.projects = [];
this.dmpTableVisible = false;
this.dataSetVisibe = false;
+
this.dmp = {
- id:null,
+ id: null,
label: '',
previous:'',
version:'',
@@ -92,7 +88,7 @@ export class DmpComponent implements OnInit{
}
ngOnInit() {
- //this.projects = this.serverService.getDummyProjects();
+
this.serverService.getDmpOfUser().subscribe(
response => {
this.tableData = response;
@@ -104,7 +100,6 @@ export class DmpComponent implements OnInit{
this.serverService.getAllProjects().subscribe(
response => {
- console.log(response);
//let params = new Param();
response.forEach((dmp) => {
let params = new Param();
@@ -150,10 +145,8 @@ newDMP(){
}
updateDMP(){
- console.log(this.dmp, this.dmp.projectsDropDownKey);
this.dmp.project = {"id":this.dmp.project};
-
this.serverService.updateDmp(this.dmp)
.subscribe(
@@ -167,7 +160,6 @@ updateDMP(){
}
SaveDmp(){
- debugger;
if (this.dmp.id == null)
this.newDMP();
else
@@ -220,6 +212,7 @@ newDmp(item){
// this.dmp.profile = "";
this.dmp.profileData = "";
this.dmp.project = "";
+
$("#newDmpModal").modal("show");
}
diff --git a/dmp-frontend/src/app/dmps/dmp.module.ts b/dmp-frontend/src/app/dmps/dmp.module.ts
index 8c27edce2..29815a9d3 100644
--- a/dmp-frontend/src/app/dmps/dmp.module.ts
+++ b/dmp-frontend/src/app/dmps/dmp.module.ts
@@ -1,3 +1,4 @@
+/*
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
@@ -26,4 +27,6 @@ import { DatasetsModule } from '../datasets/dataset.module';
],
providers: [ ]
})
-export class DmpModule {}
\ No newline at end of file
+export class DmpModule {}
+
+*/
\ No newline at end of file
diff --git a/dmp-frontend/src/app/dmps/dmps.html b/dmp-frontend/src/app/dmps/dmps.html
index 3368cecb5..39106d79b 100644
--- a/dmp-frontend/src/app/dmps/dmps.html
+++ b/dmp-frontend/src/app/dmps/dmps.html
@@ -10,23 +10,19 @@
-
- |
-
+
|
-
-
-
+ |
-
+
|
+
ID
@@ -46,11 +42,14 @@
|
Description
|
+
+ Created at
+ |
Status
|
- Actions
+ Actions
|
@@ -61,13 +60,14 @@
- {{dmp.id}} |
+ {{dmp?.id}} |
{{dmp?.label}} |
{{dmp?.version}} |
{{dmp?.previous}} |
{{dmp?.project?.label}} |
{{dmp?.description}} |
- {{dmp?.status}} |
+ {{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}} |
+ {{dmp?.status | statusToString }} |
@@ -77,7 +77,7 @@
|
-
+ |
|
diff --git a/dmp-frontend/src/app/pipes/various/status-to-string.ts b/dmp-frontend/src/app/pipes/various/status-to-string.ts
new file mode 100644
index 000000000..07a781557
--- /dev/null
+++ b/dmp-frontend/src/app/pipes/various/status-to-string.ts
@@ -0,0 +1,26 @@
+
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: "statusToString"
+})
+
+export class StatusToString implements PipeTransform {
+
+ transform(input: any) : any {
+
+ if(input < 0) {
+ return "Deleted";
+ }
+ else if(input == 0) {
+ return "Active";
+ }
+ else if(input == 1) {
+ return "Inactive";
+ }
+ else {
+ return input.toString();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/dmp-frontend/src/app/projects/project.detail.ts b/dmp-frontend/src/app/projects/project.detail.ts
index 585b85f82..cf4c3f839 100644
--- a/dmp-frontend/src/app/projects/project.detail.ts
+++ b/dmp-frontend/src/app/projects/project.detail.ts
@@ -5,7 +5,6 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
@Component({
template: `
- HEROES
"{{ project.name }}"
diff --git a/dmp-frontend/src/app/projects/project.html b/dmp-frontend/src/app/projects/project.html
index 8b8192d85..d50b79e0f 100644
--- a/dmp-frontend/src/app/projects/project.html
+++ b/dmp-frontend/src/app/projects/project.html
@@ -1,6 +1,5 @@
-
diff --git a/dmp-frontend/src/app/projects/project.module.ts b/dmp-frontend/src/app/projects/project.module.ts
index 6a97e1556..069ca439e 100644
--- a/dmp-frontend/src/app/projects/project.module.ts
+++ b/dmp-frontend/src/app/projects/project.module.ts
@@ -1,3 +1,4 @@
+/*
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
@@ -27,4 +28,6 @@ import { ModalComponent } from '../modal/modal.component';
],
providers: [ ]
})
-export class ProjectsModule {}
\ No newline at end of file
+export class ProjectsModule {}
+
+*/
\ No newline at end of file
diff --git a/dmp-frontend/src/app/projects/projects.component.ts b/dmp-frontend/src/app/projects/projects.component.ts
index abf15a588..c4720318e 100644
--- a/dmp-frontend/src/app/projects/projects.component.ts
+++ b/dmp-frontend/src/app/projects/projects.component.ts
@@ -14,6 +14,9 @@ import { HttpErrorResponse } from '@angular/common/http';
import { FormGroup, FormControl } from '@angular/forms'; //na dw an xreiazontai
import { NgForm } from '@angular/forms';
+import { ProjectTableFilterPipe } from '../pipes/project-table-filter.pipe';
+
+
declare var $ :any;
@Component({
diff --git a/dmp-frontend/src/app/services/rest-base.ts b/dmp-frontend/src/app/services/rest-base.ts
index 2268595ab..e629bdbb6 100644
--- a/dmp-frontend/src/app/services/rest-base.ts
+++ b/dmp-frontend/src/app/services/rest-base.ts
@@ -18,19 +18,19 @@ export class RestBase {
-
+/*
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";//
-
+*/
- /* protocol: string = "http";
+ protocol: string = "http";
hostname: string = "dionysus.di.uoa.gr" ;
port: number = 7070;
- webappname: string = "dmp-backend";*/
+ webappname: string = "dmp-backend";