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:
@@ -8,12 +8,12 @@ import {
|
||||
TablePagination,
|
||||
TableRow
|
||||
} from "@material-ui/core";
|
||||
import LinearProgress from '@mui/material/LinearProgress';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import FormGroup from '@mui/material/FormGroup';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import FormControl from '@mui/material/FormControl';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import FormGroup from '@mui/material/FormGroup';
|
||||
import FormLabel from '@mui/material/FormLabel';
|
||||
import LinearProgress from '@mui/material/LinearProgress';
|
||||
|
||||
import {
|
||||
KeyboardDatePicker, MuiPickersUtilsProvider
|
||||
@@ -134,7 +134,6 @@ const TRexLogsTable = ({ vin, token, classes }) => {
|
||||
|
||||
let controller = new AbortController()
|
||||
const readBlob = async (offset, count) => {
|
||||
console.log(`reading from offset: ${offset}`)
|
||||
return await api.getTRexLogs(vin, fromatDateForRequest(selectedDate), offset, count, "UP", token, controller)
|
||||
}
|
||||
const getDesiredSize = () => {
|
||||
@@ -156,10 +155,8 @@ const TRexLogsTable = ({ vin, token, classes }) => {
|
||||
fetched.error = result.error
|
||||
break
|
||||
}
|
||||
console.log(`ret.RealOffset ${result.RealOffset}\nret.bytesRead ${result.bytesRead}\ndesired offset ${offset}\ndesired read size ${readSize}\nblobsize: ${result.blobSize}`)
|
||||
setBlobSize(result.blobSize)
|
||||
readSize *= 2
|
||||
console.log(`new read size: ${readSize}`)
|
||||
offset = result.RealOffset + result.bytesRead
|
||||
setCurrentOffset(offset)
|
||||
fetched = transformLogs(result.data).concat(fetched)
|
||||
@@ -179,7 +176,6 @@ const TRexLogsTable = ({ vin, token, classes }) => {
|
||||
setTotal(0)
|
||||
const msg = `Cannot fetch logs for ${fromatDateForRequest(selectedDate)}`
|
||||
setMessage(msg)
|
||||
console.log(`${msg}, Cloud error:\n${fetched.error}`);
|
||||
return
|
||||
}
|
||||
setCurrentOffset(offset)
|
||||
@@ -191,9 +187,7 @@ const TRexLogsTable = ({ vin, token, classes }) => {
|
||||
try {
|
||||
if (!vin || !token) return;
|
||||
const desiredSize = getDesiredSize()
|
||||
console.log(`desired size: ${desiredSize}, actual size: ${logs.length}`)
|
||||
if (desiredSize < logs.length || allLogsFetched) {
|
||||
console.log(`enough logs in cache`)
|
||||
setTotal(getFilteredLogs(logs).length)
|
||||
return
|
||||
}
|
||||
@@ -228,7 +222,6 @@ const TRexLogsTable = ({ vin, token, classes }) => {
|
||||
|
||||
const handleNewFilter = (event) => {
|
||||
setPageIndex(0)
|
||||
console.log(event)
|
||||
setCurrentLogLevels({
|
||||
...currectLogLevels,
|
||||
[event.target.defaultValue]: event.target.checked,
|
||||
|
||||
Reference in New Issue
Block a user