Reorganize app pages (#73)

* Update layout and menus

* Add breadcrumbs
Add menu icons
Add ECU drop down

* Implement submenu
Update download progress

* revamped dashboard section - failing app.test.js

* Clean up

Co-authored-by: Drew Taylor <dtaylor@fiskerinc.com>
This commit is contained in:
John Wu
2021-08-10 08:11:06 -07:00
committed by GitHub
parent 0545b54daf
commit e50eb886e6
39 changed files with 4043 additions and 3623 deletions

View File

@@ -0,0 +1,19 @@
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)),
};
export default vehiclesAPI;

6
src/services/grafana.js Normal file
View File

@@ -0,0 +1,6 @@
const grafanaAPI = {
getCarsCount: async () => 500,
getSignalsCount: async () => 1234567890,
};
export default grafanaAPI;