diff options
7 files changed, 565 insertions, 123 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPLeftMenuServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPLeftMenuServiceImpl.java index 96db8e32..fc926eb8 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPLeftMenuServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPLeftMenuServiceImpl.java @@ -55,6 +55,7 @@ import org.onap.portalapp.portal.domain.CentralizedApp; import org.onap.portalapp.portal.domain.DisplayText; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.utils.EPCommonSystemProperties; import org.onap.portalsdk.core.domain.MenuData; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.service.DataAccessService; @@ -73,17 +74,15 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLeftMenuServiceImpl.class); - @Autowired private ExternalAccessRolesService externalAccessRolesService; @Autowired private DataAccessService dataAccessService; - + /* * (non-Javadoc) * - * @see - * org.onap.portalapp.portal.service.EPLeftMenuService#getLeftMenuItems + * @see org.onap.portalapp.portal.service.EPLeftMenuService#getLeftMenuItems * (java.util.Set) */ @Override @@ -91,8 +90,8 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { final Map<String, JSONObject> defaultNavMap = new LinkedHashMap<String, JSONObject>(); resetNavMap(defaultNavMap); loadDefaultNavMap(defaultNavMap); - loadNavMapByUserAdminRole(defaultNavMap,user); - loadNavMapByRole(defaultNavMap, fullMenuSet , user); + loadNavMapByUserAdminRole(defaultNavMap, user); + loadNavMapByRole(defaultNavMap, fullMenuSet, user); return convertToSideBarModel(defaultNavMap); } @@ -110,7 +109,7 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { * @param defaultNavMap * @param fullMenuSet */ - private void loadNavMapByRole(Map<String, JSONObject> defaultNavMap, Set<MenuData> fullMenuSet , EPUser user) { + private void loadNavMapByRole(Map<String, JSONObject> defaultNavMap, Set<MenuData> fullMenuSet, EPUser user) { class SortOrderComparator implements Comparator<MenuData> { @Override @@ -119,10 +118,10 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { } } - //mulitilanguage impl + // mulitilanguage impl String loginId = user.getLoginId(); HashMap loginParams = new HashMap(); - loginParams.put("login_id",loginId); + loginParams.put("login_id", loginId); List<EPUser> epUsers = dataAccessService.executeNamedQuery("getEPUserByLoginId", loginParams, new HashMap()); Integer languageId = 1; for (EPUser epUser : epUsers) { @@ -130,13 +129,13 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { } Iterator<MenuData> iterator = fullMenuSet.iterator(); HashMap params = new HashMap(); - params.put("language_id",languageId); - List<DisplayText> displayTexts = dataAccessService.executeNamedQuery("displayText",params,new HashMap()); + params.put("language_id", languageId); + List<DisplayText> displayTexts = dataAccessService.executeNamedQuery("displayText", params, new HashMap()); while (iterator.hasNext()) { MenuData menuData = iterator.next(); - for (int index = 0;index<displayTexts.size();index++) { + for (int index = 0; index < displayTexts.size(); index++) { DisplayText displayText = displayTexts.get(index); - if (menuData.getId()==displayText.getTextId()) { + if (menuData.getId() == displayText.getTextId()) { menuData.setLabel(displayText.getLabel()); break; } @@ -147,7 +146,7 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { for (MenuData mn : fullMenuSet) { sortMenuSet.add(mn); } - + // Remove Roles from left menu if user doesnt have admin access on // centralized application List<CentralizedApp> applicationsList = null; @@ -188,40 +187,60 @@ public class EPLeftMenuServiceImpl implements EPLeftMenuService { * @param defaultNavMap */ private void loadDefaultNavMap(Map<String, JSONObject> defaultNavMap) { - + String leftMenuRootValue = getLeftMenuPrefixValue(); JSONObject navItemsDetails1 = new JSONObject(); navItemsDetails1.put("name", "Home"); - navItemsDetails1.put("state", "root.applicationsHome"); - navItemsDetails1.put("imageSrc", "icon-building-home"); - defaultNavMap.put("root.applicationsHome", navItemsDetails1); + navItemsDetails1.put("state", + (isLeftMenuHasRoot(leftMenuRootValue)) + ? leftMenuRootValue+".applicationsHome" + : "applicationsHome"); + navItemsDetails1.put("imageSrc", isLeftMenuHasRoot(leftMenuRootValue) ? "icon-building-home" : "home"); + defaultNavMap.put("applicationsHome", navItemsDetails1); JSONObject navItemsDetails2 = new JSONObject(); navItemsDetails2.put("name", "Application Catalog"); - navItemsDetails2.put("state", "root.appCatalog"); - navItemsDetails2.put("imageSrc", "icon-apps-marketplace"); - defaultNavMap.put("root.appCatalog", navItemsDetails2); + navItemsDetails2.put("state", + (isLeftMenuHasRoot(leftMenuRootValue)) + ? leftMenuRootValue+".appCatalog" + : "appCatalog"); + navItemsDetails2.put("imageSrc", isLeftMenuHasRoot(leftMenuRootValue) ? "icon-apps-marketplace" : "apps"); + defaultNavMap.put("appCatalog", navItemsDetails2); JSONObject navItemsDetails3 = new JSONObject(); navItemsDetails3.put("name", "Widget Catalog"); - navItemsDetails3.put("state", "root.widgetCatalog"); - navItemsDetails3.put("imageSrc", "icon-apps-marketplace"); - defaultNavMap.put("root.widgetCatalog", navItemsDetails3); + navItemsDetails3.put("state", + isLeftMenuHasRoot(leftMenuRootValue) + ? leftMenuRootValue+".widgetCatalog" + : "widgetCatalog"); + navItemsDetails3.put("imageSrc", isLeftMenuHasRoot(leftMenuRootValue) ? "icon-apps-marketplace" : "apps"); + defaultNavMap.put("widgetCatalog", navItemsDetails3); + + } + private boolean isLeftMenuHasRoot(String leftMenuRootValue) { + return (leftMenuRootValue != "" || leftMenuRootValue.isEmpty()) && leftMenuRootValue.equals("root"); } - + @SuppressWarnings("unchecked") private void loadNavMapByUserAdminRole(Map<String, JSONObject> defaultNavMap, EPUser user) { - List<String> applicationsList = new ArrayList<>(); - final Map<String, Long> appParams = new HashMap<>(); - appParams.put("userId", user.getId()); - applicationsList = dataAccessService.executeNamedQuery("getAprroverRoleFunctionsOfUser", appParams, null); - if (applicationsList.size() > 0) { - JSONObject navItemsDetails = new JSONObject(); - navItemsDetails.put("name", "Users"); - navItemsDetails.put("state", "root.users"); - navItemsDetails.put("imageSrc", "icon-user"); - defaultNavMap.put("root.users", navItemsDetails); + String leftMenuRootValue = getLeftMenuPrefixValue(); + List<String> applicationsList = new ArrayList<>(); + final Map<String, Long> appParams = new HashMap<>(); + appParams.put("userId", user.getId()); + applicationsList = dataAccessService.executeNamedQuery("getAprroverRoleFunctionsOfUser", appParams, null); + if (applicationsList.size() > 0) { + JSONObject navItemsDetails = new JSONObject(); + navItemsDetails.put("name", "Users"); + navItemsDetails.put("state", + ((leftMenuRootValue != "" || !leftMenuRootValue.isEmpty()) && leftMenuRootValue.equals("root")) ? leftMenuRootValue+".users" + : "users"); + navItemsDetails.put("imageSrc", isLeftMenuHasRoot(leftMenuRootValue) ? "person" : "icon-user"); + defaultNavMap.put("users", navItemsDetails); + } } + + private String getLeftMenuPrefixValue() { + return EPCommonSystemProperties.getProperty(EPCommonSystemProperties.PORTAL_LEFT_MENU); } } diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EPCommonSystemProperties.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EPCommonSystemProperties.java index 80501e39..e253bfcf 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EPCommonSystemProperties.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EPCommonSystemProperties.java @@ -100,5 +100,6 @@ public class EPCommonSystemProperties extends SystemProperties { public static final String AUTHORIZATION = "Authorization"; public static final String USERNAME = "username"; public static final String PASSWORD = "password"; + public static final String PORTAL_LEFT_MENU = "portal_left_menu"; } diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties index cb187c8c..c6ee0e9b 100644 --- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties @@ -153,3 +153,5 @@ ext_central_access_user_domain = @csp.onap.org # External Central Auth system access remote_centralized_system_access = false +#left menu with root value or non-root +portal_left_menu = non-root
\ No newline at end of file diff --git a/ecomp-portal-DB-common/PortalDMLMySql_3_1_Common.sql b/ecomp-portal-DB-common/PortalDMLMySql_3_1_Common.sql new file mode 100644 index 00000000..cf238506 --- /dev/null +++ b/ecomp-portal-DB-common/PortalDMLMySql_3_1_Common.sql @@ -0,0 +1,138 @@ +-- -------------------------------------------------------------------------------------------- +-- This is the common default data for 3.1.0 Version of Portal database called portal + +use portal; + +set foreign_key_checks=1; + +UPDATE + fn_menu +SET + ACTION = 'applicationsHome', + image_src = 'home' +WHERE + active_yn = 'Y' AND label = 'Home'; + + +UPDATE + fn_menu +SET + ACTION = 'appCatalog', + image_src= 'apps' +WHERE + active_yn = 'Y' AND label = 'Application Catalog'; + + + UPDATE + fn_menu +SET + ACTION = 'widgetCatalog', + image_src= 'apps' +WHERE + active_yn = 'Y' AND label = 'Widget Catalog'; + + UPDATE + fn_menu +SET + ACTION = 'admins' , + image_src= 'star' +WHERE + active_yn = 'Y' AND label = 'Admins'; + + UPDATE + fn_menu +SET + ACTION = 'roles' , + image_src= 'person' +WHERE + active_yn = 'Y' AND label = 'Roles'; + + + UPDATE + fn_menu +SET + ACTION = 'users', + image_src= 'person' +WHERE + active_yn = 'Y' AND label = 'Users'; + + + UPDATE + fn_menu +SET + ACTION = 'portalAdmins', + image_src= 'settings' +WHERE + active_yn = 'Y' AND label = 'Portal Admins'; + + + UPDATE + fn_menu +SET + ACTION = 'applications', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'Application Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'widgetOnboarding', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'Widget Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'functionalMenu', + image_src= 'menu' +WHERE + active_yn = 'Y' AND label = 'Edit Functional Menu'; + + + UPDATE + fn_menu +SET + ACTION = 'userNotifications', + image_src= 'settings' +WHERE + active_yn = 'Y' AND label = 'User Notifications'; + + + UPDATE + fn_menu +SET + ACTION = 'microserviceOnboarding', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'Microservice Onboarding'; + + + + UPDATE + fn_menu +SET + ACTION = 'webAnalytics', + image_src= 'pie' +WHERE + active_yn = 'Y' AND label = 'Web Analytics'; + + + UPDATE + fn_menu +SET + ACTION = 'webAnlayticsSource', + image_src= 'pie' +WHERE + active_yn = 'Y' AND label = 'Web Analytics Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'accountOnboarding', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'App Account Management'; + +commit;
\ No newline at end of file diff --git a/ecomp-portal-DB-os/PortalMySql_3_1_Add_1.sql b/ecomp-portal-DB-os/PortalMySql_3_1_Add_1.sql new file mode 100644 index 00000000..a2483f23 --- /dev/null +++ b/ecomp-portal-DB-os/PortalMySql_3_1_Add_1.sql @@ -0,0 +1,145 @@ +-- --------------------------------------------------------------------------------------------------------------- +-- This is add script #1 for the 3_1 Version of Ecomp Portal database called portal. +-- It upgrades the database from the 1911 version. +-- note to database admin: must set the mysql system variable called lower_case_table_names. +-- it can be set 3 different ways: +-- command-line options (cmd-line), +-- options valid in configuration files (option file), or +-- server system variables (system var). +-- it needs to be set to 1, then table names are stored in lowercase on disk and comparisons are not case sensitive. +-- ----------------------------------------------------------------------------------------------------------------- +use portal; + +set foreign_key_checks=1; + +UPDATE + fn_menu +SET + ACTION = 'applicationsHome', + image_src = 'home' +WHERE + active_yn = 'Y' AND label = 'Home'; + + +UPDATE + fn_menu +SET + ACTION = 'appCatalog', + image_src= 'apps' +WHERE + active_yn = 'Y' AND label = 'Application Catalog'; + + + UPDATE + fn_menu +SET + ACTION = 'widgetCatalog', + image_src= 'apps' +WHERE + active_yn = 'Y' AND label = 'Widget Catalog'; + + UPDATE + fn_menu +SET + ACTION = 'admins' , + image_src= 'star' +WHERE + active_yn = 'Y' AND label = 'Admins'; + + UPDATE + fn_menu +SET + ACTION = 'roles' , + image_src= 'person' +WHERE + active_yn = 'Y' AND label = 'Roles'; + + + UPDATE + fn_menu +SET + ACTION = 'users', + image_src= 'person' +WHERE + active_yn = 'Y' AND label = 'Users'; + + + UPDATE + fn_menu +SET + ACTION = 'portalAdmins', + image_src= 'settings' +WHERE + active_yn = 'Y' AND label = 'Portal Admins'; + + + UPDATE + fn_menu +SET + ACTION = 'applications', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'Application Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'widgetOnboarding', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'Widget Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'functionalMenu', + image_src= 'menu' +WHERE + active_yn = 'Y' AND label = 'Edit Functional Menu'; + + + UPDATE + fn_menu +SET + ACTION = 'userNotifications', + image_src= 'settings' +WHERE + active_yn = 'Y' AND label = 'User Notifications'; + + + UPDATE + fn_menu +SET + ACTION = 'microserviceOnboarding', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'Microservice Onboarding'; + + + + UPDATE + fn_menu +SET + ACTION = 'webAnalytics', + image_src= 'pie' +WHERE + active_yn = 'Y' AND label = 'Web Analytics'; + + + UPDATE + fn_menu +SET + ACTION = 'webAnlayticsSource', + image_src= 'pie' +WHERE + active_yn = 'Y' AND label = 'Web Analytics Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'accountOnboarding', + image_src= 'filing' +WHERE + active_yn = 'Y' AND label = 'App Account Management'; + +commit;
\ No newline at end of file diff --git a/ecomp-portal-DB-os/PortalMySql_3_1_Rollback_1.sql b/ecomp-portal-DB-os/PortalMySql_3_1_Rollback_1.sql new file mode 100644 index 00000000..98a06994 --- /dev/null +++ b/ecomp-portal-DB-os/PortalMySql_3_1_Rollback_1.sql @@ -0,0 +1,144 @@ +-- This is rollback script #1 for the 3_1 Version of Ecomp Portal database called portal. +-- It upgrades the database from the 1911 version. +-- note to database admin: must set the mysql system variable called lower_case_table_names. +-- it can be set 3 different ways: +-- command-line options (cmd-line), +-- options valid in configuration files (option file), or +-- server system variables (system var). +-- it needs to be set to 1, then table names are stored in lowercase on disk and comparisons are not case sensitive. +-- ----------------------------------------------------------------------------------------------------------------- +use portal; + +set foreign_key_checks=1; + +UPDATE + fn_menu +SET + ACTION = 'root.applicationsHome', + image_src = 'icon-building-home' +WHERE + active_yn = 'Y' AND label = 'Home'; + + +UPDATE + fn_menu +SET + ACTION = 'root.appCatalog', + image_src= 'icon-apps-marketplace' +WHERE + active_yn = 'Y' AND label = 'Application Catalog'; + + + UPDATE + fn_menu +SET + ACTION = 'root.widgetCatalog', + image_src= 'icon-apps-marketplace' +WHERE + active_yn = 'Y' AND label = 'Widget Catalog'; + + UPDATE + fn_menu +SET + ACTION = 'root.admins' , + image_src= 'icon-star' +WHERE + active_yn = 'Y' AND label = 'Admins'; + + UPDATE + fn_menu +SET + ACTION = 'root.roles' , + image_src= 'icon-user' +WHERE + active_yn = 'Y' AND label = 'Roles'; + + + UPDATE + fn_menu +SET + ACTION = 'root.users', + image_src= 'icon-user' +WHERE + active_yn = 'Y' AND label = 'Users'; + + + UPDATE + fn_menu +SET + ACTION = 'root.portalAdmins', + image_src= 'icon-settings' +WHERE + active_yn = 'Y' AND label = 'Portal Admins'; + + + UPDATE + fn_menu +SET + ACTION = 'root.applications', + image_src= 'icon-add-widget' +WHERE + active_yn = 'Y' AND label = 'Application Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'root.widgetOnboarding', + image_src= 'icon-add-widget' +WHERE + active_yn = 'Y' AND label = 'Widget Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'root.functionalMenu', + image_src= 'icon-edit' +WHERE + active_yn = 'Y' AND label = 'Edit Functional Menu'; + + + UPDATE + fn_menu +SET + ACTION = 'root.userNotifications', + image_src= 'icon-settings' +WHERE + active_yn = 'Y' AND label = 'User Notifications'; + + + UPDATE + fn_menu +SET + ACTION = 'root.microserviceOnboarding', + image_src= 'icon-add-widget' +WHERE + active_yn = 'Y' AND label = 'Microservice Onboarding'; + + + + UPDATE + fn_menu +SET + ACTION = 'root.webAnalytics', + image_src= 'icon-misc-piechart' +WHERE + active_yn = 'Y' AND label = 'Web Analytics'; + + + UPDATE + fn_menu +SET + ACTION = 'root.webAnlayticsSource', + image_src= 'icon-misc-piechart' +WHERE + active_yn = 'Y' AND label = 'Web Analytics Onboarding'; + + UPDATE + fn_menu +SET + ACTION = 'root.accountOnboarding', + image_src= 'icon-add-widget' +WHERE + active_yn = 'Y' AND label = 'App Account Management'; + + commit;
\ No newline at end of file diff --git a/portal-FE-common/src/app/layout/components/header-menu/header-menu.component.html b/portal-FE-common/src/app/layout/components/header-menu/header-menu.component.html index 45b4e9f9..a3344ea1 100644 --- a/portal-FE-common/src/app/layout/components/header-menu/header-menu.component.html +++ b/portal-FE-common/src/app/layout/components/header-menu/header-menu.component.html @@ -35,96 +35,89 @@ --> +<div id="container" style="width: 100%;" (clickOutside)="clickOutSide($event)"> + <!-- First Level menu --> + <div id="megaMenu-{{item.text.split(' ').join('-')}}" + *ngFor="let item of megaMenuDataObject;let megaMenuIndex = index" (mousedown)="loadFirstLevel(megaMenuIndex)" + role="presentation" class="header-menu-item-div"><a href="javascript:void(0);" id="parentmenu-tabs" role="menuitem" + class="header-menu-item-link">{{item.text}}<b class="caret"></b><span class="sr-only"></span></a> -<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> - <div class="header-menu-display"> - <app-header-menu></app-header-menu> - </div> - <button class="navbar-toggler" type="button" (click)="toggleSidebar()"> - <i class="icon ion-md-menu" style="color:white;"></i> - </button> - <div class="collapse navbar-collapse"> - <ul class="navbar-nav ml-auto"> - <app-global-search></app-global-search> - <li class="nav-item dropdown" ngbDropdown> - <a href="javascript:void(0)" class="nav-link" ngbDropdownToggle> - <i class="icon ion-md-bulb"></i> <b class="caret"></b><span class="sr-only"></span> - </a> - <div class="custom-dropdown-item" ngbDropdownMenu> + <div class="header-secondlevel-menu" *ngIf="item.active_yn=='Y' && hideMenus[megaMenuIndex]"> + <ul class="header-secondary" role="menu"> + <!-- Second Level menu --> + <li class="header-menu-item-li" id="subItem-{{i.text.split(' ').join('-')}}" + *ngFor="let i of item.children;let secondLevelIndex = index" + (mousemove)="hideThirdLevelMenu(megaMenuIndex,secondLevelIndex)" role="presentation"> + <!-- Favorites --> - <li class="dropdown-divider"></li> - </div> + <div *ngIf="i.text=='Favorites'"> + <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text}}</a> + <i id="favorite-star" data-size="large" class="icon-star favorites-icon-active"></i> + <div class="header-columns-div" *ngIf="hideSecondLevelMenus[megaMenuIndex][secondLevelIndex]"> + <div class="header-tertiary-wrapper" id="header-favorites"> + <ul class="header-tertiary" role="menu"> + <li role="presentation"> + <div *ngFor="let subItem of (favoritesMenuItems ? favoritesMenuItems : [])" + id="favoritesMenuItems-{{subItem.text.split(' ').join('-')}}"> + <div class="fav-links"> + <i id="favorite-selector-favorites-list" class="icon-star favorites-icon-active" + (click)="removeAsFavoriteItem($event, subItem.menuId)" + (mousedown)="removeAsFavoriteItem($event, subItem.menuId)"> + </i> <a id="favorites-list" (click)="goToUrl(subItem)">{{subItem.text}}</a> + </div> + </div> + + <div id="favorites-empty" class="favorites-window-empty" *ngIf="emptyFavorites"> + <p id="p-no-favs-icon" class="no-fav-icon"> + <span class="icon-star"></span> + </p> + <p id="p-no-favs" class="largeText">{{'No + Favorites'}}</p> + <p id="p-no-favs-desc" class="normal">{{'Add your + favorite items for quick access'}}.</p> + </div> + </li> + </ul> + </div> + </div> + </div> <!-- Support or Help --> + <div *ngIf="item.text=='Support' || item.text=='Help'" id="second-level-menus-help"> + <a id="second-level-menus-{{i.text.split(' ').join('-')}}-help" href="javascript:void(0);" + (click)="goToUrl(i);auditLog(i,'Support')" class="menu__item" role="menuitem">{{i.text}}</a> + </div> <!-- Others --> + <div *ngIf="i.text!='Favorites' && (item.text!='Support' && item.text!='Help')"> + <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text}}</a> + <div class="header-thirdlevel-menu" *ngIf="hideSecondLevelMenus[megaMenuIndex][secondLevelIndex]"> + <ul class="third-level-menu" role="menu" id="third-level-menus"> + <!-- Third Level menu --> + + <li *ngFor="let link of i.children" role="presentation"><i id="level3-star-inactive-{{link.menuId}}" + class="icon-star favorites-icon-inactive" data-size="large" + (mousedown)="setAsFavoriteItem($event, link.menuId)" + *ngIf="link.url.length > 1 && isUrlFavorite(link.menuId)==false"> + </i> <i id="level3-star-active-{{link.menuId}}" + *ngIf="link.url.length > 1 && isUrlFavorite(link.menuId)" class="icon-star favorites-icon-active" + data-size="large" (mousedown)="removeAsFavoriteItem($event, link.menuId)"> + </i> <a class="third-level-title" + (mousedown)="goToUrl(link);auditLog(link,'application')">{{link.text}}</a> + <!-- Fourth Level menu --> + <div *ngFor="let title of link.children"> + <i id="level4-star-inactive-{{title.menuId}}" class="icon-star favorites-icon-inactive" + (mousedown)="setAsFavoriteItem($event, title.menuId)" + *ngIf="title.url.length > 1 && isUrlFavorite(title.menuId)==false"> + </i> <i id="level4-star-active-{{title.menuId}}" class="icon-star favorites-icon-active" + (mousedown)="removeAsFavoriteItem($event, title.menuId)" + *ngIf="title.url.length > 1 && isUrlFavorite(title.menuId)"> + </i> <a href="javascript:void(0);" class="header-tertiaryitem" + [ngClass]="{'disabled': title.disabled}" role="menuitem" + (mousedown)="goToUrl(title);auditLog(title,'functional')">{{title.text}}</a> + </div> + </li> + </ul> + </div> + </div> </li> - <li class="nav-item dropdown" ngbDropdown> - <a href="javascript:void(0)" class="nav-link" ngbDropdownToggle> - <i class="icon ion-md-flag"></i> <b class="caret"></b><span class="sr-only"></span> - </a> - <div class="dropdown-menu-right" ngbDropdownMenu> - <a style="margin-left: 8%;" id="application-role" [routerLink]="['/recentNotifications']" - href="javascript:void(0);"> - {{ 'View All Recent Notifications' }} </a> - <li class="dropdown-divider"></li> -</div> -</li> -<li class="nav-item dropdown" ngbDropdown> - <a href="javascript:void(0)" class="nav-link" ngbDropdownToggle> - <i class="icon ion-md-person"></i> {{firstName}} <b class="caret"></b> - </a> - <div class="dropdown-menu-right" ngbDropdownMenu> -<li class="dropdown-item" style="font-weight: lighter"> - {{firstName}}, {{lastName}} -</li> -<li class="dropdown-item"> - <span class="dropdown-item-name"> {{ 'Email'}}: </span> - <div> - <span class="dropdown-item-value"> - {{loginSnippetEmail}} - </span> - </div> -</li> -<li class="dropdown-item"> - <span class="dropdown-item-name"> {{ 'User Id' }}: </span> - <div> - <span class="dropdown-item-value"> - {{loginSnippetUserid}} - </span> - </div> -</li> -<li class="dropdown-item"> - <span class="dropdown-item-name"> {{ 'Last login' }}: </span> - <div> - <span class="dropdown-item-value"> - {{lastLogin | date:'medium'}} - </span> - </div> -</li> -<li class="custom-display-item"> - <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> -</li> <br> -<div class="custom-display-item approles" [hidden]="!displayUserAppRoles"> - <div *ngFor="let ua of userapproles ; index as i"> - <div class="reg-userApp-value"> - <span class="dropdown-item-name">{{ua.App}}:</span> - </div> - <div *ngFor="let role of ua.Roles ; index as i" class="reg-userAppRoles-value"> - <span *ngIf="role.indexOf('global_')!=-1" id="required" style="color: Red;" visible="false"> - *</span> <span class="dropdown-item-value">{{role}}</span> - </div> - <br> + </ul> </div> -</div> -<hr> -<div id="reg-logout-div" > -<button type="button" class="btn btn-primary" (click)="allAppsLogout()"> - <i class="icon ion-md-log-out"></i> {{ 'Log Out' }} </button></div> -</div> -</li> -</ul> -</div> -</nav> + </div> </div>
\ No newline at end of file |