[Admin | Trunk]: Add message when no statistics exist. Disable customization route.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@58583 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8beb18c32b
commit
e52500730b
|
@ -242,16 +242,11 @@ export class AppComponent implements OnInit {
|
|||
'/organizations', false, [], [], {communityId: this.communityId}),
|
||||
items: []
|
||||
});
|
||||
community.items.push({
|
||||
/*community.items.push({
|
||||
rootItem: new MenuItem('layout', 'Customize Layout', '/customize-layout',
|
||||
'/customize-layout', false, [], [], {communityId: this.communityId}),
|
||||
items: []
|
||||
});
|
||||
/*community.items.push({
|
||||
rootItem: new MenuItem('communityLayout', 'Community Layout', '/community-layout',
|
||||
'/community-layout', false, [], [], {communityId: this.communityId}),
|
||||
items: []
|
||||
})*/
|
||||
});*/
|
||||
this.sideMenuItems.push(community);
|
||||
const communityContent: SideMenuItem = {
|
||||
rootItem: new MenuItem('communityContent', 'Community Content', '',
|
||||
|
|
|
@ -143,11 +143,11 @@ const appRoutes: Routes = [
|
|||
loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule',
|
||||
resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||
},
|
||||
{
|
||||
/*{
|
||||
path: 'customize-layout',
|
||||
loadChildren: './pages/customization/customization.module#CustomizationModule',
|
||||
resolve: { envSpecific: EnvironmentSpecificResolver }
|
||||
},
|
||||
},*/
|
||||
{
|
||||
path: 'manage-content-providers/criteria',
|
||||
loadChildren: './pages/community/content-providers/criteria/criteria.module#CriteriaModule',
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<div>
|
||||
<a routerLink="/community-edit-form" [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Community Profile</a><br>
|
||||
<a routerLink="/organizations" [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Organizations</a><br>
|
||||
<a routerLink="/customize-layout"
|
||||
<!--<a routerLink="/customize-layout"
|
||||
[queryParams]="{communityId: this.communityId}"
|
||||
class="uk-button uk-button-text">Customize Layout</a>
|
||||
class="uk-button uk-button-text">Customize Layout</a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="communityId != 'openaire' && this.communityId !== 'connect'" class="uk-card uk-card-default uk-card-body uk-card-hover">
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
<div id="stats">
|
||||
<div class="menubar ">
|
||||
<div *ngIf="statisticsSum" class="page-title uk-article-title">
|
||||
Statistics
|
||||
<mat-slide-toggle class="uk-margin-small-left" *ngIf="statisticsDisplay" title="Show/Hide all indicators" [checked]="statisticsDisplay.isActive"
|
||||
(change)="toggleShowGraphAnalysisView()"></mat-slide-toggle>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="contentWrapper" class="content-wrapper">
|
||||
<div>
|
||||
<div class="contentPanel uk-margin-top">
|
||||
|
@ -15,11 +7,16 @@
|
|||
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">{{ loadingMessage }}</div>
|
||||
<div class="whiteFilm"></div>
|
||||
</div> -->
|
||||
<div *ngIf="statisticsSum" class="page-title uk-article-title">
|
||||
Statistics
|
||||
<mat-slide-toggle class="uk-margin-small-left" *ngIf="statisticsDisplay" title="Show/Hide all indicators" [checked]="statisticsDisplay.isActive"
|
||||
(change)="toggleShowGraphAnalysisView()"></mat-slide-toggle>
|
||||
</div>
|
||||
<div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
|
||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
||||
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
|
||||
<div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
|
||||
|
||||
<div class="uk-alert uk-alert-primary uk-margin-top-large">
|
||||
<div *ngIf="statisticsSum" class="uk-alert uk-alert-primary uk-margin-top-large">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<span class="uk-margin-small-right uk-icon uk-icon-justify" uk-icon="warning"></span>
|
||||
<span>
|
||||
|
@ -28,7 +25,15 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="communityId">
|
||||
<div *ngIf="!statisticsSum" class="uk-alert uk-alert-primary uk-margin-top-large">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<span class="uk-margin-small-right uk-icon uk-icon-justify" uk-icon="warning"></span>
|
||||
<span>
|
||||
There are no available statistics for your community yet.<br>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="communityId && statisticsSum">
|
||||
<div class="users-list">
|
||||
<div class="col-md-12">
|
||||
<article class="uk-article ">
|
||||
|
|
|
@ -87,9 +87,11 @@ export class StatsComponent implements OnInit {
|
|||
this.statisticsDisplay = null;
|
||||
this.contentService.getCommunityStatistics(this.properties.statisticsAPIURL, this.communityId).subscribe(
|
||||
stats => {
|
||||
this.statisticsSum = stats;
|
||||
if(stats["other"]){ //hack because in stats API the entity name is "other" while in admin API is "orp". This component uses also "orp" name
|
||||
this.statisticsSum["orp"]=stats["other"];
|
||||
if(stats) {
|
||||
this.statisticsSum = stats;
|
||||
if(stats["other"]){ //hack because in stats API the entity name is "other" while in admin API is "orp". This component uses also "orp" name
|
||||
this.statisticsSum["orp"]=stats["other"];
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
|
|
Loading…
Reference in New Issue