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",
|
||||
"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",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -35,3 +35,104 @@
|
|||
.cursor{
|
||||
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,55 +1,66 @@
|
|||
|
||||
<div>
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
|
||||
<div class="navbar-header">
|
||||
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse">
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<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">
|
||||
<h3 class="navbar-title">Data Management Plans Creator</h3>
|
||||
|
||||
</div>
|
||||
<div class="navbar-center">
|
||||
<h3>Data Management Plans Creator</h3>
|
||||
</div>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<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>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"><a>{{tokenService.getEmail()}}</a></li>
|
||||
<li class="cursor" [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]" (click)="logout()"><a>Logout</a></li>
|
||||
<li class="cursor" [ngClass]="{true:'invisible'}[tokenService.isLoggedIn() == true]" (click)="login()" ><a>Login</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<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>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"><a>{{tokenService.getEmail()}}</a></li>
|
||||
<li class="cursor" [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]" (click)="logout()"><a>Logout</a></li>
|
||||
<li class="cursor" [ngClass]="{true:'invisible'}[tokenService.isLoggedIn() == true]" (click)="login()" ><a>Login</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
|
||||
</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>
|
||||
-->
|
||||
|
||||
|
||||
<!--this should be invisible -->
|
||||
<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 { 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;
|
||||
|
|
|
@ -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]
|
||||
})
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
|
||||
<table class="table table-striped" [mfData]="tableData | datasetTableFilter : filterQuery | datasetstatusFilter: statusFilter" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
|
||||
[(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="1">
|
||||
|
@ -36,17 +38,20 @@
|
|||
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
||||
</th>
|
||||
<th>
|
||||
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
||||
</th>
|
||||
<mfDefaultSorter by="created">Created at</mfDefaultSorter>
|
||||
</th>
|
||||
<th>
|
||||
<mfDefaultSorter>Actions </mfDefaultSorter>
|
||||
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
||||
</th>
|
||||
<th>
|
||||
Actions
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="grayout-empty-table" *ngIf="!mf.data[0]">
|
||||
<td colspan="5">No elements</td>
|
||||
<td colspan="7">No elements</td>
|
||||
</tr>
|
||||
|
||||
<tr *ngFor="let dataset of mf.data" class="hover">
|
||||
|
@ -55,7 +60,8 @@
|
|||
<td>{{dataset?.uri}}</td>
|
||||
<td>{{dataset?.profile?.label}}</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>
|
||||
<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>
|
||||
|
|
|
@ -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
|
||||
|
@ -29,3 +32,5 @@ import { DatasetRoutingModule } from './dataset-routing.module';
|
|||
]
|
||||
})
|
||||
export class DatasetsModule {}
|
||||
|
||||
*/
|
|
@ -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<Dmp>;
|
||||
|
||||
@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,11 +145,9 @@ newDMP(){
|
|||
}
|
||||
|
||||
updateDMP(){
|
||||
console.log(this.dmp, this.dmp.projectsDropDownKey);
|
||||
|
||||
this.dmp.project = {"id":this.dmp.project};
|
||||
|
||||
|
||||
this.serverService.updateDmp(this.dmp)
|
||||
.subscribe(
|
||||
response =>{
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/*
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
@ -27,3 +28,5 @@ import { DatasetsModule } from '../datasets/dataset.module';
|
|||
providers: [ ]
|
||||
})
|
||||
export class DmpModule {}
|
||||
|
||||
*/
|
|
@ -10,23 +10,19 @@
|
|||
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
|
||||
</th>
|
||||
<th colspan="1">
|
||||
<input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' />
|
||||
</th>
|
||||
<th>
|
||||
<button class="btn btn-default " (click)="getDmps()">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
</button>
|
||||
</button>
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th class = "rowFilterTopBorder">
|
||||
<th class = "rowFilterTopBorder" colspan="3">
|
||||
<button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo">More filters</button>
|
||||
<div id="demo" class="collapse">
|
||||
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
|
||||
<input type="number" [(ngModel)]="versionFilter" placeholder='Version'/>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th [ngClass]="{true:'visible', false:'invisible'}[showIDs]">
|
||||
<mfDefaultSorter by="id">ID</mfDefaultSorter>
|
||||
|
@ -46,11 +42,14 @@
|
|||
<th>
|
||||
<mfDefaultSorter by="description">Description</mfDefaultSorter>
|
||||
</th>
|
||||
<th>
|
||||
<mfDefaultSorter by="created">Created at</mfDefaultSorter>
|
||||
</th>
|
||||
<th>
|
||||
<mfDefaultSorter by="status">Status</mfDefaultSorter>
|
||||
</th>
|
||||
<th>
|
||||
<mfDefaultSorter>Actions </mfDefaultSorter>
|
||||
Actions
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
|
@ -61,13 +60,14 @@
|
|||
</tr>
|
||||
|
||||
<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?.version}}</td>
|
||||
<td>{{dmp?.previous}}</td>
|
||||
<td>{{dmp?.project?.label}}</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>
|
||||
<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>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<td colspan="7">
|
||||
<button type="button" class="btn btn-info btncustom" (click)="newDmp(item)">New Dmp</button>
|
||||
<mfBootstrapPaginator [rowsOnPageSet]="[5,20,40]"></mfBootstrapPaginator>
|
||||
</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({
|
||||
template: `
|
||||
<h2>HEROES</h2>
|
||||
<div *ngIf="project">
|
||||
<h3>"{{ project.name }}"</h3>
|
||||
<div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<meta name="google-signin-client_id" content="524432312250-vhgidft856v8qftsc81kls4c74v87d8o.apps.googleusercontent.com">
|
||||
|
||||
|
||||
<table class="table table-striped" [mfData]="tableData | projectTableFilter : filterQuery"
|
||||
#mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
|
||||
<thead>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/*
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
@ -28,3 +29,5 @@ import { ModalComponent } from '../modal/modal.component';
|
|||
providers: [ ]
|
||||
})
|
||||
export class ProjectsModule {}
|
||||
|
||||
*/
|
|
@ -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({
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue