summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app
diff options
context:
space:
mode:
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js2
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js69
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/main/policyEditor.html1
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js2
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html6
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js6
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html4
7 files changed, 63 insertions, 27 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
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/main/policyEditor.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/main/policyEditor.html
index dedf4b414..fe822d4c3 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/main/policyEditor.html
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/main/policyEditor.html
@@ -271,7 +271,6 @@
<div ng-include src="'app/policyApp/Windows/Dictionary/RiskTypeDictionary.html'"></div>
<div ng-include src="'app/policyApp/Windows/Dictionary/SafePolicyWarningDictionary.html'"></div>
- <div ng-include src="'app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html'"></div>
<div ng-include src="'app/policyApp/Windows/PDPTabWindows/PdpStatusWindow.html'"></div>
<div ng-include src="'app/policyApp/Windows/Edit_Roles_Window.html'"></div>
<div ng-include src="'app/policyApp/Windows/PushtabWindow/removeGroupPoliciesWindow.html'"></div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
index ebec3a526..b37685739 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
@@ -121,7 +121,7 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo
$scope.datarule = data.policyData;
var modalInstance = $modal.open({
backdrop: 'static', keyboard: false,
- templateUrl : 'brmsshowrule',
+ templateUrl : 'app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html',
controller: 'showrulecontroller',
resolve: {
message: function () {
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html
index 45e482454..2e6b593de 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html
@@ -1,5 +1,4 @@
-<script type="text/ng-template" id="brmsshowrule">
-<div>
+<div class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
@@ -14,5 +13,4 @@
</div>
</div>
</div>
-</div>
-</script> \ No newline at end of file
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js
index 83c3820a6..445309f4c 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js
@@ -171,7 +171,11 @@ app.controller('PolicySearchController', [
$scope.$apply(function(){
var searchdata = data.result;
if(searchdata.length > 0){
- $scope.policyNavigator.searchrefresh(searchdata);
+ if(searchdata[0] == "Elastic Search Server is down"){
+ alert("Elastic Search Server is down.");
+ }else{
+ $scope.policyNavigator.searchrefresh(searchdata);
+ }
}else{
Notification.info("No Matches Found with your Search");
}
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html
index 63429d3de..db490c400 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html
@@ -30,6 +30,10 @@
margin-left: 10%;
margin-right: 10%;
}
+
+.modal-backdrop {
+ background-color: red;
+}
</style>
<div ng-app id="page-content" style="margin-bottom: 20px; width: 100%">
<div>