removed greeting and fixed grafana mock

This commit is contained in:
Drew Taylor
2021-08-10 15:52:10 -07:00
parent e50eb886e6
commit 378e58a310
5 changed files with 29 additions and 45 deletions

View File

@@ -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;