no message

This commit is contained in:
Ioannis Kalyvas 2018-07-23 17:01:27 +03:00
parent c25c9d72cf
commit 29884ab016
23 changed files with 89 additions and 85 deletions

View File

@ -4,24 +4,22 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,

View File

@ -68,7 +68,7 @@ const appRoutes: Routes = [
path: '',
redirectTo: '/welcome',
data: {
breadcrumbs: true
breadcrumbs: false
},
pathMatch: 'full'
},
@ -94,7 +94,7 @@ const appRoutes: Routes = [
path: "welcome",
component: WelcomepageComponent,
data: {
breadcrumb: true
breadcrumb: false
},
},
{

View File

@ -9,7 +9,9 @@
<help-content position="left"></help-content>
</div>
<div class="col-md-8">
<app-breadcrumb *ngIf="this.isAuthenticated() && (hasBreadCrumb | async)"></app-breadcrumb>
<h4>
<app-breadcrumb *ngIf="this.isAuthenticated() && (hasBreadCrumb | async)"></app-breadcrumb>
</h4>
<router-outlet (activate)='onActivate($event)' (deactivate)='onDeactivate($event)'></router-outlet>
</div>
<div class="col-md-2">

View File

@ -1,6 +1,6 @@
<div class="dataset-wizard">
<h3 *ngIf="isNew">New {{datasetWizardModel?.dmp?.project?.label}} Dataset</h3>
<h3 *ngIf="!isNew">{{datasetWizardModel?.dmp?.project?.label}} Dataset</h3>
<h3 *ngIf="isNew">New Dataset</h3>
<h3 *ngIf="!isNew">{{datasetWizardModel.label}} Dataset</h3>
<div class="flex-container">
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"

View File

@ -48,3 +48,7 @@
mat-card-title.thick {
font-weight: bold;
}
h3{
margin-top: 0px;
}

View File

@ -153,13 +153,7 @@ export class DatasetWizardComponent implements OnInit, IBreadCrumbComponent {
url: "/dmps/edit/" + this.datasetWizardModel.dmp.id,
},
]
},
{
parentComponentName: null,
label: this.datasetWizardModel.label,
url: "/datasets/" + this.datasetWizardModel.id
}
])
}])
this.formGroup = this.datasetWizardModel.buildForm();
this.loadDatasetProfiles();
});
@ -189,11 +183,6 @@ export class DatasetWizardComponent implements OnInit, IBreadCrumbComponent {
label: this.datasetWizardModel.dmp.label,
url: "/dmps/edit/" + this.datasetWizardModel.dmp.id,
}]
},
{
parentComponentName: null,
label: "New Dataset",
url: "/datasets/new"
}])
});
});

View File

@ -1,4 +1,4 @@
<div class="container-fluid">
<div>
<h3>{{'DATASET-LISTING.TITLE' | translate}} {{titlePrefix}}</h3>

View File

@ -22,7 +22,7 @@
cursor: pointer;
}
mat-row:hover {
mat-row:hover {
background-color: lightgray;
}
@ -32,4 +32,8 @@ mat-row:hover {
mat-row:nth-child(odd){
background-color:#eef0fb;
}
}
h3{
margin-top: 0px;
}

View File

@ -63,11 +63,11 @@ export class DatasetListingComponent implements OnInit, IBreadCrumbComponent {
this.criteria.setRefreshCallback(() => this.refresh());
if (this.dmpId != null) {
let dmp = await this.dataManagementPlanService.getSingle(this.dmpId).toPromise()
this.breadCrumbs = Observable.of([{ parentComponentName: "DataManagementPlanEditorComponent", label: dmp.label, url: "dmps/edit/" + this.dmpId }, { parentComponentName: null, label: 'Datasets', url: "dmps" }])
this.breadCrumbs = Observable.of([{ parentComponentName: "DataManagementPlanEditorComponent", label: dmp.label, url: "dmps/edit/" + this.dmpId }])
if (params['dmpLabel'] != undefined)
this.titlePrefix = "for " + params['dmpLabel'];
} else {
this.breadCrumbs = Observable.of([{ parentComponentName: null, label: 'Datasets', url: "datasets" }])
this.breadCrumbs = Observable.of([])
}
});
}

View File

@ -32,4 +32,8 @@
.description-area {
height: 100px;
}
}
}
h3{
margin-top: 0px;
}

View File

@ -106,12 +106,8 @@ export class DataManagementPlanEditorComponent implements AfterViewInit, IBreadC
label: 'DMPs',
url: "dmps",
notFoundResolver: [await this.projectService.getSingle(this.dataManagementPlan.project.id).map(x => ({ label: x.label, url: '/projects/edit/' + x.id }) as BreadcrumbItem).toPromise()]
},
{
parentComponentName: null,
label: this.dataManagementPlan.label,
url: "/dmps/edit/" + this.dataManagementPlan.id
}]
}
]
)
this.associatedUsers = data.associatedUsers;
});
@ -127,12 +123,8 @@ export class DataManagementPlanEditorComponent implements AfterViewInit, IBreadC
parentComponentName: "DataManagementPlanListingComponent",
label: 'DMPs',
url: "dmps",
},
{
parentComponentName: null,
label: "New DMP",
url: "/dmps/new"
}])
}
])
});
}

View File

@ -1,4 +1,4 @@
<div class="container-fluid">
<div>
<h3>{{'DMP-LISTING.TITLE' | translate}} {{titlePrefix}}</h3>
<app-dmp-criteria-component [showProject]="showProject"></app-dmp-criteria-component>

View File

@ -22,10 +22,14 @@
cursor: pointer;
}
mat-row:hover {
mat-row:hover {
background-color: lightgray;
}
mat-row:nth-child(odd){
background-color:#eef0fb;
}
}
h3{
margin-top: 0px;
}

View File

@ -62,7 +62,7 @@ export class DataManagementPlanListingComponent implements OnInit, IBreadCrumbCo
this.criteria.setCriteria({ like: null, projects: [project], groupIds: null, allVersions: false })
this.refresh();
projectLabel = this.route.snapshot.queryParams.projectLabel
this.breadCrumbs = Observable.of([{ parentComponentName: "ProjectEditorComponent", label: projectLabel, url: "/projects/edit/" + this.projectId }, { parentComponentName: null, label: 'DMPs', url: "/dmps/project/" + this.projectId, params: { projectLabel: projectLabel } }])
this.breadCrumbs = Observable.of([{ parentComponentName: "ProjectEditorComponent", label: projectLabel, url: "/projects/edit/" + this.projectId }])
this.criteria.setRefreshCallback(() => this.refresh());
} else {
this.itemId = params['groupId'];
@ -71,9 +71,11 @@ export class DataManagementPlanListingComponent implements OnInit, IBreadCrumbCo
if (this.itemId) {
let dmplabel = this.route.snapshot.queryParams.groupLabel
breadCrumbs.push({ parentComponentName: null, label: 'DMPs', url: "/dmps" }, { parentComponentName: null, label: 'DMPs Versions Of ' + dmplabel, url: "/dmps/viewversions/" + this.itemId })
breadCrumbs.push(
{ parentComponentName: null, label: 'DMPs', url: "/dmps" },
)
}
else breadCrumbs.push({ parentComponentName: null, label: 'DMPs', url: "/dmps" })
//else breadCrumbs.push({ parentComponentName: null, label: 'DMPs', url: "/dmps" })
this.breadCrumbs = Observable.of(breadCrumbs)
this.criteria.setCriteria(this.getDefaultCriteria());

View File

@ -41,4 +41,8 @@
.description-area {
height: 100px;
}
}
}
h3{
margin-top: 0px;
}

View File

@ -59,11 +59,14 @@ export class ProjectEditorComponent implements OnInit, IBreadCrumbComponent {
.subscribe(data => {
this.project = JsonSerializer.fromJSONObject(data, ProjectModel);
this.formGroup = this.project.buildForm(null, this.project.type == ProjectType.External || !this.editMode);
this.breadCrumbs = Observable.of([{ parentComponentName: "ProjectListingComponent", label: 'Projects', url: "/projects" }, { parentComponentName: null, label: this.project.label, url: "/projects/edit/" + this.project.id }])
this.breadCrumbs = Observable.of([
{ parentComponentName: "ProjectListingComponent", label: 'Projects', url: "/projects" },
])
});
} else {
this.breadCrumbs = Observable.of([{ parentComponentName: "ProjectListingComponent", label: 'Projects', url: "/projects" }, { parentComponentName: null, label: "Project New", url: "/projects/new" }])
this.breadCrumbs = Observable.of([
{ parentComponentName: "ProjectListingComponent", label: 'Projects', url: "/projects" },
])
this.project = new ProjectModel();
setTimeout(() => {
this.formGroup = this.project.buildForm();

View File

@ -1,4 +1,4 @@
<div class="container-fluid">
<div>
<h3>{{languageResolverService.getBy('listingTitle') | translate}}</h3>
<app-projects-criteria-component></app-projects-criteria-component>

View File

@ -2,7 +2,9 @@
margin: 24px;
}
h3{
margin-top: 0px;
}
.mat-fab-bottom-right {
top: auto !important;
right: 20px !important;
@ -23,10 +25,10 @@
cursor: pointer;
}
mat-row:hover {
mat-row:hover {
background-color: lightgray;
}
mat-row:nth-child(odd){
background-color:#eef0fb;
}
}

View File

@ -44,7 +44,7 @@ export class ProjectListingComponent implements OnInit, IBreadCrumbComponent {
}
ngOnInit() {
this.breadCrumbs = Observable.of([{ parentComponentName: null, label: 'Projects', url: "/projects" }])
this.breadCrumbs = Observable.of([])
this.criteria.setCriteria(this.getDefaultCriteria());
this.refresh();

View File

@ -1,16 +1,13 @@
<mat-card>
<mat-card-content aria-label="breadcrumb">
<ol class="no-style" fxLayout="row">
<div fxFlex="nogrow" *ngFor="let breadcrumb of buildBreadCrumb(this.activatedRoute) | async ; let i = index; let length = count ">
<div fxLayout="row">
<li fxFlex="nogrow">
<a [routerLink]="[breadcrumb.url]" [queryParams]="breadcrumb.params">
{{ breadcrumb.label }}
</a>
</li>
<mat-icon fxFlex="nogrow" *ngIf="length > 1 && i != ( length - 1 )">chevron_right</mat-icon>
</div>
</div>
</ol>
</mat-card-content>
</mat-card>
<ol class="no-style" fxLayout="row" fxLayoutAlign="start center">
<div fxFlex="nogrow" *ngFor="let breadcrumb of buildBreadCrumb(this.activatedRoute) | async ; let i = index; let length = count ">
<div fxLayout="row">
<li fxFlex="nogrow">
<a [routerLink]="[breadcrumb.url]" [queryParams]="breadcrumb.params">
{{ breadcrumb.label }}
</a>
</li>
<mat-icon fxFlex="nogrow">chevron_right</mat-icon>
</div>
</div>
</ol>

View File

@ -2,4 +2,6 @@ ol.no-style {
li {
list-style-type: none;
}
padding-left: 0px
}

View File

@ -30,7 +30,6 @@ export class BreadcrumbComponent implements OnInit {
}
buildBreadCrumb(route: ActivatedRoute): Observable<BreadcrumbItem[]> {
return this.breadCrumbService.resolve(route).map(x => { x.unshift({ label: "Home", url: "/welcome" }); return x; });
}

View File

@ -1,13 +1,11 @@
<div class="figure-card card">
<div class="card-header" [ngStyle]="{ 'background': linearColor, 'box-shadow': boxShadow }">
<i class="material-icons">{{ headerIcon }}</i>
</div>
<div class="card-content">
<p class="category">{{ category }}</p>
<h3 class="title">{{ title }}</h3>
</div>
<div *ngIf="hasFootContent" class="card-footer">
<a style="cursor:pointer;" (click)= "navigateToUrl()"><i class="material-icons text-danger">{{ footerIcon }}</i> {{ footContent }}</a>
</div>
<div class="figure-card card" (click)="navigateToUrl()">
<div class="card-header" [ngStyle]="{ 'background': linearColor, 'box-shadow': boxShadow }">
<i class="material-icons">{{ headerIcon }}</i>
</div>
<div class="card-content">
<p class="category">{{ category }}</p>
<h3 class="title">{{ title }}</h3>
</div>
<div *ngIf="hasFootContent" class="card-footer">
</div>
</div>