CEC-244 Remote car commands, search, sortable tables (#42)

* Add sortable table header

* Send bulk commands page
Update table page sizes
All tables are sortable

* Update site layout
Add search to update packages

* Reenable Datadog

* remove dev stuff
This commit is contained in:
John Wu
2021-05-26 15:46:46 -07:00
committed by GitHub
parent 64995ef7a6
commit 931e1521e8
29 changed files with 1886 additions and 1541 deletions

View File

@@ -84,10 +84,10 @@ export const VehicleProvider = ({ children }) => {
}
};
const sendCommand = async (vin, command, token) => {
const sendCommand = async (vins, command, parameters, token) => {
try {
setBusy(true);
const result = await api.sendCommand(vin, command, token);
const result = await api.sendCommand(vins, command, parameters, token);
if (result.error)
throw new Error(`Send command error. ${result.message}`);
return result;
@@ -96,18 +96,6 @@ export const VehicleProvider = ({ children }) => {
}
};
const sendLogFilter = async (vin, filter, token) => {
try {
setBusy(true);
const result = await api.sendLog(vin, filter, token);
if (result.error)
throw new Error(`Send log filter error. ${result.message}`);
return result;
} finally {
setBusy(false);
}
};
return (
<VehicleContext.Provider
value={{
@@ -121,7 +109,6 @@ export const VehicleProvider = ({ children }) => {
getModels,
getYears,
sendCommand,
sendLogFilter,
}}
>
{children}