[Library | Trunk]: Remove dashboard menu on usage-statistics.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58902 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-06-12 13:22:04 +00:00
parent 2f55ac32f1
commit 1044737f9d
2 changed files with 4 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import {COOKIE, User} from "../login/utils/helper.class";
import {catchError, map, timeout} from "rxjs/operators"; import {catchError, map, timeout} from "rxjs/operators";
import {NavigationEnd, Router} from "@angular/router"; import {NavigationEnd, Router} from "@angular/router";
import {EnvironmentSpecificService} from "../utils/properties/environment-specific.service"; import {EnvironmentSpecificService} from "../utils/properties/environment-specific.service";
import {properties} from "../../../environments/environment";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -15,10 +16,8 @@ export class UserManagementService {
private readonly promise: Promise<User>; private readonly promise: Promise<User>;
constructor(private http: HttpClient, constructor(private http: HttpClient,
private router: Router, private router: Router) {
private environmentSpecificService: EnvironmentSpecificService) {
this.promise = new Promise<any>((resolve => { this.promise = new Promise<any>((resolve => {
this.environmentSpecificService.subscribeEnvironment().subscribe(properties => {
const token = COOKIE.getCookie('AccessToken'); const token = COOKIE.getCookie('AccessToken');
if (!token) { if (!token) {
this.getUserInfoSubject.next(null); this.getUserInfoSubject.next(null);
@ -33,7 +32,6 @@ export class UserManagementService {
resolve(); resolve();
}); });
} }
});
})); }));
this.router.events.subscribe(event => { this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) { if (event instanceof NavigationEnd) {

View File

@ -51,7 +51,7 @@
<div> <div>
<div class="uk-panel" id="module-0"> <div class="uk-panel" id="module-0">
<ul class="uk-nav uk-nav-default"> <ul class="uk-nav uk-nav-default">
<li class="uk-nav-header uk-parent" > <li *ngIf="portal != 'usage-statistics'" class="uk-nav-header uk-parent" >
Dashboards Dashboards
<ul class="uk-nav-sub"> <ul class="uk-nav-sub">
<li *ngIf="portal!='explore'"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development' ?'beta.':'')+'explore.openaire.eu'" target="_blank" class="uk-heading-bullet explore-heading-bullet">EXPLORE</a></li> <li *ngIf="portal!='explore'"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development' ?'beta.':'')+'explore.openaire.eu'" target="_blank" class="uk-heading-bullet explore-heading-bullet">EXPLORE</a></li>
@ -101,7 +101,7 @@
<div *ngIf="specialAnnouncementContent" class="uk-hidden@m" [innerHTML]="specialAnnouncementContent"> <div *ngIf="specialAnnouncementContent" class="uk-hidden@m" [innerHTML]="specialAnnouncementContent">
</div> </div>
<div *ngIf="!community && portal != 'connect-admin'" class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m"> <div *ngIf="!community && portal != 'connect-admin' && portal != 'usage-statistics'" class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m">
<div class="uk-container uk-flex uk-flex-middle uk-container-expand"> <div class="uk-container uk-flex uk-flex-middle uk-container-expand">
<div class="uk-margin-auto-left"> <div class="uk-margin-auto-left">
<div class="uk-grid-medium uk-child-width-auto uk-flex-middle uk-grid uk-grid-stack" uk-grid="margin: uk-margin-small-top"> <div class="uk-grid-medium uk-child-width-auto uk-flex-middle uk-grid uk-grid-stack" uk-grid="margin: uk-margin-small-top">