PageSourceSearch

https://smartrack.live/js/service/diagnostics-service.js

js smartrack.live collected 2026-10-02 01:07:25 UTC 4,561 bytes, 127 lines download raw bytes

1angular.module('IotaSmart.service')
2
3	.service('DiagnosticsService', function ($http, API_URL) {
4
5		return {
6			getHealthDet: function (userId) {
7				return $http({
8					method: 'GET',
9					url: API_URL + "/healthservice/v1/health",
10					params: { 'userId': userId }
11				}).then(function successCallback(response) {
12					return response;
13				}, function errorCallback(error) {
14					return error;
15				});
16			},
17			getMaintenanceDet: function (userId) {
18				return $http({
19					method: 'GET',
20					url: API_URL + "/maintenanceservice/v1/maintenance",
21					params: { 'userId': userId }
22				}).then(function successCallback(response) {
23					return response;
24				}, function errorCallback(error) {
25					return error;
26				});
27			},
28			getDriverScore: function (userId) {
29				return $http({
30					method: 'GET',
31					url: API_URL + "/tripservice/v1/driver/score/lastmonth",
32					params: { 'userId': userId }
33				}).then(function successCallback(response) {
34					return response;
35				}, function errorCallback(error) {
36					return error;
37				});
38			},
39			getDtcCodesDesc: function (dtcCodes, carMake) {
40				return $http({
41					method: 'GET',
42					headers: { 'Content-Type': 'application/json' },
43					url: API_URL + "/healthservice/v1/health/dtccodesdesc",
44					params: { 'codes': dtcCodes, 'carMake': carMake }
45				}).then(function successCallback(response) {
46					return response;
47				}, function errorCallback(error) {
48					return error;
49				});
50			},
51			getDiagnosisByRpm: function (deviceId, fromDate) {
52				return $http({
53					method: 'GET',
54					headers: { 'Content-Type': 'application/json' },
55					url: API_URL + "/healthservice/v1/diagnosis/rpmrecords",
56					params: { 'deviceId': deviceId, 'fromDate': fromDate }
57				}).then(function successCallback(response) {
58					return response;
59				}, function errorCallback(error) {
60					return error;
61				});
62			},
63			getDiagnosisBySpeed: function (deviceId, fromDate) {
64				return $http({
65					method: 'GET',
66					headers: { 'Content-Type': 'application/json' },
67					url: API_URL + "/healthservice/v1/diagnosis/speedrecords",
68					params: { 'deviceId': deviceId, 'fromDate': fromDate }
69				}).then(function successCallback(response) {
70					return response;
71				}, function errorCallback(error) {
72					return error;
73				});
74			},
75			getDiagnosisByEct: function (deviceId, fromDate) {
76				return $http({
77					method: 'GET',
78					headers: { 'Content-Type': 'application/json' },
79					url: API_URL + "/healthservice/v1/diagnosis/ectrecords",
80					params: { 'deviceId': deviceId, 'fromDate': fromDate }
81				}).then(function successCallback(response) {
82					return response;
83				}, function errorCallback(error) {
84					return error;
85				});
86			},
87			getDiagnosisByIat: function (deviceId, fromDate) {
88				return $http({
89					method: 'GET',
90					headers: { 'Content-Type': 'application/json' },
91					url: API_URL + "/healthservice/v1/diagnosis/iatrecords",
92					params: { 'deviceId': deviceId, 'fromDate': fromDate }
93				}).then(function successCallback(response) {
94					return response;
95				}, function errorCallback(error) {
96					return error;
97				});
98			},
99			// resetMaintenance: function (deviceId, type, isTyre, fixDateInMilli, desc) {
100			// 	return $http({
101			// 		method: 'PUT',
102			// 		url: API_URL + "/maintenanceservice/v1/maintenance/reset",
103			// 		params: { 'deviceId': deviceId, 'type': type, 'fixDateInMilli': fixDateInMilli, 'isTyre': isTyre, 'description': desc }
104			// 	}).then(function successCallback(response) {
105			// 		return response;
106			// 	}, function errorCallback(error) {
107			// 		return error;
108			// 	});
109			// },
110			maintenanceResetOrSubmit: function (deviceId, type, isTyre, fixDateInMilli, desc, optnClear, maintenanceTimeTaken,
111				maintenanceCost, garageName, timeValue, distanceValue, currency, rescheduleDate) {
112				return $http({
113					method: 'PUT',
114					url: API_URL + "/maintenanceservice/v1/maintenance/reset",
115					params: {
116						'deviceId': deviceId, 'type': type, 'fixDateInMilli': fixDateInMilli, 'isTyre': isTyre, 'description': desc, 'optnClear': optnClear,
117						'currency': currency, 'maintenanceTimeTaken': maintenanceTimeTaken, 'maintenanceCost': maintenanceCost, 'garageName': garageName, 'timeValue': timeValue,
118						'distanceValue': distanceValue, 'changeDateInMilli': rescheduleDate
119					}
120				}).then(function successCallback(response) {
121					return response;
122				}, function errorCallback(error) {
123					return error;
124				});
125			},
126		}
127	});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.