CEC-3514 create can self serve page (#288)
* first push * fix snapshot * remove unused vars * update snap * remove some console logs * Remove snapshot * Update * CEC-3770 Update cert expire text (#282) * CEC-3577: fetch T.Rex log from the cloud (#283) * CEC-3577: fetch T.Rex log from the cloud * tabs? * CSS * smells * fix smells and warnings * suggestions * CEC-3577 Style tweak (#284) * CEC-3577: trex logs (#285) * CEC-3577: trex logs add filtering add progress bar for log fetching always fetch all the logs request canceling * don't hide progress * CEC-3751, CEC-3478 misc window status and invalid location value (#287) * CEC-3751 misc window status CEC-3478 invalid location value * Fix snapshot Update browser list * merge develop update snap * resolve comments * add date and time picker seperately, use checkbox for dropdown * added verification for date and fixed time picker * fix snap * resolve comments * removed small bug * tweak layout * added snap shot test for can signals * small change * Fix test * fix sms snap * change function name * mock can signals api * resolved comments * fix ci * Clean up --------- Co-authored-by: jwu-fisker <jwu@fiskerinc.com> Co-authored-by: John Wu <76966357+jwu-fisker@users.noreply.github.com> Co-authored-by: Eduard Voronkin <116690094+eduardvoronkin@users.noreply.github.com>
This commit is contained in:
32
src/services/CANSignalAPI.js
Normal file
32
src/services/CANSignalAPI.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
|
||||
} from "../utils/http";
|
||||
|
||||
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
|
||||
|
||||
const canSignalAPI = {
|
||||
|
||||
getCanSignalsVin: async (vin, timestamp_start, timestamp_end, can_signals, token) =>
|
||||
fetch(addQueryParams(`${API_ENDPOINT}/can_signals_export`, { vin, timestamp_start, timestamp_end, can_signals }), {
|
||||
method: "GET",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
responseType: "blob"
|
||||
})
|
||||
.catch(errorHandler),
|
||||
|
||||
|
||||
getCanSignalList: async (token) =>
|
||||
fetch(addQueryParams(`${API_ENDPOINT}/can_signals_list`), {
|
||||
method: "GET",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
})
|
||||
.then(fetchRespHandler)
|
||||
.catch(errorHandler),
|
||||
};
|
||||
export default canSignalAPI;
|
||||
Reference in New Issue
Block a user