summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2018-02-01 12:07:13 -0500
committerrb7147 <rb7147@att.com>2018-02-01 13:50:11 -0500
commit1148834bc4b10d00c1b1830b087357e63af8293f (patch)
treef3a6d166f8a86c8b2b0a9bc1b062f9fc87cd3d58 /POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js
parent066fc4529f36d210a4a4700e8dbfd2cb42f4dc66 (diff)
Included Policy GUI Enhancements and validations
Added hover messages for all policy templates. Resolved few sonar issues. Added fixes for Policy GUI Validations. Issue-ID: POLICY-597 Change-Id: I74abb92dd6ac8722d7869b6a316fad1d8db11d9c Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js32
1 files changed, 17 insertions, 15 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js
index cab5d26c0..966a0913e 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/pdpController.js
@@ -53,14 +53,7 @@ app.controller('pdpTabController', function ($scope, PolicyAppService, modalServ
$scope.editPdpGroupId = true;
}
}
-
- PolicyAppService.getData('get_PDPGroupData').then(function(data){
- var j = data;
- $scope.pdpdatas = JSON.parse(j.data);
- console.log($scope.pdpdatas);
- },function(error){
- console.log("failed");
- });
+ getPDPGroups();
},function (error) {
console.log("failed");
});
@@ -77,7 +70,6 @@ app.controller('pdpTabController', function ($scope, PolicyAppService, modalServ
};
$scope.editPDPGroup = null;
- var dialog = null;
$scope.editPDPGroupFunctionPopup = function(pdpGroupData) {
$scope.editPDPGroup = pdpGroupData;
$( "#dialog" ).dialog({
@@ -87,8 +79,9 @@ app.controller('pdpTabController', function ($scope, PolicyAppService, modalServ
$scope.editPDPGroupFunctionModalPopup = function(pdpGroupData) {
$scope.editPDPGroup = pdpGroupData;
+ var modalInstance;
if($scope.userRolesDatas[0] == 'super-guest' || $scope.userRolesDatas[0] == 'guest'){
- var modalInstance = $modal.open({
+ modalInstance = $modal.open({
backdrop: 'static', keyboard: false,
templateUrl: 'show_policies_pdp_group_popup.html',
controller: 'editPDPGrouppopupController',
@@ -102,7 +95,7 @@ app.controller('pdpTabController', function ($scope, PolicyAppService, modalServ
}
});
}else{
- var modalInstance = $modal.open({
+ modalInstance = $modal.open({
backdrop: 'static', keyboard: false,
templateUrl: 'edit_pdp_group_popup.html',
controller: 'editPDPGrouppopupController',
@@ -118,10 +111,20 @@ app.controller('pdpTabController', function ($scope, PolicyAppService, modalServ
}
modalInstance.result.then(function(response){
console.log('response', response);
- $scope.pdpdatas=response.data;
+ getPDPGroups();
});
};
+ function getPDPGroups(){
+ PolicyAppService.getData('get_PDPGroupData').then(function(data){
+ var j = data;
+ $scope.pdpdatas = JSON.parse(j.data);
+ console.log($scope.pdpdatas);
+ },function(error){
+ console.log("failed");
+ });
+ }
+
$scope.addNewPDPGroupPopUpWindow = function(editPDPGroup) {
$scope.editPDPGroup = null;
var modalInstance = $modal.open({
@@ -161,9 +164,8 @@ app.controller('pdpTabController', function ($scope, PolicyAppService, modalServ
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.pdpdata=data.data;});
- $scope.pdpdatas=JSON.parse(data.data);
+ success : function(response){
+ $scope.$apply(function(){$scope.pdpdatas=JSON.parse(response.data);});
},
error : function(data){
console.log(data);