Added Policy GUI Cosmetic Fixes
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplateController / ActionPolicyController.js
index 0bfcd3c..a9097d5 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * ECOMP Policy Engine
+ * ONAP Policy Engine
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
@@ -24,6 +24,12 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
     $scope.savebutton = true;
     $scope.refreshCheck = false;
        
+    if(!$scope.temp.policy.editPolicy  && !$scope.temp.policy.readOnly){
+       $scope.temp.policy = {
+                       policyType : "Action"
+       }
+    };
+    
     $scope.refresh = function(){
        if($scope.refreshCheck){
                $scope.policyNavigator.refresh();
@@ -143,6 +149,7 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
 
     if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
        $scope.temp.policy.attributes = [];
+       $scope.temp.policy.attributes.push({'id':'choice'+1});
         $scope.temp.policy.ruleAlgorithmschoices = [];
     }else{
           if($scope.temp.policy.attributes.length == 0){