removed greeting and fixed grafana mock
This commit is contained in:
@@ -1,19 +1,6 @@
|
||||
const grafanaAPI = {
|
||||
getCarsCount: async () => fetch(`${API_ENDPOINT}/?query=SELECT%20countDistinct(vin)%20as%20count%0AFROM%20default.vehicle_data%20FORMAT%20JSON`, {
|
||||
method: "GET",
|
||||
headers: Object.assign({ "Content-Type": "application/json" }),
|
||||
})
|
||||
.then(fetchRespHandler)
|
||||
.then(result => result.data[0].count)
|
||||
.catch(error => console.log(error)),
|
||||
|
||||
getSignalsCount: async () => fetch(`${API_ENDPOINT}/?query=SELECT%20count()%20as%20count%0AFROM%20default.vehicle_signal%20FORMAT%20JSON`, {
|
||||
method: "GET",
|
||||
headers: Object.assign({ "Content-Type": "application/json" }),
|
||||
})
|
||||
.then(fetchRespHandler)
|
||||
.then(result => result.data[0].count)
|
||||
.catch(error => console.log(error)),
|
||||
getCarsCount: async () => 500,
|
||||
getSignalsCount: async () => 1234567890,
|
||||
};
|
||||
|
||||
export default vehiclesAPI;
|
||||
export default grafanaAPI;
|
||||
|
||||
Reference in New Issue
Block a user