aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
diff options
context:
space:
mode:
authorITSERVICES\rb7147 <rb7147@att.com>2017-05-08 22:20:44 -0400
committerITSERVICES\rb7147 <rb7147@att.com>2017-05-09 13:58:03 -0400
commitdda032f8bb161d54eb1f59de2b4a3efb774fc4d1 (patch)
tree9a11825d59434d97bb0c7dcbf00a0b84e7e5f526 /POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
parenta330af579866dacbe595e2e4ad1dd29cd3c96945 (diff)
Policy 1707 Second commit
Change-Id: I18f5b142238733d17280cf17c3d1dd28204d34e9 Signed-off-by: ITSERVICES\rb7147 <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js29
1 files changed, 23 insertions, 6 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
index 9f2863579..20287baf1 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
@@ -17,11 +17,25 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-app.controller('baseConfigController', function ($scope, PolicyAppService, modalService, $modal, Notification) {
+app.controller('baseConfigController', ['$scope', 'PolicyAppService', 'policyNavigator', 'modalService', '$modal', 'Notification', function ($scope, PolicyAppService, PolicyNavigator, modalService, $modal, Notification) {
$("#dialog").hide();
+
+ $scope.policyNavigator;
$scope.savebutton = true;
-
+ $scope.refreshCheck = false;
+
+ $scope.refresh = function(){
+ if($scope.refreshCheck){
+ $scope.policyNavigator.refresh();
+ }
+ $scope.modal('createNewPolicy', true);
+ };
+
+ $scope.modal = function(id, hide) {
+ return $('#' + id).modal(hide ? 'hide' : 'show');
+ };
+
PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
var j = data;
$scope.data = JSON.parse(j.data);
@@ -61,8 +75,12 @@ app.controller('baseConfigController', function ($scope, PolicyAppService, modal
}
$scope.savePolicy = function(policy){
+ if(policy.itemContent != undefined){
+ $scope.refreshCheck = true;
+ $scope.policyNavigator = policy.itemContent;
+ policy.itemContent = "";
+ }
$scope.savebutton = false;
- console.log(policy);
var uuu = "policycreation/save_policy";
var postData={policyData: policy};
$.ajax({
@@ -92,7 +110,7 @@ app.controller('baseConfigController', function ($scope, PolicyAppService, modal
$scope.validatePolicy = function(policy){
- console.log(policy);
+ $scope.scope = policy.domain;
document.getElementById("validate").innerHTML = "";
var uuu = "policyController/validate_policy.htm";
var postData={policyData: policy};
@@ -150,5 +168,4 @@ app.controller('baseConfigController', function ($scope, PolicyAppService, modal
var lastItem = $scope.temp.policy.attributes.length-1;
$scope.temp.policy.attributes.splice(lastItem);
};
-
-}); \ No newline at end of file
+}]); \ No newline at end of file