diff options
author | Sudarshan Kumar <sudarshan.kumar@att.com> | 2020-02-04 21:48:49 +0530 |
---|---|---|
committer | Sudarshan Kumar <sudarshan.kumar@att.com> | 2020-02-04 16:25:33 +0000 |
commit | 096d3ac4c7b98f98eb20978cf1f07ff5cc91d492 (patch) | |
tree | d61d7794261e875d3ce1f310081823192607c2f2 /portal-FE-common/src/app/layout/components/header | |
parent | 099ece77f49e4a6bc4d9b35ef03a5e0f33bf8384 (diff) |
Made Header and Footer generic
Changes made to make header and footer generic by taking required values from
environment.ts
Issue-ID: PORTAL-795
Change-Id: I03303e10ef763767d12d16d2ee6454f81a250562
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'portal-FE-common/src/app/layout/components/header')
-rw-r--r-- | portal-FE-common/src/app/layout/components/header/header.component.html | 4 | ||||
-rw-r--r-- | portal-FE-common/src/app/layout/components/header/header.component.ts | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/portal-FE-common/src/app/layout/components/header/header.component.html b/portal-FE-common/src/app/layout/components/header/header.component.html index 45b4e9f9..f3b3a5f7 100644 --- a/portal-FE-common/src/app/layout/components/header/header.component.html +++ b/portal-FE-common/src/app/layout/components/header/header.component.html @@ -38,7 +38,7 @@ <div style="bottom: tabBottom; display: flex; height: 100%; overflow: hidden"> <nav class="navbar navbar-expand-lg fixed-top"> - <a class="navbar-brand" href=""> <img src="assets/images/global.logo" style="width:14%"/> ONAP Portal</a> + <a class="navbar-brand" href=""> <img src="{{brandLogoImagePath}}" style="width:14%"/> {{brandName}}</a> <div class="header-menu-display"> <app-header-menu></app-header-menu> </div> @@ -104,7 +104,7 @@ <a (click)="getUserApplicationRoles()" href="javascript:void(0);"><span><i class="icon ion-md-add-circle-outline" [ngClass]="{true: 'icon ion-md-add-circle-outline', false: 'icon ion-md-remove-circle-outline'}[ !displayUserAppRoles]"></i> {{ 'Applications and Roles' }} </span></a> - <span class="onap-spinner" *ngIf="isLoading"></span> + <span class="ecomp-spinner" *ngIf="isLoading"></span> </li> <br> <div class="custom-display-item approles" [hidden]="!displayUserAppRoles"> <div *ngFor="let ua of userapproles ; index as i"> diff --git a/portal-FE-common/src/app/layout/components/header/header.component.ts b/portal-FE-common/src/app/layout/components/header/header.component.ts index cb6bdd31..09dd4c1a 100644 --- a/portal-FE-common/src/app/layout/components/header/header.component.ts +++ b/portal-FE-common/src/app/layout/components/header/header.component.ts @@ -39,6 +39,7 @@ import { Component, OnInit } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; import { UserProfileService, MenusService } from 'src/app/shared/services'; import { CookieService } from 'ngx-cookie-service'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-header', @@ -55,6 +56,9 @@ export class HeaderComponent implements OnInit { userapproles: any[]; displayUserAppRoles: any; isLoading: boolean; + api = environment.api; + brandName: string; + brandLogoImagePath: string; constructor(public router: Router, private userProfileService: UserProfileService, private menusService: MenusService, private cookieService: CookieService) { @@ -72,6 +76,16 @@ export class HeaderComponent implements OnInit { ngOnInit() { this.pushRightClass = 'push-right'; this.getUserInformation(); + + this.brandName = "ONAP Portal"; + if(this.api.brandName != ''){ + this.brandName = this.api.brandName; + } + + this.brandLogoImagePath = "assets/images/global.logo"; + if(this.api.brandLogoImagePath != ''){ + this.brandLogoImagePath = this.api.brandLogoImagePath; + } } getUserInformation() { |