Merge branch 'release/0.9.0'
This commit is contained in:
@@ -168,6 +168,43 @@ exports[`VehicleDetailsTab Render 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<label
|
||||
class="MuiFormControlLabel-root"
|
||||
>
|
||||
<span
|
||||
aria-disabled="false"
|
||||
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root-0 MuiCheckbox-root MuiCheckbox-colorSecondary MuiIconButton-colorSecondary"
|
||||
>
|
||||
<span
|
||||
class="MuiIconButton-label"
|
||||
>
|
||||
<input
|
||||
class="PrivateSwitchBase-input-0"
|
||||
data-indeterminate="false"
|
||||
type="checkbox"
|
||||
value=""
|
||||
/>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span
|
||||
class="MuiTouchRipple-root"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
|
||||
>
|
||||
FORCE CONFIG PUSH
|
||||
</span>
|
||||
</label>
|
||||
<a
|
||||
class=""
|
||||
href="/"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Grid, Tooltip } from "@material-ui/core";
|
||||
import { Checkbox, FormControlLabel, Grid, Tooltip } from "@material-ui/core";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import EditIcon from "@material-ui/icons/Edit";
|
||||
import UploadIcon from '@mui/icons-material/Upload';
|
||||
@@ -27,6 +27,7 @@ const MainForm = ({ vin }) => {
|
||||
const [redirect, setRedirect] = useState(null);
|
||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||
const [showUploadConfigModal, setShowUploadConfigModal] = useState(false);
|
||||
const [forced, setForced] = useState(false);
|
||||
const {
|
||||
token: {
|
||||
idToken: { jwtToken: token },
|
||||
@@ -35,8 +36,11 @@ const MainForm = ({ vin }) => {
|
||||
providers,
|
||||
} = useUserContext();
|
||||
|
||||
const ENV = process.env.REACT_APP_ENV;
|
||||
const showDebugMask = (ENV === 'local' || ENV === 'dev' || ENV === 'stg' || ENV === 'prd' || ENV === 'cec-prd' || ENV === 'cec-euprd')
|
||||
const showDebugMask = (process.env.REACT_APP_ENABLE_DEBUGMASK === "1");
|
||||
|
||||
const onForcedChange = (event) => {
|
||||
setForced(event.target.checked);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
@@ -64,7 +68,7 @@ const MainForm = ({ vin }) => {
|
||||
|
||||
const onUploadConfig = async () => {
|
||||
try {
|
||||
await uploadConfig(vin, token);
|
||||
await uploadConfig(vin, forced, token);
|
||||
setMessage(`Config Uploaded ${vin}`);
|
||||
} catch (e) {
|
||||
setMessage(e.message);
|
||||
@@ -160,6 +164,15 @@ const MainForm = ({ vin }) => {
|
||||
providers={providers}
|
||||
rolesPerProvider={Permissions.FiskerCreate}
|
||||
>
|
||||
<FormControlLabel
|
||||
label="FORCE CONFIG PUSH"
|
||||
control={
|
||||
<Checkbox
|
||||
checked={forced}
|
||||
onChange={onForcedChange}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<Tooltip key={`push-config-${vin}`} title={`Push Config "${vin}"`}>
|
||||
<Link to="#" onClick={() => setShowUploadConfigModal(true)}>
|
||||
<UploadIcon aria-label={`Push Config "${vin}"`} />
|
||||
|
||||
@@ -176,6 +176,43 @@ exports[`DetailsTab Render 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<label
|
||||
class="MuiFormControlLabel-root"
|
||||
>
|
||||
<span
|
||||
aria-disabled="false"
|
||||
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root-0 MuiCheckbox-root MuiCheckbox-colorSecondary MuiIconButton-colorSecondary"
|
||||
>
|
||||
<span
|
||||
class="MuiIconButton-label"
|
||||
>
|
||||
<input
|
||||
class="PrivateSwitchBase-input-0"
|
||||
data-indeterminate="false"
|
||||
type="checkbox"
|
||||
value=""
|
||||
/>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span
|
||||
class="MuiTouchRipple-root"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
|
||||
>
|
||||
FORCE CONFIG PUSH
|
||||
</span>
|
||||
</label>
|
||||
<a
|
||||
class=""
|
||||
href="/testroute/TESTVIN1234567890"
|
||||
|
||||
@@ -53,14 +53,14 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
Total Mileage
|
||||
</b>
|
||||
:
|
||||
unknown
|
||||
12000 km
|
||||
</p>
|
||||
<p>
|
||||
<b>
|
||||
Max Range
|
||||
</b>
|
||||
:
|
||||
577
|
||||
577 km
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
@@ -158,7 +158,7 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
altitude
|
||||
</b>
|
||||
:
|
||||
17
|
||||
17 m
|
||||
</p>
|
||||
<p>
|
||||
<b>
|
||||
@@ -227,7 +227,7 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
Vehicle Speed
|
||||
</b>
|
||||
:
|
||||
77.7
|
||||
77.7 km/h
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -357,6 +357,43 @@ exports[`CarStatus Render 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<label
|
||||
class="MuiFormControlLabel-root"
|
||||
>
|
||||
<span
|
||||
aria-disabled="false"
|
||||
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root-0 MuiCheckbox-root MuiCheckbox-colorSecondary MuiIconButton-colorSecondary"
|
||||
>
|
||||
<span
|
||||
class="MuiIconButton-label"
|
||||
>
|
||||
<input
|
||||
class="PrivateSwitchBase-input-0"
|
||||
data-indeterminate="false"
|
||||
type="checkbox"
|
||||
value=""
|
||||
/>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span
|
||||
class="MuiTouchRipple-root"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
|
||||
>
|
||||
FORCE CONFIG PUSH
|
||||
</span>
|
||||
</label>
|
||||
<a
|
||||
class=""
|
||||
href="/"
|
||||
|
||||
@@ -135,6 +135,7 @@ const CarStatus = () => {
|
||||
<Box
|
||||
className={classes.tableToolbar}
|
||||
sx={{ borderBottom: 1, borderColor: "divider" }}
|
||||
justifyContent="center"
|
||||
>
|
||||
<Tabs
|
||||
value={tabIndex}
|
||||
|
||||
Reference in New Issue
Block a user