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) {
22 this.getData = function(startDate, endDate, deviceName) {
25 if (startDate != null && endDate != null && deviceName != null) {
27 data.startdate = startDate;
28 data.enddate = endDate;
29 data.devicename = deviceName;
35 'Accept': 'application/json'
39 var sdate = new Date(startDate);
40 var edate = new Date(endDate);
44 return $http.get('/findReportByDeviceIP/'+sdate+'/'+edate+'/'+deviceName,config)
45 .then(function(result) {
46 console.log("--viewReportService::getdata::TestResponse--", JSON.stringify(result));
47 objTestList = result.data;
48 console.log("--viewReportService::getdata::TestResponse--", +JSON.stringify(objTestList));