diff options
author | 2017-08-23 18:27:19 -0400 | |
---|---|---|
committer | 2017-08-23 21:12:56 -0400 | |
commit | 978dbcf0a196acbafad72fe1e2478ec0e384f02f (patch) | |
tree | 17e1ceaa4a12a599320cbb317947e990bf1a5383 /ecomp-portal-FE-common/client/app/views/header | |
parent | bc7350dce5b7b1dcd1c472a3922b42c4ea99809d (diff) |
Deliver centralized role management feature
Repair multiple defects also.
Revise deployment to use docker-compose.
Remove all zip archives.
Issue: PORTAL-21, PORTAL-25, PORTAL-28, PORTAL-52, PORTAL-69,
PORTAL-74, PORTAL-76, PORTAL-80, PORTAL-82
Change-Id: Ie72fec7d35ba78beb162bba6ed27b2caee340c61
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/header')
3 files changed, 79 insertions, 59 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/header/header.controller.js b/ecomp-portal-FE-common/client/app/views/header/header.controller.js index 2eba057c..6b5be745 100644 --- a/ecomp-portal-FE-common/client/app/views/header/header.controller.js +++ b/ecomp-portal-FE-common/client/app/views/header/header.controller.js @@ -20,7 +20,7 @@ 'use strict'; (function () { class HeaderCtrl { - constructor($log, $window, userProfileService, menusService, $scope, ECOMP_URL_REGEX, $cookies, $state,auditLogService,notificationService,ngDialog) { + constructor($log, $window, userProfileService, menusService, $scope, ECOMP_URL_REGEX, $cookies, $state,auditLogService,notificationService,ngDialog,$modal) { this.firstName = ''; this.lastName = ''; this.$log = $log; @@ -348,7 +348,7 @@ } } class NotificationCtrl{ - constructor($log, $scope, $cookies, $timeout, sessionService,notificationService,$interval,ngDialog) { + constructor($log, $scope, $cookies, $timeout, sessionService,notificationService,$interval,ngDialog,$modal) { $scope.notifications=[]; var intervalPromise = null; $scope.notificationCount= notificationService.notificationCount; @@ -372,11 +372,12 @@ var data = res.data.response[i]; var notification ={ id:data.notificationId, - title:data.msgHeader, + msgHeader:data.msgHeader, message:data.msgDescription, - source:data.msgSource, + msgSource:data.msgSource, time:data.createdDate, - priority:data.priority + priority:data.priority, + notificationHyperlink:data.notificationHyperlink }; $scope.notifications.push(notification); } @@ -406,41 +407,27 @@ notificationService.getMessageRecipients(selectedAdminNotification.id).then(res =>{ $scope.messageRecipients = res; var messageObject=JSON.parse(selectedAdminNotification.message); - var html=""; - html+='<p>'+'Message Source'+' : '+selectedAdminNotification.source+'</p>'; - html+='<p>'+'Message Title'+' : '+selectedAdminNotification.title+'</p>'; - html+='<p>'+'Message Recipient'+' : '+$scope.messageRecipients+'</p>'; - - for(var field in messageObject){ - if(field=='eventDate'||field=='lastModifiedDate'){ - html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>'; - - }else{ - html+='<p>'+field+' : '+messageObject[field]+'</p>'; - - } - } - - var modalInstance = ngDialog.open({ - templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html', - controller: 'userNotificationCtrl', - resolve: { - message: function () { - var message = { - title: '', - text: html - - }; - return message; - }, - - } - }); - - }).catch(err => { - $log.error('userNotificationsCtrl:getMessageRecipients:: error ', err); - $scope.isLoadingTable = false; - }); + var modalInstance = $modal.open({ + templateUrl: 'app/views/user-notifications-admin/user.notifications.json.details.modal.page.html', + controller: 'userNotificationCtrl', + sizeClass: 'modal-large', + resolve: { + items: function () { + var items = { + title: '', + selectedAdminNotification:selectedAdminNotification,messageObject:messageObject,messageRecipients:$scope.messageRecipients + + }; + return items; + } + } + }) + + + }).catch(err => { + $log.error('userNotificationsCtrl:getMessageRecipients:: error ', err); + $scope.isLoadingTable = false; + }); }; notificationService.getNotificationRate().then(res=> { @@ -472,9 +459,9 @@ } } - NotificationCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout', 'sessionService','notificationService','$interval','ngDialog']; + NotificationCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout', 'sessionService','notificationService','$interval','ngDialog','$modal']; LoginSnippetCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService']; - HeaderCtrl.$inject = ['$log', '$window', 'userProfileService', 'menusService', '$scope', 'ECOMP_URL_REGEX','$cookies','$state','auditLogService','notificationService','ngDialog']; + HeaderCtrl.$inject = ['$log', '$window', 'userProfileService', 'menusService', '$scope', 'ECOMP_URL_REGEX','$cookies','$state','auditLogService','notificationService','ngDialog','$modal']; angular.module('ecompApp').controller('HeaderCtrl', HeaderCtrl); angular.module('ecompApp').controller('loginSnippetCtrl', LoginSnippetCtrl); angular.module('ecompApp').controller('notificationCtrl', NotificationCtrl); diff --git a/ecomp-portal-FE-common/client/app/views/header/header.less b/ecomp-portal-FE-common/client/app/views/header/header.less index e10e9ed7..5a6314f9 100644 --- a/ecomp-portal-FE-common/client/app/views/header/header.less +++ b/ecomp-portal-FE-common/client/app/views/header/header.less @@ -535,3 +535,34 @@ column-count: 4; width: 126.8px; height: 28px; } + +.header-position { + position:fixed; + width: 100%; + top: 0px; + left: 0; + background-color: #222; + z-index:9999; +} + .reg-common-label-spn-txt { + font-weight:bold; +} + .display-userAppRoles-label-txt{ + height:200px; + overflow-y:auto; +} + .notification-history-link-txt { + font-size: 14px; + } + .notification-common-position { + float:left; + } + .notification-common-space { + clear:both; + } + .notification-main-ht { + height:113px; + } + .recommendation-bulb-txt { + font-size: 22px; + } diff --git a/ecomp-portal-FE-common/client/app/views/header/header.tpl.html b/ecomp-portal-FE-common/client/app/views/header/header.tpl.html index ea7273b9..30d616eb 100644 --- a/ecomp-portal-FE-common/client/app/views/header/header.tpl.html +++ b/ecomp-portal-FE-common/client/app/views/header/header.tpl.html @@ -17,7 +17,7 @@ limitations under the License. ================================================================================ --> -<div style="position:fixed;width: 100%;top: 0px;left: 0;background-color: #222;z-index:9999"> +<div class="header-position"> <header class="b2b-header-tabs" b2b-header-responsive> <ul class="header__items" role="navigation"> <!-- Menu Icon and name --> @@ -160,17 +160,17 @@ </div> </div> </li> - <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn" style=font-weight:bold>Email<span class="visuallyhidden">: + <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn reg-common-label-spn-txt" >Email<span class="visuallyhidden">: </span></span></div></li> <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn"> {{loginSnippetEmail}}</span></div></li> <li> </li> - <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn" style=font-weight:bold> + <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn reg-common-label-spn-txt"> User Id<span class="visuallyhidden">:</span></span></div></li> <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn"> {{loginSnippetUserid}}<span class="visuallyhidden"></span></span></div></li> <li> </li> - <li><div class="reg-userLastLogin-label"><span class="reg-userLastLogin-label-spn" style=font-weight:bold> + <li><div class="reg-userLastLogin-label"><span class="reg-userLastLogin-label-spn reg-common-label-spn-txt"> Last login<span class="visuallyhidden">:</span></span></div></li> <li><div class="reg-userLastLogin-value"><span class="reg-userLastLogin-value-spn"> {{lastLogin}}<span class="visuallyhidden"></span></span></div></li> @@ -180,13 +180,14 @@ <a href="javascript:void(0);" ng-click="getUserApplicationRoles()" class="icon-primary-accordion-plus" ng-class="{true: 'icon-primary-accordion-plus', false: 'icon-primary-accordion-minus'}[ !displayUserAppRoles]" >Applications and Roles</a> </div> <br> - <div class="display-userAppRoles-label" ng-show="displayUserAppRoles" style="height:200px; overflow-y:auto;"> + <div class="display-userAppRoles-label display-userAppRoles-label-txt" ng-show="displayUserAppRoles"> <div ng-repeat="ua in userapproles track by $index"> <div class="reg-userApp-value"> - <span class="reg-userApp-value-spn" style=font-weight:bold>{{ua.App}}<span class="visuallyhidden">:</span></span> + <span class="reg-userApp-value-spn reg-common-label-spn-txt">{{ua.App}}<span class="visuallyhidden">:</span></span> </div> <div ng-repeat="role in ua.Roles track by $index" class="reg-userAppRoles-value" > - <span class="reg-userAppRoles-value-spn">{{role}}</span> + <span ng-if="role.indexOf('global_')!=-1" id="required" style="color: Red;" visible="false"> *</span> + <span class="reg-userAppRoles-value-spn">{{role}}</span> </div> <br> </div> @@ -217,17 +218,17 @@ <div class="ng-scope"> <div id="notification" class="notificationBox "> <div align ="right"> - <a id="notification-history-link" ui-sref="root.notificationHistory" style="font-size: 14px"> View All Recent Notifications </a> + <a id="notification-history-link" ui-sref="root.notificationHistory" class="notification-history-link-txt"> View All Recent Notifications </a> </div> <div class="notification-header"> - <div style="float:left;"> + <div class="notification-common-position"> <p class="notification-heading">Notifications</p> </div> - <div style="clear:both;"></div> + <div class="notification-common-space"></div> </div> <div ng-show="notifications.length==0"> <div class="notification-main"> - <div style="height:113px;"> + <div class="notification-main-ht"> <div align="center" class="icon-information notification-info-icon"></div> </div> <div> @@ -243,12 +244,12 @@ <span class="important" ng-show="item.priority==2"/> <span class="normal" ng-show="item.priority==1"/> </div> - <div class="details" ng-click="showDetailedJsonMessage(item)"> - <span class="title" ng-bind="item.source"></span> <span - class="title" ng-bind="item.title"></span> <span - class="message-body" ng-if="item.source==='EP'" + <div class="details" ng-click="showDetailedJsonMessage(item)"> + <span class="title" ng-bind="item.msgSource"></span> <span + class="title" ng-bind="item.msgHeader"></span> <span + class="message-body" ng-if="item.msgSource==='EP'" ng-bind="item.message"></span> <span class="message-body" - ng-if="item.source!=='EP'" + ng-if="item.msgSource!=='EP'" ng-bind="item.message| elipsis: 27"> </span> <!-- <span class="date" ng-bind="item.time" ></span> --> <mydate>{{item.time | date:'MM/dd/yyyy hh:mm:ss a Z'}}</mydate> @@ -260,13 +261,14 @@ </div> <div class="notification-footer"> <div class="notification-links"> - <div style="clear:both;"></div> + <div class="notification-common-space"></div> </div> </div> </div> </b2b-flyout-content> </b2b-flyout> </li> + <li class="header__item recommendation" aria-haspopup="true" class="recommendation-li"> <div ng-include class="recommendation-detail-extension" src="'app/views/headerRecommendation/headerRecommendations.tpl.html'"></div> |