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=d471f2763c2494ab1997f84596094499ae6f9eaf;hb=dda032f8bb161d54eb1f59de2b4a3efb774fc4d1;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..d471f2763 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
@@ -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)) {