Added Policy GUI Cosmetic Fixes
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplateController / ClosedLoopPMController.js
index b74f1b3..a672660 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * ECOMP Policy Engine
+ * ONAP Policy Engine
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
@@ -23,7 +23,14 @@ angular.module("abs").controller('clPMController', ['$scope', '$window', '$timeo
         $scope.policyNavigator;
         $scope.savebutton = true;
         $scope.refreshCheck = false;
-           
+       
+        if(!$scope.temp.policy.editPolicy  && !$scope.temp.policy.readOnly){
+                $scope.temp.policy = {
+                                policyType : "Config",
+                                configPolicyType : "ClosedLoop_PM"
+                }
+        };
+        
         $scope.refresh = function(){
           if($scope.refreshCheck){
                $scope.policyNavigator.refresh();
@@ -35,13 +42,22 @@ angular.module("abs").controller('clPMController', ['$scope', '$window', '$timeo
          $scope.modal = function(id, hide) {
              return $('#' + id).modal(hide ? 'hide' : 'show');
          };
+         
+         $('#ttlDate').datepicker({
+                 dateFormat: 'dd/mm/yy',
+                 changeMonth: true,
+                 changeYear: true,
+                 onSelect: function(date) {
+                         angular.element($('#ttlDate')).triggerHandler('input');
+                 }
+         });
         
-        PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
+        PolicyAppService.getData('getDictionary/get_OnapNameDataByName').then(function (data) {
                 var j = data;
                 $scope.data = JSON.parse(j.data);
                 console.log($scope.data);
-                $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
-                console.log($scope.ecompNameDictionaryDatas);
+                $scope.onapNameDictionaryDatas = JSON.parse($scope.data.onapNameDictionaryDatas);
+                console.log($scope.onapNameDictionaryDatas);
         }, function (error) {
                 console.log("failed");
         });