From 23634dba70b166ad3c79b5eadfbd32b5375d44be Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Mon, 25 Sep 2017 16:07:54 -0400 Subject: MariaDB Connector and Sonar Scans; clean nl PORTAL-50: Fix to get the Sonar coverage for ONAP PORTAL-72: Sonar scan - resolving severity Blocker issues PORTAL-86: Remove internal att.com usages from tests and other files PORTAL-102: Fixed the page refresh issue on App Account Management page PORTAL-103: Fix to enhanced notification ticket source for ONAP PORTAL-104: Replaced mysql DB connector with mariaDB Issue: PORTAL-50 PORTAL-72 PORTAL-86 PORTAL-102 PORTAL-103 PORTAL-104 Change-Id: Iae78ad34ed9ce5ae1f2d36fcbb93fbc1e39944e5 Signed-off-by: Christopher Lott (cl778h) --- .../search-users/search-users.controller.spec.js | 2 +- .../services/notification/notification.service.js | 4 +- .../views/dashboard/dashboard-widget.controller.js | 3 +- .../menu-details.controller.js | 4 +- .../client/app/views/header/header.less | 7 +++ .../microservice-add-details.js | 8 ++-- .../user.notifications.modal.controller.js | 51 ---------------------- .../user.notifications.modal.page.html | 6 +-- .../users/new-user-dialogs/new-user.controller.js | 14 ++++-- .../widget-onboarding.controller.js | 2 +- 10 files changed, 29 insertions(+), 72 deletions(-) (limited to 'ecomp-portal-FE-common') diff --git a/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js b/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js index e3c9711c..5cdac0b3 100644 --- a/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js +++ b/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js @@ -75,7 +75,7 @@ // it('should populate retrieved users when search users service returns a list ', ()=> { // //spyOn(usersServiceMock, 'searchUsers'); // let usersListRes = [{user: 1}, {user: 2}]; -// newCtrl.searchUserString = 'some att user name'; +// newCtrl.searchUserString = 'some org user name'; // deferredUsersList.resolve(usersListRes); // newCtrl.searchUsers(); // $rootScope.$apply(); diff --git a/ecomp-portal-FE-common/client/app/services/notification/notification.service.js b/ecomp-portal-FE-common/client/app/services/notification/notification.service.js index d7d46079..0eea70c4 100644 --- a/ecomp-portal-FE-common/client/app/services/notification/notification.service.js +++ b/ecomp-portal-FE-common/client/app/services/notification/notification.service.js @@ -17,9 +17,7 @@ * limitations under the License. * ================================================================================ */ -/** - * Created by wl849v on 12/14/2016. - */ + 'use strict'; (function () { class NotificationService { diff --git a/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js b/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js index aff4e0c1..7767cdbb 100644 --- a/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js +++ b/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js @@ -132,8 +132,7 @@ dashboardService.saveCommonWidgetData($scope.newWidgetObject) .then(function(res){ - if (res.status == 'OK') { - $scope.widgetForm.$setPristine(); + if (res.status == 'OK') { confirmBoxService.showInformation('You have added a new item').then(isConfirmed => { }); dashboardService.getCommonWidgetData(message.type) diff --git a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js index a425297a..764399a8 100644 --- a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js +++ b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js @@ -290,9 +290,7 @@ functionalMenuService.saveEditedMenuItem(activeMenuItem) .then(() => { $log.debug('MenuDetailsModalCtrl::saveChanges: Menu Item saved'); - // $scope.closeThisDialog(true); - $scope.$dismiss('cancel'); - + $scope.$close(true); }).catch(err => { if(err.status === 409){//Conflict handleConflictErrors(err); 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 5a6314f9..eb0f14a7 100644 --- a/ecomp-portal-FE-common/client/app/views/header/header.less +++ b/ecomp-portal-FE-common/client/app/views/header/header.less @@ -510,6 +510,13 @@ column-count: 4; } +#header-favorites{ + height:200px; + overflow:auto; + overflow-x:hidden; + -ms-overflow-x:hidden; +} + #header-favorites ul li{ width:100%; } diff --git a/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js b/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js index c992b9a0..dff938a2 100644 --- a/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js +++ b/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js @@ -213,10 +213,10 @@ userProfileService.getUserProfile() .then(profile=> { $log.info('AppDetailsModalCtrl::emptyCookies profile: ', profile); - $scope.attuid = profile.attuid; - $log.info('user has the following attuid: ' + profile.attuid); - if ($cookies.getObject($scope.attuid + '_widget') != undefined && $cookies.getObject($scope.attuid + '_widget') != null) { - $cookies.remove($scope.attuid + '_widget'); + $scope.orgUserId = profile.orgUserId; + $log.info('user has the following orgUserId: ' + profile.orgUserId); + if ($cookies.getObject($scope.orgUserId + '_widget') != undefined && $cookies.getObject($scope.orgUserId + '_widget') != null) { + $cookies.remove($scope.orgUserId + '_widget'); } }); }; diff --git a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js index 366fb215..65395f16 100644 --- a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js +++ b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js @@ -793,55 +793,4 @@ userNotificationsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'confirmBoxService', 'notificationService', '$modal', 'ngDialog', '$state', '$filter', 'items']; angular.module('ecompApp').controller('userNotificationsModalCtrl', userNotificationsModalCtrl); - angular.module('ecompApp').directive('attDatepickerCustom', ['$log', function($log) { - return { - restrict: 'A', - require: 'ngModel', - scope: {}, - - controller: ['$scope', '$element', '$attrs', '$compile', 'datepickerConfig', 'datepickerService', function($scope, $element, $attrs, $compile, datepickerConfig, datepickerService) { - var dateFormatString = angular.isDefined($attrs.dateFormat) ? $scope.$parent.$eval($attrs.dateFormat) : datepickerConfig.dateFormat; - var selectedDateMessage = '
the date you selected is {{$parent.current | date : \'' + dateFormatString + '\'}}
'; - $element.removeAttr('att-datepicker-custom'); - $element.removeAttr('ng-model'); - $element.attr('ng-value', '$parent.current | date:"EEEE, MMMM d, y"'); - $element.attr('aria-describedby', 'datepicker'); - - $element.attr('maxlength', 10); - - var wrapperElement = angular.element('
'); - wrapperElement.attr('datepicker-popup', ''); - wrapperElement.attr('current', 'current'); - - datepickerService.setAttributes($attrs, wrapperElement); - datepickerService.bindScope($attrs, $scope); - - wrapperElement.html(''); - wrapperElement.append($element.prop('outerHTML')); - if (navigator.userAgent.match(/MSIE 8/) === null) { - wrapperElement.append(selectedDateMessage); - } - var elm = wrapperElement.prop('outerHTML'); - elm = $compile(elm)($scope); - $element.replaceWith(elm); - }], - link: function(scope, elem, attr, ctrl) { - if (!ctrl) { - // do nothing if no ng-model - $log.error("ng-model is required."); - return; - } - - scope.$watch('current', function(value) { - ctrl.$setViewValue(value); - }); - ctrl.$render = function() { - scope.current = ctrl.$viewValue; - }; - - } - }; - }]); - - })(); \ No newline at end of file diff --git a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html index 5d1698e5..95da7812 100644 --- a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html +++ b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html @@ -6,7 +6,7 @@ ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - You may obtain a copy of the License at + You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -136,7 +136,7 @@ Please enter valid date in MM/DD/YYYY format!
- Date should be greater than or equal to current date! + Date should not be greater than 4 months from current date!
@@ -158,7 +158,7 @@ Please enter valid date in MM/DD/YYYY format!
- Date should be greater than or equal to current date! + Date should not be greater than 4 months from current date!
End Date must be greater than start Date diff --git a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js index 5367ecf8..10d6c954 100644 --- a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js +++ b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js @@ -174,11 +174,17 @@ app.isDoneUpdating = true; this.numberAppsSucceeded++; }).catch(err => { - $log.error(err); - app.isErrorUpdating = true; + $log.error(err); + var errorMessage = 'Failed to update the user application roles: ' + err.status; + if(err.status == 504){ + this.numberAppsSucceeded++; + errorMessage = 'Request is being processed, please check back later!'; + } else{ + app.isErrorUpdating = true; + } confirmBoxService.showInformation( - 'Failed to update the user application roles: ' + err.status) - .then(isConfirmed => {}); + errorMessage) + .then(isConfirmed => {}); }).finally(()=>{ this.numberAppsProcessed++; if (this.numberAppsProcessed === this.adminApps.length) { diff --git a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js index 8dc2201b..a5793629 100644 --- a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js +++ b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js @@ -122,7 +122,7 @@ }; this.filterByDropdownValue = item => { - if(this.filterByApp.value === '') + if(this.filterByApp.value === '' || this.filterByApp.value === 'All Applications') return true; for(var i = 0; i < item.appName.length; i++){ -- cgit 1.2.3-korg