X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fwebapp%2Fapp%2FpolicyApp%2Fpolicy-models%2FEditor%2Fjs%2Fcontrollers%2FpolicyManager.js;h=7568030cfaa7c8045df80926fb1277bd77b336ea;hb=84b95a134c61217667b7eb7b7e774a485d2406ba;hp=869d26ba3962896bb8b1750a7694a2077eb0b297;hpb=e0addf5b588a1244f9679becd90999dfcb4c3a94;p=policy%2Fengine.git
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js
index 869d26ba3..7568030cf 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * ECOMP Policy Engine
+ * ONAP Policy Engine
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -58,11 +58,11 @@ app.controller('PolicyManagerController', [
console.log("failed");
});
- 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);
+ $scope.onapNameDictionaryDatas = JSON.parse($scope.data.onapNameDictionaryDatas);
}, function (error) {
console.log("failed");
});
@@ -186,7 +186,7 @@ app.controller('PolicyManagerController', [
return currentPath.indexOf(path) !== -1;
};
- $scope.watch = function(item){
+ $scope.watchPolicy = function(item){
var uuu = "watchPolicy";
var data = {name : item.model.name,
path : item.model.path};
@@ -208,55 +208,12 @@ app.controller('PolicyManagerController', [
}
});
};
-
- $scope.search = function(search){
- var deferred = $q.defer();
- var uuu = "searchPolicy";
- var postData = {searchdata : search};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.searchdata=data.result;});
- if($scope.searchdata[0].error != undefined){
- Notification.info($scope.searchdata[0].error);
- }else{
- var j = data;
- $scope.data = JSON.stringify(data.result);
- $scope.searchDatas = JSON.parse($scope.data);
- var searchString = "Policies List" + "
";
- var i;
- for(i = 0 ; i < $scope.searchDatas.length; i++){
- searchString += $scope.searchDatas[i].name + ".xml" + "
";
- }
- var myWindow = window.open("", "MsgWindow", "width=500,height=500");
- myWindow.document.write("
Search List
"); - myWindow.document.write(""+searchString+"
"); - } - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - - - /* $scope.describePolicy = function(item){ - item.describePolicy().then(function(){ - $scope.modal('describePolicy', true); - }); - }; - - $scope.exportPolicy = function(item){ - item.exportPolicy().then(function(){ - $scope.modal('exportPolicy', true); - }); - };*/ + + $scope.refresh = function(){ + $scope.policyNavigator.refresh(); + }; + $scope.switchVersion = function(item){ if ($scope.policyNavigator.fileNameExists(item.tempModel.content.activeVersion)) { item.error = 'Invalid filename or already exists, specify another name'; @@ -268,13 +225,6 @@ app.controller('PolicyManagerController', [ }); }; - - /* $scope.viewPolicy = function(item){ - item.viewPolicy().then(function(){ - $scope.modal('createNewPolicy', true); - }); - };*/ - $scope.copy = function(item) { var samePath = item.tempModel.path.join() === item.model.path.join(); if (samePath && $scope.policyNavigator.fileNameExists(item.tempModel.name)) {