Business Card Integration
[portal.git] / portal-FE-common / src / app / layout / components / header / header.component.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6   ===================================================================
7  
8   Unless otherwise specified, all software contained herein is licensed
9   under the Apache License, Version 2.0 (the "License");
10   you may not use this software except in compliance with the License.
11   You may obtain a copy of the License at
12  
13               http://www.apache.org/licenses/LICENSE-2.0
14  
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20  
21   Unless otherwise specified, all documentation contained herein is licensed
22   under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23   you may not use this documentation except in compliance with the License.
24   You may obtain a copy of the License at
25  
26               https://creativecommons.org/licenses/by/4.0/
27  
28   Unless required by applicable law or agreed to in writing, documentation
29   distributed under the License is distributed on an "AS IS" BASIS,
30   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31   See the License for the specific language governing permissions and
32   limitations under the License.
33  
34   ============LICENSE_END============================================
35  
36   
37   -->
38
39 <div style="bottom: tabBottom; display: flex; height: 100%; overflow: hidden">
40     <nav class="navbar navbar-expand-lg fixed-top">
41         <a class="navbar-brand" href=""> <img src="{{brandLogoImagePath}}" style="width:14%"/> &nbsp; {{brandName}}</a>
42         <div class="header-menu-display">
43             <app-header-menu></app-header-menu>
44         </div>
45         <button class="navbar-toggler" type="button" (click)="toggleSidebar()">
46             <i class="icon ion-md-menu" style="color:white;"></i>
47         </button>
48         <div class="collapse navbar-collapse">
49             <ul class="navbar-nav ml-auto">
50                 <app-global-search></app-global-search>
51                 <li class="nav-item dropdown" ngbDropdown>
52                     <a href="javascript:void(0)" class="nav-link" ngbDropdownToggle>
53                         <i class="icon ion-md-bulb"></i> <b class="caret"></b><span class="sr-only"></span>
54                     </a>
55                     <div class="custom-dropdown-item" ngbDropdownMenu>
56
57                 <li class="dropdown-divider"></li>
58         </div>
59         </li>
60         <li class="nav-item dropdown" ngbDropdown>
61             <a href="javascript:void(0)" class="nav-link" ngbDropdownToggle>
62                 <i class="icon ion-md-flag"></i> <b class="caret"></b><span class="sr-only"></span>
63             </a>
64             <div class="dropdown-menu-right" ngbDropdownMenu>
65                 <a style="margin-left: 8%;" id="application-role" [routerLink]="['/recentNotifications']"
66                     href="javascript:void(0);">
67                     {{ 'View All Recent Notifications' }} </a>
68         <li class="dropdown-divider"></li>
69 </div>
70 </li>
71 <li class="nav-item dropdown" ngbDropdown>
72     <a href="javascript:void(0)" class="nav-link" ngbDropdownToggle>
73         <i class="icon ion-md-person"></i> {{firstName}} <b class="caret"></b>
74     </a>
75     <div class="dropdown-menu-right" ngbDropdownMenu>
76 <li class="dropdown-item" style="font-weight: lighter">
77     {{firstName}}, {{lastName}}
78 </li>
79 <li class="dropdown-item" *ngIf=(!isSystemUser)>
80     <span class="dropdown-item-name"> {{ 'Email'}}: </span>
81     <div>
82         <span class="dropdown-item-value">
83             {{loginSnippetEmail}}
84         </span>
85     </div>
86 </li>
87 <li class="dropdown-item">
88     <span class="dropdown-item-name" *ngIf=(!isSystemUser)> {{ 'User Id' }}: </span>
89     <span class="dropdown-item-name" *ngIf=(isSystemUser)> {{ 'System Id' }}: </span>
90     <div>
91         <span class="dropdown-item-value">
92             {{loginSnippetUserid}}
93         </span>
94     </div>
95 </li>
96 <li class="dropdown-item">
97     <span class="dropdown-item-name"> {{ 'Last login' }}: </span>
98     <div>
99         <span class="dropdown-item-value">
100             {{lastLogin | date:'medium'}}
101         </span>
102     </div>
103 </li>
104 <li class="custom-display-item">
105     <a (click)="getUserApplicationRoles()" href="javascript:void(0);"><span><i class="icon ion-md-add-circle-outline"
106                 [ngClass]="{true: 'icon ion-md-add-circle-outline', false: 'icon ion-md-remove-circle-outline'}[ !displayUserAppRoles]"></i>
107             {{ 'Applications and Roles' }} </span></a>
108     <span class="ecomp-spinner" *ngIf="isLoading"></span>
109 </li> <br>
110 <div class="custom-display-item approles" [hidden]="!displayUserAppRoles">
111     <div *ngFor="let ua of userapproles ; index as i">
112         <div class="reg-userApp-value">
113             <span class="dropdown-item-name">{{ua.App}}:</span>
114         </div>
115         <div *ngFor="let role of ua.Roles ; index as i" class="reg-userAppRoles-value">
116             <span *ngIf="role.indexOf('global_')!=-1" id="required" style="color: Red;" visible="false">
117                 *</span> <span class="dropdown-item-value">{{role}}</span>
118         </div>
119         <br>
120     </div>
121 </div>
122 <hr>
123 <div id="reg-logout-div" >
124 <button type="button" class="btn btn-primary"  (click)="allAppsLogout()">
125     <i class="icon ion-md-log-out"></i> {{ 'Log Out' }} </button></div>
126 </div>
127 </li>
128 </ul>
129 </div>
130 </nav>
131 </div>