diff options
author | 2018-09-25 18:30:17 +0530 | |
---|---|---|
committer | 2018-10-04 19:56:20 +0000 | |
commit | dd065f3dbb499762a39bddf0afe794e9b4aa67ec (patch) | |
tree | ff01861ccdc7dd30caa32b33a62407b0687f3139 /configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js | |
parent | 0d607948ff5a38a1ca0306bc68f7985a94b0be37 (diff) |
Refactor code and fix some ui issues
Refactor code for SDNC-256 user story and fix some ui allignment issues
Change-Id: I99811da092afc967d49ee7214c333d84ed458725
Issue-ID: SDNC-465
Signed-off-by: Soumendu Sekhar Acharya <SA00498080@techmahindra.com>
Former-commit-id: ec3d47bd91eb653a20c98a79a4d6af645f098aa3
Diffstat (limited to 'configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js')
-rw-r--r-- | configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js index 7b5c688e..42bafcd9 100644 --- a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js @@ -34,8 +34,7 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN }); }; - - + this.getAllVNF = function() { var testlist = {}; return $http.get('/getAllBackupVnfIds') @@ -51,11 +50,24 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN }; + this.getAllVnfIds = function() { + var rctestlist = {}; + return $http.get('/getAllVnfIds') + .then(function(response) { + console.log("---validationTestService::getAllVNF From Restconf::TestResponse---" + JSON.stringify(response)); + vnflist = response.data; + return vnflist; + }, + function(response) { + console.log("validationTestService::getAllVNF From Restconf::Status Code", response.status); + return response; + }); + + }; + this.getVersions = function(vnfId) { var data = {}; -// data.selectedVnfName = vnfName; -// data.selectedVnfType = vnfType; data.vnfId = vnfId; var config = { params: data, @@ -67,15 +79,9 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN console.log("deviceConfigService::getVersions::config", JSON.stringify(config)); var baseUrl = VNF_API_BASE; - // var baseApi='runtest'; - // var apiUrl= baseUrl + baseApi; - - // Call the pre validation service var request = { method: 'GET', url: '/configDetailsById/'+vnfId, - //url: 'sdnc-stubs/getAllConfigForVNF.json', - //data: data, headers: { 'Content-Type': 'application/json', @@ -144,22 +150,6 @@ myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VN console.log("validationTestService::getAllVNF::Status Code", response); return newConfig; }); - /*.then(function (response) { - if (response.data) - { $scope.successMessage1 = "Put Data Method Executed Successfully!"; - return response; - } - var status= response.status; - if (status == 200){ - $window.alert("applyed successfully "); - } - var successMessage1 = "Put Data Method Executed Successfully!"; - }, - function (response) { - var successMessage1 = "Service not Exists"; - }); - - */ }; |