[Monitor Dashboard | Trunk]: Generate alias fix / char
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59024 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
3797563b6d
commit
f87575779f
|
@ -1,7 +1,7 @@
|
||||||
<div class=" stakeholderPage">
|
<div class=" stakeholderPage">
|
||||||
<div id="header_main" class=" light_header">
|
<div id="header_main" class=" light_header">
|
||||||
<nav class="uk-navbar">
|
<nav class="uk-navbar">
|
||||||
<div *ngIf="stakeholder" class="uk-navbar-left">
|
<div *ngIf="stakeholder" class="uk-navbar-left">
|
||||||
<a class="uk-logo uk-navbar-item ng-star-inserted uk-link uk-margin-left "
|
<a class="uk-logo uk-navbar-item ng-star-inserted uk-link uk-margin-left "
|
||||||
[routerLink]="'/'+stakeholder.alias"
|
[routerLink]="'/'+stakeholder.alias"
|
||||||
routerlinkactive="uk-link">
|
routerlinkactive="uk-link">
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
</a>
|
</a>
|
||||||
<ul class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
|
<ul class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
|
||||||
<li>
|
<li>
|
||||||
<div class="uk-text-capitalize uk-h4 uk-margin-remove" >
|
<div class="uk-text-capitalize uk-h4 uk-margin-remove">
|
||||||
<!--<span class="uk-visible@m">
|
<!--<span class="uk-visible@m">
|
||||||
{{'OpenAIRE Monitor '+(stakeholder.type == 'ri'?'Research Initiative':stakeholder.type)+
|
{{'OpenAIRE Monitor '+(stakeholder.type == 'ri'?'Research Initiative':stakeholder.type)+
|
||||||
' - ' }}</span>-->
|
' - ' }}</span>-->
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<ul *ngIf="!privateStakeholder"
|
<ul *ngIf="!privateStakeholder"
|
||||||
class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
|
class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
|
||||||
<li title="It is comming soon. Stay tuned!">
|
<li title="It is comming soon. Stay tuned!">
|
||||||
<a class="login" [routerLink]="(isAdmin()?['/admin']:null)" >
|
<a class="login" [routerLink]="(isAdmin()?['/admin']:null)">
|
||||||
Manage
|
Manage
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
[user]="user" [dashboard]="true"
|
[user]="user" [dashboard]="true"
|
||||||
[logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl
|
[logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl
|
||||||
[cookieDomain]=properties.cookieDomain
|
[cookieDomain]=properties.cookieDomain
|
||||||
[userMenuItems]=userMenuItems >
|
[userMenuItems]=userMenuItems>
|
||||||
</user-mini>
|
</user-mini>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -57,24 +57,24 @@
|
||||||
<div id="page_content">
|
<div id="page_content">
|
||||||
<div class="uk-navbar-container uk-sticky uk-sticky-fixed" style="top: 70px; position:
|
<div class="uk-navbar-container uk-sticky uk-sticky-fixed" style="top: 70px; position:
|
||||||
fixed; width: 100%">
|
fixed; width: 100%">
|
||||||
<nav class=" " >
|
<nav class=" ">
|
||||||
<div *ngIf="stakeholder && status === errorCodes.DONE && activeTopic" class="">
|
<div *ngIf="stakeholder && status === errorCodes.DONE && activeTopic" class="">
|
||||||
<ul *ngIf="activeTopic && activeTopic.categories.length > 1"
|
<ul *ngIf="activeTopic && activeTopic.categories.length > 1"
|
||||||
class="categoriesTabs uk-tab uk-padding uk-padding-remove-bottom uk-padding-remove-left uk-margin-remove">
|
class="categoriesTabs uk-tab uk-padding uk-padding-remove-bottom uk-padding-remove-left uk-margin-remove">
|
||||||
<ng-template ngFor [ngForOf]="activeTopic.categories" let-category let-i="index">
|
<ng-template ngFor [ngForOf]="activeTopic.categories" let-category let-i="index">
|
||||||
<li *ngIf="isPublicOrIsMember(category.isPublic) && category.isActive"
|
<li *ngIf="isPublicOrIsMember(category.isPublic) && category.isActive"
|
||||||
[ngClass]="(category.alias === activeCategory.alias)?'uk-active':''">
|
[ngClass]="(category.alias === activeCategory.alias)?'uk-active':''">
|
||||||
<a (click)="navigateTo(stakeholder.alias,activeTopic.alias, category.alias)"
|
<a (click)="navigateTo(stakeholder.alias,activeTopic.alias, category.alias)"
|
||||||
class="uk-margin-remove-bottom uk-h4"
|
class="uk-margin-remove-bottom uk-h4"
|
||||||
><span>{{category.name}}</span></a>
|
><span>{{category.name}}</span></a>
|
||||||
</li>
|
</li>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<div id="page_content_inner" class="uk-margin-large-top">
|
<div id="page_content_inner" class="uk-margin-large-top">
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<ul *ngIf="activeCategory && activeCategory.subCategories.length > 1" class="uk-tab subCategoriesTabs">
|
<ul *ngIf="activeCategory && activeCategory.subCategories.length > 1" class="uk-tab subCategoriesTabs">
|
||||||
<ng-template ngFor [ngForOf]="activeCategory.subCategories" let-subCategory let-i="index">
|
<ng-template ngFor [ngForOf]="activeCategory.subCategories" let-subCategory let-i="index">
|
||||||
<li *ngIf="isPublicOrIsMember(subCategory.isPublic) && subCategory.isActive"
|
<li *ngIf="isPublicOrIsMember(subCategory.isPublic) && subCategory.isActive"
|
||||||
|
@ -96,26 +96,33 @@
|
||||||
[(ngModel)]="endYear">
|
[(ngModel)]="endYear">
|
||||||
<button class="uk-button uk-button-primary" (click)="setIndicators()">Apply</button>
|
<button class="uk-button uk-button-primary" (click)="setIndicators()">Apply</button>
|
||||||
</div>-->
|
</div>-->
|
||||||
<div *ngIf="privateStakeholder">
|
<div *ngIf="privateStakeholder">
|
||||||
<div class="uk-text-center uk-height-medium">
|
<div class="uk-text-center uk-height-medium">
|
||||||
<div class="uk-h3 "><i ><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg></i>
|
<div class="uk-h3 "><i>
|
||||||
Private data</div>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px">
|
||||||
<div class="uk-text-large "></div>
|
<path d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path
|
||||||
|
d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
Private data
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-text-large "></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
*ngIf="(activeSubCategory && (activeSubCategory.charts.length == 0 ||
|
*ngIf="(activeSubCategory && (activeSubCategory.charts.length == 0 ||
|
||||||
(activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0)))
|
(activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0)))
|
||||||
&& ((activeSubCategory &&
|
&& ((activeSubCategory &&
|
||||||
activeSubCategory.description &&
|
activeSubCategory.description &&
|
||||||
activeSubCategory.description.length > 0) ||
|
activeSubCategory.description.length > 0) ||
|
||||||
(activeCategory && activeCategory.description && activeCategory.description.length > 0) ||
|
(activeCategory && activeCategory.description && activeCategory.description.length > 0) ||
|
||||||
(activeTopic && activeTopic.description && activeTopic.description.length > 0))"
|
(activeTopic && activeTopic.description && activeTopic.description.length > 0))"
|
||||||
class="uk-text-center">
|
class="uk-text-center">
|
||||||
<div class="uk-h5 uk-height-small uk-margin-large-top uk-margin-xlarge-right uk-margin-xlarge-left">
|
<div class="uk-h5 uk-height-small uk-margin-large-top uk-margin-xlarge-right uk-margin-xlarge-left">
|
||||||
{{activeSubCategory && activeSubCategory.description && activeSubCategory.description.length > 0 ? activeSubCategory.description
|
{{activeSubCategory && activeSubCategory.description && activeSubCategory.description.length > 0 ? activeSubCategory.description
|
||||||
: (activeCategory && activeCategory.description && activeCategory.description.length > 0 ? activeCategory.description :
|
: (activeCategory && activeCategory.description && activeCategory.description.length > 0 ? activeCategory.description :
|
||||||
(activeTopic.description && activeTopic.description.length > 0 ? activeTopic.description : ""))}}
|
(activeTopic.description && activeTopic.description.length > 0 ? activeTopic.description : ""))}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +132,7 @@
|
||||||
(activeSubCategory.numbers.length == 0 || (activeSubCategory.numbers.length == 1 && activeSubCategory.numbers[0].indicators.length == 0))
|
(activeSubCategory.numbers.length == 0 || (activeSubCategory.numbers.length == 1 && activeSubCategory.numbers[0].indicators.length == 0))
|
||||||
&&
|
&&
|
||||||
(activeSubCategory.charts.length == 0 || (activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0))
|
(activeSubCategory.charts.length == 0 || (activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0))
|
||||||
) || !activeTopic || !activeCategory || !activeSubCategory)" >
|
) || !activeTopic || !activeCategory || !activeSubCategory)">
|
||||||
<div class=" uk-text-center">
|
<div class=" uk-text-center">
|
||||||
<div class="uk-h3">
|
<div class="uk-h3">
|
||||||
No indicators available yet. Stay tuned!
|
No indicators available yet. Stay tuned!
|
||||||
|
@ -154,21 +161,23 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="activeSubCategory"
|
<div *ngIf="activeSubCategory"
|
||||||
>
|
>
|
||||||
<div *ngFor="let chart of activeSubCategory.charts; let i = index;" class="uk-grid uk-grid-medium uk-margin-bottom uk-flex uk-flex-bottom "
|
<div *ngFor="let chart of activeSubCategory.charts; let i = index;"
|
||||||
|
class="uk-grid uk-grid-medium uk-margin-bottom uk-flex uk-flex-bottom "
|
||||||
uk-height-match="target: div > div > .chartTitle">
|
uk-height-match="target: div > div > .chartTitle">
|
||||||
|
|
||||||
<h3 *ngIf="chart.title && chart.title.length > 0" class="uk-width-1-1 uk-margin-top">{{chart.title}}</h3>
|
<h3 *ngIf="chart.title && chart.title.length > 0" class="uk-width-1-1 uk-margin-top">{{chart.title}}</h3>
|
||||||
<ng-template ngFor [ngForOf]="chart.indicators" let-indicator let-j="index">
|
<ng-template ngFor [ngForOf]="chart.indicators" let-indicator let-j="index">
|
||||||
<div *ngIf="indicator.isActive && isPublicOrIsMember(indicator.isPublic) && chartsActiveType.get(i + '-' + j)"
|
<div
|
||||||
[class.uk-width-1-3@m]="indicator.width === 'small'"
|
*ngIf="indicator.isActive && isPublicOrIsMember(indicator.isPublic) && chartsActiveType.get(i + '-' + j)"
|
||||||
[class.uk-width-1-2@m]="indicator.width === 'medium'"
|
[class.uk-width-1-3@m]="indicator.width === 'small'"
|
||||||
[class.uk-width-1-1]="indicator.width === 'large'" class="uk-margin-bottom">
|
[class.uk-width-1-2@m]="indicator.width === 'medium'"
|
||||||
|
[class.uk-width-1-1]="indicator.width === 'large'" class="uk-margin-bottom">
|
||||||
<div class="indicatorBox">
|
<div class="indicatorBox">
|
||||||
<h4 class="uk-margin-bottom chartTitle uk-flex uk-flex-bottom ">
|
<h4 class="uk-margin-bottom chartTitle uk-flex uk-flex-bottom ">
|
||||||
<div>{{indicator.name + " "}}</div>
|
<div>{{indicator.name + " "}}</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="md-card" ><!--[attr.uk-tooltip]="indicator.description">-->
|
<div class="md-card"><!--[attr.uk-tooltip]="indicator.description">-->
|
||||||
<div class="md-card-content uk-text-center">
|
<div class="md-card-content uk-text-center">
|
||||||
<div *ngIf="indicator.indicatorPaths.length > 1" class="uk-button-group">
|
<div *ngIf="indicator.indicatorPaths.length > 1" class="uk-button-group">
|
||||||
<button *ngFor="let indicatorPath of indicator.indicatorPaths;"
|
<button *ngFor="let indicatorPath of indicator.indicatorPaths;"
|
||||||
|
@ -195,12 +204,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="stakeholder" class="uk-margin-xlarge-top">
|
<div *ngIf="stakeholder" class="uk-margin-xlarge-top">
|
||||||
<bottom *ngIf="properties" [darkBackground]="false"
|
<bottom *ngIf="properties" [darkBackground]="false"
|
||||||
[centered]="true" [properties]="properties" [showMenuItems]="true" ></bottom>
|
[centered]="true" [properties]="properties" [showMenuItems]="true"></bottom>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!--<div *ngIf="stakeholder" id="style_switcher" title="This functionality is comming soon. Stay tuned!">
|
<!--<div *ngIf="stakeholder" id="style_switcher" title="This functionality is comming soon. Stay tuned!">
|
||||||
<div id="style_switcher_toggle">
|
<div id="style_switcher_toggle">
|
||||||
<a *ngIf="isAdmin() " [routerLink]="['/admin', this.stakeholder.alias]" >
|
<a *ngIf="isAdmin() " [routerLink]="['/admin', this.stakeholder.alias]" >
|
||||||
|
@ -210,13 +219,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<div *ngIf="stakeholder && !privateStakeholder" id="style_switcher" class="filters_switcher"
|
<div *ngIf="stakeholder && !privateStakeholder" id="style_switcher" class="filters_switcher"
|
||||||
title="It is comming soon. Stay tuned!">
|
title="It is comming soon. Stay tuned!">
|
||||||
<div id="style_switcher_toggle">
|
<div id="style_switcher_toggle">
|
||||||
<i class=" uk-text-muted">
|
<i class=" uk-text-muted">
|
||||||
<svg style="margin-top: 6px;" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
|
<svg style="margin-top: 6px;" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
fill="white" width="24px" height="24px"><g><path d="M0,0h24 M24,24H0" fill="none"/><path d="M4.25,5.61C6.57,8.59,10,13,10,13v5c0,1.1,0.9,2,2,2h0c1.1,0,2-0.9,2-2v-5c0,0,3.43-4.41,5.75-7.39 C20.26,4.95,19.79,4,18.95,4H5.04C4.21,4,3.74,4.95,4.25,5.61z"/><path d="M0,0h24v24H0V0z" fill="none"/></g></svg>
|
fill="white" width="24px" height="24px">
|
||||||
|
<g>
|
||||||
|
<path d="M0,0h24 M24,24H0" fill="none"/>
|
||||||
|
<path
|
||||||
|
d="M4.25,5.61C6.57,8.59,10,13,10,13v5c0,1.1,0.9,2,2,2h0c1.1,0,2-0.9,2-2v-5c0,0,3.43-4.41,5.75-7.39 C20.26,4.95,19.79,4,18.95,4H5.04C4.21,4,3.74,4.95,4.25,5.61z"/>
|
||||||
|
<path d="M0,0h24v24H0V0z" fill="none"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -134,12 +134,12 @@ export class StakeholderUtils {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO need to be fixed
|
|
||||||
generateAlias(name: string): string {
|
generateAlias(name: string): string {
|
||||||
let alias = name.toLowerCase();
|
let alias = name.toLowerCase();
|
||||||
while (alias.includes(' / ') || alias.includes(' ')) {
|
while (alias.includes('/') || alias.includes(' ')) {
|
||||||
alias = alias.replace(' / ', '-');
|
alias = alias.replace(' / ', '-');
|
||||||
|
alias = alias.replace('/', '-');
|
||||||
alias = alias.replace(' ', '-');
|
alias = alias.replace(' ', '-');
|
||||||
}
|
}
|
||||||
return alias;
|
return alias;
|
||||||
|
|
Loading…
Reference in New Issue