CEC-4572 tweak digital twin display and form (#362)

* CEC-4572 tweak form

* update snapshots

* Clean up

* Hide DTC tab
This commit is contained in:
John Wu
2023-06-15 14:39:21 -07:00
committed by GitHub
parent 06867ea77f
commit a5c29a4721
8 changed files with 300 additions and 326 deletions

View File

@@ -434,6 +434,43 @@ exports[`VehicleUpdate Render 1`] = `
</fieldset>
</div>
</div>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-outlined"
data-shrink="true"
for="tag"
id="tag-label"
>
Tags (comma separated, alphanumeric and - only)
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input"
id="tag"
maxlength="1024"
name="tags"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-0 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-0 PrivateNotchedOutline-legendNotched-0"
>
<span>
Tags (comma separated, alphanumeric and - only)
</span>
</legend>
</fieldset>
</div>
</div>
<label
class="MuiFormLabel-root"
id="demo-row-radio-buttons-group-label"
@@ -884,44 +921,6 @@ exports[`VehicleUpdate Render 1`] = `
Data Logger Enabled
</span>
</label>
<label
class="MuiFormControlLabel-root"
>
<span
aria-disabled="false"
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root-0 MuiCheckbox-root MuiCheckbox-colorSecondary PrivateSwitchBase-checked-0 Mui-checked MuiIconButton-colorSecondary"
>
<span
class="MuiIconButton-label"
>
<input
checked=""
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 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<span
class="MuiTouchRipple-root"
/>
</span>
<span
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
>
DTC Enabled
</span>
</label>
</div>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
@@ -969,6 +968,44 @@ exports[`VehicleUpdate Render 1`] = `
</fieldset>
</div>
</div>
<label
class="MuiFormControlLabel-root"
>
<span
aria-disabled="false"
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root-0 MuiCheckbox-root MuiCheckbox-colorSecondary PrivateSwitchBase-checked-0 Mui-checked MuiIconButton-colorSecondary"
>
<span
class="MuiIconButton-label"
>
<input
checked=""
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 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<span
class="MuiTouchRipple-root"
/>
</span>
<span
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
>
DTC Enabled
</span>
</label>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
>
@@ -978,7 +1015,7 @@ exports[`VehicleUpdate Render 1`] = `
for="debug_mask"
id="debug_mask-label"
>
DebugMask
Debug Mask
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl"
@@ -1000,44 +1037,7 @@ exports[`VehicleUpdate Render 1`] = `
class="PrivateNotchedOutline-legendLabelled-0 PrivateNotchedOutline-legendNotched-0"
>
<span>
DebugMask
</span>
</legend>
</fieldset>
</div>
</div>
<div
class="MuiFormControl-root MuiTextField-root MuiFormControl-marginNormal MuiFormControl-fullWidth"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-outlined"
data-shrink="true"
for="tag"
id="tag-label"
>
Tags (comma separated, alphanumeric and - only)
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-fullWidth MuiInputBase-formControl"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input"
id="tag"
maxlength="1024"
name="tags"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-0 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-0 PrivateNotchedOutline-legendNotched-0"
>
<span>
Tags (comma separated, alphanumeric and - only)
Debug Mask
</span>
</legend>
</fieldset>

View File

@@ -337,6 +337,22 @@ const MainForm = () => {
fullWidth
inputRef={infoSourceEl}
/>
<TextField
id="tag"
name="tags"
label='Tags (comma separated, alphanumeric and - only)'
InputLabelProps={{
shrink: true
}}
defaultValue=""
variant="outlined"
margin="normal"
inputProps={{
maxLength: "1024",
}}
fullWidth
inputRef={tagsEl}
/>
<FormLabel id="demo-row-radio-buttons-group-label">Log Level</FormLabel>
<RadioGroup
row
@@ -384,12 +400,6 @@ const MainForm = () => {
disabled={!canbusEnabled}
/>
} label="Data Logger Enabled" />
<FormControlLabel control={
<Checkbox
checked={dtcEnabled}
onChange={onDtcEnabledChange}
/>
} label="DTC Enabled" />
</FormGroup>
<TextField
id="max_disk_buffer_size"
@@ -407,11 +417,17 @@ const MainForm = () => {
required
fullWidth
/>
<FormControlLabel control={
<Checkbox
checked={dtcEnabled}
onChange={onDtcEnabledChange}
/>
} label="DTC Enabled" />
{showDebugMask && (
<TextField
id="debug_mask"
name="debug_mask"
label="DebugMask"
label="Debug Mask"
InputLabelProps={{
shrink: true
}}
@@ -425,22 +441,6 @@ const MainForm = () => {
inputRef={debugMaskEl}
/>
)}
<TextField
id="tag"
name="tags"
label='Tags (comma separated, alphanumeric and - only)'
InputLabelProps={{
shrink: true
}}
defaultValue=""
variant="outlined"
margin="normal"
inputProps={{
maxLength: "1024",
}}
fullWidth
inputRef={tagsEl}
/>
<Button
type="submit"
disabled={busy}