summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-09-25 15:52:24 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-09-25 15:53:55 -0400
commit3a2b5c60384feb490e878020bdb9c01f514d7856 (patch)
tree840d02d1090640b08aa481f52d3385ad92552991 /ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers
parent65c475eb72271f674f5ec4502fa67fd972344543 (diff)
Sonar Scans and Role Centralization; clean nl
PORTAL-21: centralized user role management PORTAL-72: Address Sonar Scan code issues for ONAP - mostly on raptor PORTAL-86: ONAP - Remove internal att.com usages from tests and otherfiles PORTAL-90: Add debug statements to demo app's class; no functional change Issue: PORTAL-21 PORTAL-72 PORTAL-86 PORTAL-90 Change-Id: I72a6c812009f51446330bf42bab6d3338d053805 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js16
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js10
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js5
3 files changed, 20 insertions, 11 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js
index 0c6105c8..0d95e72a 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js
@@ -704,7 +704,7 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
},function(error){
console.log("roleControllerDS2 failed: " + error);
- reloadPageOnce();
+ // reloadPageOnce();
}).finally(function() {
$scope.showLoader=false; // Always execute this on both error and success
});
@@ -727,7 +727,13 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
})
$scope.roleFnInit();
-
+ $scope.updateRoleFunction = function(){
+ $scope.role.roleFunctions=[];
+ for(var i=0;i<$scope.ociavailableRoleFunctions.length;i++){
+ if($scope.ociavailableRoleFunctions[i].selected)
+ $scope.role.roleFunctions.push($scope.ociavailableRoleFunctions[i]);
+ }
+ }
$scope.saveRole = function() {
var errorMsg;
$scope.showLoader=true;
@@ -841,6 +847,9 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
}
}
});
+ modalInstance.result.finally(function () {
+ $scope.updateRoleFunction();
+ });
}
$scope.addNewChildRoleFunctionModalPopup = function(data, role,info) {
@@ -860,6 +869,9 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal
}
}
});
+ modalInstance.result.finally(function () {
+ alert();
+ });
}
// remove role function associated to a role on Role Edit page
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js
index efe2b749..2c005365 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js
@@ -25,8 +25,7 @@ appDS2.controller('selfProfileController', function($scope, $http, $modal, $rout
$scope.pageType=2;
}
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
+
/***********************************************************functions***********************************************/
$scope.getProfileDetail = function(profileIdParam){
@@ -42,8 +41,7 @@ appDS2.controller('selfProfileController', function($scope, $http, $modal, $rout
$scope.ociTimeZones=JSON.parse($scope.data.timeZones);
$scope.ociCountries=JSON.parse($scope.data.countries);
stateList=JSON.parse($scope.data.stateList);
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
+
if($scope.ociavailableRoles)
$.each($scope.ociavailableRoles, function(i, a){
@@ -100,9 +98,7 @@ appDS2.controller('selfProfileController', function($scope, $http, $modal, $rout
$scope.ociTimeZones=JSON.parse($scope.data.timeZones);
$scope.ociCountries=JSON.parse($scope.data.countries);
stateList=JSON.parse($scope.data.stateList);
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
-
+
if($scope.ociavailableRoles)
$.each($scope.ociavailableRoles, function(i, a){
var availableRole = a;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js
index a3496785..2ae2b1b3 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js
@@ -1,5 +1,6 @@
-angular.module('att.abs.helper', []);
+/*angular.module('att.abs.helper', []);
angular.module('quantum', []);
//angular.module('ui.bootstrap', []);
appDS2=angular.module("workflowApp", ["ngRoute", 'ngMessages', 'ngCookies', 'b2b.att.tpls', 'ddh.att.tpls','ddh.att.dropdowns', 'ddh.att.switches', 'b2b.att.footer', 'b2b.att.header','gridster','ui.bootstrap']);
-
+*/
+var appDS2=angular.module("workflowApp", ["ngRoute", 'ngMessages','ngCookies','modalServices', 'ngCookies', 'b2b.att','gridster','ui.bootstrap','ui.bootstrap.modal']); \ No newline at end of file