diff options
author | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-15 12:53:18 -0400 |
---|---|---|
committer | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-15 13:55:23 -0400 |
commit | 7e547eaa55920dfbc9691eab33bb728395b50cf2 (patch) | |
tree | 5d0d64928b4754f65b427cb79b43718f16019582 /POLICY-SDK-APP/src/main/webapp/app/policyApp/controller | |
parent | dda032f8bb161d54eb1f59de2b4a3efb774fc4d1 (diff) |
Policy TestSuite Enabled
Change-Id: I9f98c7dcdcf98713d73544956d873a84fc82adf7
Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/controller')
2 files changed, 51 insertions, 20 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js index d7b4c2b01..554f6d08f 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js @@ -160,7 +160,7 @@ app.controller('attributeDictGridController', function ($scope, PolicyAppService var i; if($scope.searchDatas.length > 0){ for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; + searchString += $scope.searchDatas[i] + "\n"; } }else{ searchString += "No Policies is Using this Value" diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js index 1c356ec19..a7964158c 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js @@ -133,26 +133,57 @@ app.controller('ecompNameDictGridController', function ($scope, PolicyAppService }; $scope.deleteEcompName = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Ecomp Name "+data.ecompName+". Do you want to continue?", - function(){ - var uuu = "deleteDictionary/ecomp_dictionary/remove_ecomp"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.ecompNameDictionaryDatas=data.ecompNameDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); + var uuu = "searchDictionary"; + var postData={data: data, type: "ecompName"}; + var searchString = "\n"; + $.ajax({ + type : 'POST', + url : uuu, + dataType: 'json', + contentType: 'application/json', + data: JSON.stringify(postData), + success : function(resultList){ + $scope.$apply(function(){ + $scope.list =resultList.result;}); + $scope.searchData = JSON.stringify(resultList.result); + $scope.searchDatas = JSON.parse($scope.searchData); + $scope.success = true; + var i; + if($scope.searchDatas.length > 0){ + for(i = 0 ; i < $scope.searchDatas.length; i++){ + searchString += $scope.searchDatas[i] + "\n"; + } + }else{ + searchString += "No Policies is Using this Value" + } - }) + console.log($scope.list); + if($scope.success){ + modalService.popupConfirmWin("Confirm","You are about to delete the Ecomp Name "+data.ecompName+".\n "+searchString+" \n Do you want to continue?", + function(){ + var uuu = "deleteDictionary/ecomp_dictionary/remove_ecomp"; + var postData={data: data}; + $.ajax({ + type : 'POST', + url : uuu, + dataType: 'json', + contentType: 'application/json', + data: JSON.stringify(postData), + success : function(data){ + $scope.$apply(function(){$scope.ecompNameDictionaryDatas=data.ecompNameDictionaryDatas;}); + }, + error : function(data){ + console.log(data); + modalService.showFailure("Fail","Error while deleting: "+ data.responseText); + } + }); + + })} + }, + error : function(data){ + alert("Error while Searching."); + } + }); }; });
\ No newline at end of file |