Changes on model.. added a sliding bar
This commit is contained in:
parent
92df56730c
commit
c308afead9
|
@ -594,6 +594,58 @@
|
||||||
"resolved": "https://registry.npmjs.org/angular2-draggable/-/angular2-draggable-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/angular2-draggable/-/angular2-draggable-1.0.7.tgz",
|
||||||
"integrity": "sha1-NeH4HIzPPdljDyMmVYuILMEvDyk="
|
"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": {
|
"ansi-escapes": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz",
|
||||||
|
@ -5433,6 +5485,11 @@
|
||||||
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
|
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
|
||||||
"dev": true
|
"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": {
|
"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",
|
||||||
|
|
|
@ -26,10 +26,12 @@
|
||||||
"angular-google-signin": "^0.1.5",
|
"angular-google-signin": "^0.1.5",
|
||||||
"angular2-datatable": "^0.6.0",
|
"angular2-datatable": "^0.6.0",
|
||||||
"angular2-draggable": "^1.0.7",
|
"angular2-draggable": "^1.0.7",
|
||||||
|
"angular2-number-picker": "^0.8.8",
|
||||||
"bootstrap": "^3.3.7",
|
"bootstrap": "^3.3.7",
|
||||||
"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",
|
||||||
|
"ng-sidebar": "^6.0.4",
|
||||||
"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"
|
||||||
|
|
|
@ -35,3 +35,104 @@
|
||||||
.cursor{
|
.cursor{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.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;}
|
||||||
|
}
|
||||||
|
|
|
@ -1,25 +1,24 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
|
||||||
<nav class="navbar navbar-default">
|
<nav class="navbar navbar-default">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
|
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
<div class="collapse navbar-collapse">
|
||||||
<div class="nav navbar-nav">
|
|
||||||
|
|
||||||
|
<div class="nav navbar-nav navbar-left" >
|
||||||
|
<button class="btn btn-primary navbar-btn navbar-left" [ngClass]="{true:'visible', false:'invisible'}[tokenService.isLoggedIn() == true]" (click)='slideNav()'>
|
||||||
|
<span style="font-size:20px;cursor:pointer" >☰</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-left">
|
|
||||||
|
|
||||||
</div>
|
<h3 class="navbar-title">Data Management Plans Creator</h3>
|
||||||
<div class="navbar-center">
|
|
||||||
<h3>Data Management Plans Creator</h3>
|
|
||||||
</div>
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">
|
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Quick links <span class="caret"></span></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Quick links <span class="caret"></span></a>
|
||||||
|
@ -39,17 +38,29 @@
|
||||||
</div><!-- /.container-fluid -->
|
</div><!-- /.container-fluid -->
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<router-outlet [ngClass]="{true:'visible'}[tokenService.isLoggedIn() == true]" ></router-outlet>
|
</div>
|
||||||
|
|
||||||
|
<div class="parent_div">
|
||||||
|
|
||||||
|
<div id="appSidebar" class="sidenav child_div">
|
||||||
|
<!--<a href="javascript:void(0)" class="closebtn" (click)='slideNav()'>×</a>-->
|
||||||
|
<a href="#">About</a>
|
||||||
|
<a href="#">Services</a>
|
||||||
|
<a href="#">Clients</a>
|
||||||
|
<a href="#">Contact</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="appBody" class="child_div">
|
||||||
|
|
||||||
|
<router-outlet [ngClass]="{true:'visible'}[tokenService.isLoggedIn() == true]" ></router-outlet>
|
||||||
<!--
|
<!--
|
||||||
<main-window [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"></main-window>
|
<main-window [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"></main-window>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!--this should be invisible -->
|
<!--this should be invisible -->
|
||||||
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
|
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
|
@ -6,6 +6,7 @@ import { TokenService, TokenProvider } from './services/login/token.service';
|
||||||
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
||||||
|
|
||||||
|
declare var $ :any;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
|
@ -16,6 +17,7 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
fields: any[];
|
fields: any[];
|
||||||
|
|
||||||
|
sliderExpanded : boolean = false;
|
||||||
|
|
||||||
constructor(private tokenService : TokenService, private router: Router) {
|
constructor(private tokenService : TokenService, private router: Router) {
|
||||||
|
|
||||||
|
@ -23,11 +25,20 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
slideNav(){
|
||||||
|
|
||||||
|
$("#appSidebar").toggleClass("expanded");
|
||||||
|
$("#appBody").toggleClass("expanded");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//loggedInAs : string = null;
|
//loggedInAs : string = null;
|
||||||
|
|
||||||
showLogin : boolean = false;
|
showLogin : boolean = false;
|
||||||
|
|
|
@ -22,12 +22,12 @@ 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 { TocComponent } from './form/tableOfContents/toc.component';
|
import { TocComponent } from './form/tableOfContents/toc.component';
|
||||||
import { ProjectsModule } from './projects/project.module';
|
|
||||||
import { PaginationService } from './services/pagination.service';
|
import { PaginationService } from './services/pagination.service';
|
||||||
import { EestoreService } from './services/eestore.service';
|
import { EestoreService } from './services/eestore.service';
|
||||||
import { GlobalInterceptor } from './services/interceptor';
|
import { GlobalInterceptor } from './services/interceptor';
|
||||||
import { DatasetsModule } from './datasets/dataset.module';
|
|
||||||
import { DmpModule } from './dmps/dmp.module';
|
|
||||||
import { TabModule } from './tabs/tab.module';
|
import { TabModule } from './tabs/tab.module';
|
||||||
import { AngularDraggableModule } from 'angular2-draggable';
|
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 { 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({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
@ -45,10 +72,21 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
DynamicFormFieldComponent,
|
DynamicFormFieldComponent,
|
||||||
DynamicFormGroupComponent,
|
DynamicFormGroupComponent,
|
||||||
TocComponent,
|
TocComponent,
|
||||||
//LoginComponent,
|
|
||||||
GooggleSignInComponent,
|
GooggleSignInComponent,
|
||||||
MainSignInComponent,
|
MainSignInComponent,
|
||||||
PageNotFoundComponent
|
PageNotFoundComponent,
|
||||||
|
ModalComponent,
|
||||||
|
ProjectDetailComponent,
|
||||||
|
ProjectsComponent,
|
||||||
|
DmpComponent,
|
||||||
|
DatasetsComponent,
|
||||||
|
|
||||||
|
ProjectTableFilterPipe,
|
||||||
|
DmpVersionFilterPipe,
|
||||||
|
DmpTableFilterPipe,
|
||||||
|
DatasetTableFilterPipe,
|
||||||
|
DatasetStatusFilterPipe,
|
||||||
|
StatusToString
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
@ -57,12 +95,14 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
HttpModule,
|
HttpModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
TabModule,
|
TabModule,
|
||||||
ProjectsModule,
|
DmpRoutingModule,
|
||||||
DmpModule,
|
CommonModule,
|
||||||
DatasetsModule,
|
DatasetRoutingModule,
|
||||||
|
ProjectRoutingModule,
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
AngularDraggableModule,
|
AngularDraggableModule,
|
||||||
DataTableModule
|
DataTableModule,
|
||||||
|
SidebarModule.forRoot()
|
||||||
|
|
||||||
],
|
],
|
||||||
providers: [{
|
providers: [{
|
||||||
|
@ -71,7 +111,6 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
ServerService, dataModelBuilder, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService
|
ServerService, dataModelBuilder, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService
|
||||||
|
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,10 +5,10 @@ import { ServerService } from '../../app/services/server.service';
|
||||||
import { Project } from '../entities/model/project';
|
import { Project } from '../entities/model/project';
|
||||||
import { Dataset } from '../entities/model/dataset';
|
import { Dataset } from '../entities/model/dataset';
|
||||||
import { Dmp } from '../entities/model/dmp';
|
import { Dmp } from '../entities/model/dmp';
|
||||||
//import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
|
||||||
import {DataTable} from 'angular2-datatable';
|
import {DataTable} from 'angular2-datatable';
|
||||||
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
|
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
|
||||||
import { Param } from '../entities/model/param';
|
import { Param } from '../entities/model/param';
|
||||||
|
import { StatusToString } from '../pipes/various/status-to-string';
|
||||||
|
|
||||||
declare var $: any;
|
declare var $: any;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-striped" [mfData]="tableData | datasetTableFilter : filterQuery | datasetstatusFilter: statusFilter" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
|
<table class="table table-striped" [mfData]="tableData | datasetTableFilter : filterQuery | datasetstatusFilter: statusFilter" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
|
||||||
[(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
[(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="1">
|
<th colspan="1">
|
||||||
|
@ -35,18 +37,21 @@
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
<mfDefaultSorter by="created">Created at</mfDefaultSorter>
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter>Actions </mfDefaultSorter>
|
Actions
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="grayout-empty-table" *ngIf="!mf.data[0]">
|
<tr class="grayout-empty-table" *ngIf="!mf.data[0]">
|
||||||
<td colspan="5">No elements</td>
|
<td colspan="7">No elements</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr *ngFor="let dataset of mf.data" class="hover">
|
<tr *ngFor="let dataset of mf.data" class="hover">
|
||||||
|
@ -55,7 +60,8 @@
|
||||||
<td>{{dataset?.uri}}</td>
|
<td>{{dataset?.uri}}</td>
|
||||||
<td>{{dataset?.profile?.label}}</td>
|
<td>{{dataset?.profile?.label}}</td>
|
||||||
<td>{{dataset?.description}}</td>
|
<td>{{dataset?.description}}</td>
|
||||||
<td>{{dataset?.status}}</td>
|
<td>{{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</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" 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>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/*
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
@ -5,6 +6,7 @@ import {DataTableModule} from 'angular2-datatable';
|
||||||
import { DatasetTableFilterPipe } from '../pipes/dataset-table-filter.pipe';
|
import { DatasetTableFilterPipe } from '../pipes/dataset-table-filter.pipe';
|
||||||
import { DatasetStatusFilterPipe } from '../pipes/dataset-status-filter.pipe';
|
import { DatasetStatusFilterPipe } from '../pipes/dataset-status-filter.pipe';
|
||||||
|
|
||||||
|
|
||||||
import { DatasetsComponent } from './dataset.component';
|
import { DatasetsComponent } from './dataset.component';
|
||||||
|
|
||||||
import { DatasetRoutingModule } from './dataset-routing.module';
|
import { DatasetRoutingModule } from './dataset-routing.module';
|
||||||
|
@ -19,6 +21,7 @@ import { DatasetRoutingModule } from './dataset-routing.module';
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
DatasetsComponent,
|
DatasetsComponent,
|
||||||
|
StatusToString,
|
||||||
DatasetTableFilterPipe,
|
DatasetTableFilterPipe,
|
||||||
DatasetStatusFilterPipe
|
DatasetStatusFilterPipe
|
||||||
//ProjectDetailComponent
|
//ProjectDetailComponent
|
||||||
|
@ -29,3 +32,5 @@ import { DatasetRoutingModule } from './dataset-routing.module';
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class DatasetsModule {}
|
export class DatasetsModule {}
|
||||||
|
|
||||||
|
*/
|
|
@ -5,7 +5,7 @@ import { ServerService } from '../../app/services/server.service';
|
||||||
import { Dmp } from '../entities/model/dmp';
|
import { Dmp } from '../entities/model/dmp';
|
||||||
import { Dataset } from '../entities/model/dataset';
|
import { Dataset } from '../entities/model/dataset';
|
||||||
import { Project } from '../entities/model/project';
|
import { Project } from '../entities/model/project';
|
||||||
//import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
|
||||||
import {DataTable} from 'angular2-datatable';
|
import {DataTable} from 'angular2-datatable';
|
||||||
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
|
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
|
||||||
import { Param } from '../entities/model/param';
|
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 { FormGroup, FormControl } from '@angular/forms'; //na dw an xreiazontai
|
||||||
import { NgForm } from '@angular/forms';
|
import { NgForm } from '@angular/forms';
|
||||||
import { DatasetsComponent } from '../datasets/dataset.component';
|
import { DatasetsComponent } from '../datasets/dataset.component';
|
||||||
|
import { StatusToString } from '../pipes/various/status-to-string';
|
||||||
|
|
||||||
declare var $ :any;
|
declare var $ :any;
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ export class DmpComponent implements OnInit{
|
||||||
showIDs : boolean = false;
|
showIDs : boolean = false;
|
||||||
// END ALTERNATIVE
|
// END ALTERNATIVE
|
||||||
|
|
||||||
//@Input() dmps: Dmp[];
|
|
||||||
dmp:any;
|
dmp:any;
|
||||||
@Input() dmpTableVisible: boolean;
|
@Input() dmpTableVisible: boolean;
|
||||||
@Input() dmpCount = 0;
|
@Input() dmpCount = 0;
|
||||||
|
@ -60,12 +61,7 @@ export class DmpComponent implements OnInit{
|
||||||
dmpIdforDatasets: string;
|
dmpIdforDatasets: string;
|
||||||
dmpLabelforDatasets:string;
|
dmpLabelforDatasets:string;
|
||||||
@ViewChild(DatasetsComponent) datasetsComponent:DatasetsComponent;
|
@ViewChild(DatasetsComponent) datasetsComponent:DatasetsComponent;
|
||||||
/*dmpResource :DataTableResource<Dmp>;
|
|
||||||
|
|
||||||
@ViewChild(DataTable) dmpsTable;
|
|
||||||
@ViewChild(DataTable) datasetsTable;
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
@ViewChild('isignOutBtn') isignOutBtn;
|
@ViewChild('isignOutBtn') isignOutBtn;
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -75,13 +71,13 @@ export class DmpComponent implements OnInit{
|
||||||
this.projectsDropDown = new DropdownField();
|
this.projectsDropDown = new DropdownField();
|
||||||
this.projectsDropDown.options = [];
|
this.projectsDropDown.options = [];
|
||||||
this.statusDropDown = new DropdownField();
|
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.projects = [];
|
||||||
this.dmpTableVisible = false;
|
this.dmpTableVisible = false;
|
||||||
this.dataSetVisibe = false;
|
this.dataSetVisibe = false;
|
||||||
|
|
||||||
this.dmp = {
|
this.dmp = {
|
||||||
id:null,
|
id: null,
|
||||||
label: '',
|
label: '',
|
||||||
previous:'',
|
previous:'',
|
||||||
version:'',
|
version:'',
|
||||||
|
@ -92,7 +88,7 @@ export class DmpComponent implements OnInit{
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//this.projects = this.serverService.getDummyProjects();
|
|
||||||
this.serverService.getDmpOfUser().subscribe(
|
this.serverService.getDmpOfUser().subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.tableData = response;
|
this.tableData = response;
|
||||||
|
@ -104,7 +100,6 @@ export class DmpComponent implements OnInit{
|
||||||
|
|
||||||
this.serverService.getAllProjects().subscribe(
|
this.serverService.getAllProjects().subscribe(
|
||||||
response => {
|
response => {
|
||||||
console.log(response);
|
|
||||||
//let params = new Param();
|
//let params = new Param();
|
||||||
response.forEach((dmp) => {
|
response.forEach((dmp) => {
|
||||||
let params = new Param();
|
let params = new Param();
|
||||||
|
@ -150,11 +145,9 @@ newDMP(){
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDMP(){
|
updateDMP(){
|
||||||
console.log(this.dmp, this.dmp.projectsDropDownKey);
|
|
||||||
|
|
||||||
this.dmp.project = {"id":this.dmp.project};
|
this.dmp.project = {"id":this.dmp.project};
|
||||||
|
|
||||||
|
|
||||||
this.serverService.updateDmp(this.dmp)
|
this.serverService.updateDmp(this.dmp)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
response =>{
|
response =>{
|
||||||
|
@ -167,7 +160,6 @@ updateDMP(){
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveDmp(){
|
SaveDmp(){
|
||||||
debugger;
|
|
||||||
if (this.dmp.id == null)
|
if (this.dmp.id == null)
|
||||||
this.newDMP();
|
this.newDMP();
|
||||||
else
|
else
|
||||||
|
@ -220,6 +212,7 @@ newDmp(item){
|
||||||
// this.dmp.profile = "";
|
// this.dmp.profile = "";
|
||||||
this.dmp.profileData = "";
|
this.dmp.profileData = "";
|
||||||
this.dmp.project = "";
|
this.dmp.project = "";
|
||||||
|
|
||||||
$("#newDmpModal").modal("show");
|
$("#newDmpModal").modal("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/*
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
@ -27,3 +28,5 @@ import { DatasetsModule } from '../datasets/dataset.module';
|
||||||
providers: [ ]
|
providers: [ ]
|
||||||
})
|
})
|
||||||
export class DmpModule {}
|
export class DmpModule {}
|
||||||
|
|
||||||
|
*/
|
|
@ -10,23 +10,19 @@
|
||||||
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
|
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
|
||||||
</th>
|
</th>
|
||||||
<th colspan="1">
|
<th colspan="1">
|
||||||
<input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' />
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<button class="btn btn-default " (click)="getDmps()">
|
<button class="btn btn-default " (click)="getDmps()">
|
||||||
<span class="glyphicon glyphicon-refresh"></span>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
</button>
|
</button>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
<th class = "rowFilterTopBorder" colspan="3">
|
||||||
<tr>
|
|
||||||
<th class = "rowFilterTopBorder">
|
|
||||||
<button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo">More filters</button>
|
<button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo">More filters</button>
|
||||||
<div id="demo" class="collapse">
|
<div id="demo" class="collapse">
|
||||||
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
|
<input type="number" [(ngModel)]="versionFilter" placeholder='Version'/>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th [ngClass]="{true:'visible', false:'invisible'}[showIDs]">
|
<th [ngClass]="{true:'visible', false:'invisible'}[showIDs]">
|
||||||
<mfDefaultSorter by="id">ID</mfDefaultSorter>
|
<mfDefaultSorter by="id">ID</mfDefaultSorter>
|
||||||
|
@ -46,11 +42,14 @@
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
<mfDefaultSorter by="created">Created at</mfDefaultSorter>
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<mfDefaultSorter>Actions </mfDefaultSorter>
|
Actions
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -61,13 +60,14 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr *ngFor="let dmp of mf.data" class="hover">
|
<tr *ngFor="let dmp of mf.data" class="hover">
|
||||||
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{dmp.id}}</td>
|
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{dmp?.id}}</td>
|
||||||
<td>{{dmp?.label}}</td>
|
<td>{{dmp?.label}}</td>
|
||||||
<td>{{dmp?.version}}</td>
|
<td>{{dmp?.version}}</td>
|
||||||
<td>{{dmp?.previous}}</td>
|
<td>{{dmp?.previous}}</td>
|
||||||
<td>{{dmp?.project?.label}}</td>
|
<td>{{dmp?.project?.label}}</td>
|
||||||
<td>{{dmp?.description}}</td>
|
<td>{{dmp?.description}}</td>
|
||||||
<td>{{dmp?.status}}</td>
|
<td>{{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</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" title="delete DMP"></i>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5">
|
<td colspan="7">
|
||||||
<button type="button" class="btn btn-info btncustom" (click)="newDmp(item)">New Dmp</button>
|
<button type="button" class="btn btn-info btncustom" (click)="newDmp(item)">New Dmp</button>
|
||||||
<mfBootstrapPaginator [rowsOnPageSet]="[5,20,40]"></mfBootstrapPaginator>
|
<mfBootstrapPaginator [rowsOnPageSet]="[5,20,40]"></mfBootstrapPaginator>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,6 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
<h2>HEROES</h2>
|
|
||||||
<div *ngIf="project">
|
<div *ngIf="project">
|
||||||
<h3>"{{ project.name }}"</h3>
|
<h3>"{{ project.name }}"</h3>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<meta name="google-signin-client_id" content="524432312250-vhgidft856v8qftsc81kls4c74v87d8o.apps.googleusercontent.com">
|
<meta name="google-signin-client_id" content="524432312250-vhgidft856v8qftsc81kls4c74v87d8o.apps.googleusercontent.com">
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-striped" [mfData]="tableData | projectTableFilter : filterQuery"
|
<table class="table table-striped" [mfData]="tableData | projectTableFilter : filterQuery"
|
||||||
#mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
#mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/*
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
@ -28,3 +29,5 @@ import { ModalComponent } from '../modal/modal.component';
|
||||||
providers: [ ]
|
providers: [ ]
|
||||||
})
|
})
|
||||||
export class ProjectsModule {}
|
export class ProjectsModule {}
|
||||||
|
|
||||||
|
*/
|
|
@ -14,6 +14,9 @@ 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 { ProjectTableFilterPipe } from '../pipes/project-table-filter.pipe';
|
||||||
|
|
||||||
|
|
||||||
declare var $ :any;
|
declare var $ :any;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -18,19 +18,19 @@ 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";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue