2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 myApp.service('viewReportService', ['$http', function($http) {
23 this.getAllVNF = function() {
25 return $http.get('/getAllBackupVnfIds')
26 .then(function(response) {
27 console.log("---validationTestService::getAllVNF::TestResponse---" + JSON.stringify(response));
28 vnflist = response.data;
32 console.log("validationTestService::getAllVNF::Status Code", response.status);
38 this.getData = function(startDate, endDate) {
41 if (startDate != null && endDate != null) {
43 data.startdate = startDate;
44 data.enddate = endDate;
49 url: '/getVnfDetBetDates/'+startDate+'/'+endDate+'/',
52 'Content-Type': 'application/json',
57 .then(function(response) {
58 console.log("---deviceConfigService::getVersions::Response---" + JSON.stringify(response));
62 console.log("--deviceConfigService::getVersions::Status Code--", response.status);
69 this.getDataById = function(selectedValueVnf,startDate, endDate) {
72 if (startDate != null && endDate != null) {
74 data.startdate = startDate;
75 data.enddate = endDate;
80 url: '/getVnfDetByVnfidBetDates/'+selectedValueVnf+'/'+startDate+'/'+endDate+'/',
83 'Content-Type': 'application/json',
88 .then(function(response) {
89 console.log("---deviceConfigService::getVersions::Response---" + JSON.stringify(response));
93 console.log("--deviceConfigService::getVersions::Status Code--", response.status);