Merge branch 'master' of git@gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot.git
This commit is contained in:
commit
7ed1b62fff
|
@ -1,7 +1,7 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { PageNotFoundComponent } from './not-found.component';
|
||||
import { EmptyComponent } from './empty.component';
|
||||
import { HomepageComponent } from './homepage/homepage.component';
|
||||
import { DynamicFormComponent } from './form/dynamic-form.component';
|
||||
import { AuthGuard } from './guards/auth.guard';
|
||||
import { ProjectsComponent } from './projects/projects.component';
|
||||
|
@ -22,7 +22,7 @@ const appRoutes: Routes = [
|
|||
{ path: 'dmps', component: DmpComponent},
|
||||
{ path: 'dmp', component: DmpDetailedComponent },
|
||||
{ path: 'workspace', component: UserWorkspaceComponent},
|
||||
{ path: 'welcome', component: EmptyComponent},
|
||||
{ path: 'welcome', component: HomepageComponent},
|
||||
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
||||
{ path: '**', component: PageNotFoundComponent },
|
||||
/*
|
||||
|
|
|
@ -22,7 +22,7 @@ import { DynamicFormGroupComponent } from './form/dynamic-form-group/dynamic-for
|
|||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AuthGuard } from './guards/auth.guard';
|
||||
import { PageNotFoundComponent } from './not-found.component';
|
||||
import { EmptyComponent } from './empty.component';
|
||||
import { HomepageComponent } from './homepage/homepage.component';
|
||||
import { TocComponent } from './form/tableOfContents/toc.component';
|
||||
import { ConfirmationComponent } from './widgets/confirmation/confirmation.component';
|
||||
|
||||
|
@ -85,7 +85,7 @@ import { DmpDetailedComponent } from './viewers/dmp-detailed/dmp-detailed.compon
|
|||
GooggleSignInComponent,
|
||||
MainSignInComponent,
|
||||
PageNotFoundComponent,
|
||||
EmptyComponent,
|
||||
HomepageComponent,
|
||||
ModalComponent,
|
||||
ProjectDetailComponent,
|
||||
ProjectsComponent,
|
||||
|
|
|
@ -45,7 +45,7 @@ export class DmpComponent implements OnInit{
|
|||
showIDs : boolean = false;
|
||||
|
||||
|
||||
dmp : any = null;
|
||||
dmp : any;
|
||||
|
||||
@Input() projectsDropDown:DropdownField;
|
||||
@Input() statusDropDown: DropdownField;
|
||||
|
@ -60,10 +60,9 @@ export class DmpComponent implements OnInit{
|
|||
this.projectsDropDown = new DropdownField();
|
||||
this.projectsDropDown.options = [];
|
||||
this.statusDropDown = new DropdownField();
|
||||
this.statusDropDown.options= [{key:'', value:null},{key:'0', value:"Active"},{key:'1', value:"Inactive"}, {key:'2', value:"Submitted"}, {key:'3', value:"Cancel"}]
|
||||
this.statusDropDown.options= [{key:'', value:null},{key:'0', value:"Active"},{key:'1', value:"Inactive"}]
|
||||
//this.projects = [];
|
||||
|
||||
this.dmp = this.clearDmp();
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,17 +100,12 @@ export class DmpComponent implements OnInit{
|
|||
}
|
||||
)
|
||||
|
||||
}
|
||||
this.clearDmp();
|
||||
|
||||
showDMPDetails(dmp) {
|
||||
console.log("Showing details for dmp : " + JSON.stringify(dmp));
|
||||
// TODO: Add here code to show details of dmp.
|
||||
//1. hide dmp table and show component for detailed dmp
|
||||
//2. also edit the breadcrumb
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
getDmps(muted? : boolean){
|
||||
this.serverService.getDmpOfUser().subscribe(
|
||||
response => {
|
||||
|
@ -198,7 +192,7 @@ export class DmpComponent implements OnInit{
|
|||
|
||||
newDmpForm(item){
|
||||
|
||||
this.dmp = this.clearDmp();
|
||||
this.clearDmp();
|
||||
|
||||
$("#newDmpModal").modal("show");
|
||||
}
|
||||
|
|
|
@ -65,11 +65,11 @@
|
|||
|
||||
<tr *ngFor="let dmp of mf.data" class="hover">
|
||||
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{dmp?.id}}</td>
|
||||
<td class="url-like" (click)="viewDetailedDMP(dmp)">{{dmp?.label}}</td>
|
||||
<td class="url-like" (click)="viewDetailedDMP(dmp)">{{(dmp?.label?.length > 40) ? (dmp?.label | slice:0:40)+'...':(dmp?.label) }}</td>
|
||||
<td style="width:20px;">{{dmp?.version}}</td>
|
||||
<td style="width:300px;">{{dmp?.previous}}</td>
|
||||
<td>{{dmp?.project?.label}}</td>
|
||||
<td>{{(dmp?.description?.length > 20) ? (dmp?.description | slice:0:20)+'...':(dmp?.description) }}</td>
|
||||
<td>{{(dmp?.project?.label?.length > 40) ? (dmp?.project?.label | slice:0:40)+'...':(dmp?.project?.label) }}</td>
|
||||
<td>{{(dmp?.description?.length > 40) ? (dmp?.description | slice:0:40)+'...':(dmp?.description) }}</td>
|
||||
<td>{{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
||||
<td>{{dmp?.status | statusToString }}</td>
|
||||
<td>
|
||||
|
@ -111,14 +111,14 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
||||
<form #dmpForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="label-name" class="form-control-label">Label:</label>
|
||||
<input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label">
|
||||
<input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label" required>
|
||||
</div>
|
||||
<label for="recipient-name" class="col-form-label">Project:</label>
|
||||
<select class="form-control" id="projectsDropDownKey" [ngModel]="dmp?.project" (ngModelChange)="dmp.project=$event" name="projectsDropDown">
|
||||
<select class="form-control" id="projectsDropDownKey" [ngModel]="dmp?.project" (ngModelChange)="dmp.project=$event" name="projectsDropDown" required>
|
||||
<option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -176,7 +176,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
||||
<form #dmpForm="ngForm" (ngSubmit)="SaveNewDmp()">
|
||||
<div class="form-group">
|
||||
<label for="label-name" class="form-control-label">Label:</label>
|
||||
<input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label">
|
||||
|
@ -201,7 +201,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="cloneDMP(dmp);">Save Dmp</button>
|
||||
<button type="submit" class="btn btn-primary" [disabled]="!dmpForm.form.valid" (click)="cloneDMP(dmp);">Save Dmp</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -229,5 +229,3 @@
|
|||
|
||||
<!-- Confirmation module- do not delete -->
|
||||
<confirmation [confirmationID]="'delete-dmp-confirm'" [confirmationTitle]="'Caution'" [confirmationDescr]="'This action will delete this DMP. Are you sure ? This is not revertable !'" (responseSender)="deleteDMP($event)"></confirmation>
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
template: ''
|
||||
})
|
||||
export class EmptyComponent {}
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
<div class="jumbotron">
|
||||
<h1>Hello {{ userInfo?.name!=null ? userInfo?.name : userInfo?.email }}</h1>
|
||||
<p>Welcome {{ userInfo?.created != userInfo?.lastloggedin ? "back" : "" }} to the <a href="https://en.wikipedia.org/wiki/Data_management_plan">Data Management Plans</a> application. </p>
|
||||
<!--
|
||||
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<!--
|
||||
{{userInfo | json}}
|
||||
-->
|
|
@ -0,0 +1,32 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ServerService } from '../../app/services/server.service';
|
||||
|
||||
@Component({
|
||||
selector: 'homepage',
|
||||
templateUrl: './homepage.component.html',
|
||||
styleUrls: ['./homepage.component.css'],
|
||||
providers: []
|
||||
})
|
||||
export class HomepageComponent implements OnInit{
|
||||
|
||||
private userInfo: any;
|
||||
|
||||
constructor(private serverService: ServerService, private route: ActivatedRoute, private router: Router){
|
||||
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.serverService.whoami().subscribe(
|
||||
userInfo => {
|
||||
this.userInfo = userInfo;
|
||||
},
|
||||
error => {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -53,12 +53,12 @@
|
|||
|
||||
<tr *ngFor="let project of mf.data" class="hover">
|
||||
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{project?.id}}</td>
|
||||
<td>{{project?.label}}</td>
|
||||
<td>{{(project?.label?.length > 40) ? (project?.label | slice:0:40)+'...':(project?.label) }}</td>
|
||||
<td>{{project?.abbreviation}}</td>
|
||||
<td>{{project?.startdate | date:'yyyy-MM-dd HH:mm:ss Z' }}</td>
|
||||
<td>{{project?.enddate | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
||||
<td>{{project?.status | statusToString}}</td>
|
||||
<td>{{project?.description}}</td>
|
||||
<td>{{(project?.description?.length > 40) ? (project?.description | slice:0:40)+'...':(project?.description) }}</td>
|
||||
<td>
|
||||
<a [ngClass]="{'not-active': whoami?.id!=project?.creationUser }" class="editGridColumn" (click)="editRow(project, $event)">
|
||||
<i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP" ></i>
|
||||
|
|
|
@ -19,18 +19,17 @@ 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";
|
||||
hostname: string ="dl010.madgik.di.uoa.gr"
|
||||
port: number = 8080;
|
||||
webappname: string = "dmp-backend";
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
protocol: string = "http";
|
||||
hostname: string = "dionysus.di.uoa.gr" ;
|
||||
port: number = 7070;
|
||||
webappname: string = "dmp-backend";
|
||||
protocol: string = "http";
|
||||
hostname: string = "dionysus.di.uoa.gr" ;
|
||||
port: number = 7070;
|
||||
webappname: string = "dmp-backend";
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<p>
|
||||
dmp-detailed works!
|
||||
Under construction
|
||||
</p>
|
||||
|
|
|
@ -7,10 +7,12 @@ import { Component, OnInit } from '@angular/core';
|
|||
})
|
||||
export class DmpDetailedComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue