CEC-227, CEC-244 Add dashboard page, update car command control (#46)
* Create multiselect car table control Remove table overflow containers * Include trim to add car form * CEC-252 Replace modal status with link to car details page * Remove send command from car status page Fix menu key warning * Change car command control data Add Grafana menu items * Revert
This commit is contained in:
@@ -76,6 +76,28 @@ exports[`App Route / authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -186,6 +208,31 @@ exports[`App Route / authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -347,6 +394,28 @@ exports[`App Route /carupdate-deploy authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -457,6 +526,31 @@ exports[`App Route /carupdate-deploy authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1036,6 +1130,28 @@ exports[`App Route /carupdate-status authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -1146,6 +1262,31 @@ exports[`App Route /carupdate-status authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1475,6 +1616,28 @@ exports[`App Route /home authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -1585,6 +1748,31 @@ exports[`App Route /home authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1746,6 +1934,28 @@ exports[`App Route /package-upload authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -1856,6 +2066,31 @@ exports[`App Route /package-upload authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2250,6 +2485,28 @@ exports[`App Route /page-not-found authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -2360,6 +2617,31 @@ exports[`App Route /page-not-found authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2510,6 +2792,28 @@ exports[`App Route /update authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -2620,6 +2924,31 @@ exports[`App Route /update authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -3035,6 +3364,28 @@ exports[`App Route /updates authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -3145,6 +3496,31 @@ exports[`App Route /updates authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -3604,6 +3980,28 @@ exports[`App Route /vehicle-add authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -3714,6 +4112,31 @@ exports[`App Route /vehicle-add authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -4080,6 +4503,28 @@ exports[`App Route /vehicle-status authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -4190,6 +4635,31 @@ exports[`App Route /vehicle-status authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -4616,6 +5086,28 @@ exports[`App Route /vehicles authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -4726,6 +5218,31 @@ exports[`App Route /vehicles authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -5225,6 +5742,28 @@ exports[`App Route /vehicles-command authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -5335,6 +5874,31 @@ exports[`App Route /vehicles-command authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -5444,42 +6008,32 @@ exports[`App Route /vehicles-command authenticated 1`] = `
|
|||||||
name="send-command"
|
name="send-command"
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
value="LOG"
|
value="lock"
|
||||||
|
>
|
||||||
|
Lock door
|
||||||
|
</option>
|
||||||
|
<option
|
||||||
|
value="unlock"
|
||||||
|
>
|
||||||
|
Unlock door
|
||||||
|
</option>
|
||||||
|
<option
|
||||||
|
value="open"
|
||||||
|
>
|
||||||
|
Open window
|
||||||
|
</option>
|
||||||
|
<option
|
||||||
|
value="close"
|
||||||
|
>
|
||||||
|
Close window
|
||||||
|
</option>
|
||||||
|
<option
|
||||||
|
value="log"
|
||||||
>
|
>
|
||||||
Log level
|
Log level
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
value="FRONT-RIGHT"
|
value="headlights"
|
||||||
>
|
|
||||||
Front right door
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="FRONT-LEFT"
|
|
||||||
>
|
|
||||||
Front left door
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="REAR-RIGHT"
|
|
||||||
>
|
|
||||||
Rear right door
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="REAR-LEFT"
|
|
||||||
>
|
|
||||||
Rear left door
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="TRUNK"
|
|
||||||
>
|
|
||||||
Trunk
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="WINDOWS"
|
|
||||||
>
|
|
||||||
Windows
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="FLASH-HEADLIGHTS"
|
|
||||||
>
|
>
|
||||||
Flash headlights
|
Flash headlights
|
||||||
</option>
|
</option>
|
||||||
@@ -5531,19 +6085,29 @@ exports[`App Route /vehicles-command authenticated 1`] = `
|
|||||||
name="send-parameter"
|
name="send-parameter"
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
value="INFO"
|
value="right_front"
|
||||||
>
|
>
|
||||||
Info
|
Front right door
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
value="DEBUG"
|
value="left_front"
|
||||||
>
|
>
|
||||||
Debug
|
Front left door
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
value="TRACE"
|
value="right_rear"
|
||||||
>
|
>
|
||||||
Trace
|
Rear right door
|
||||||
|
</option>
|
||||||
|
<option
|
||||||
|
value="left_rear"
|
||||||
|
>
|
||||||
|
Rear left door
|
||||||
|
</option>
|
||||||
|
<option
|
||||||
|
value="trunk"
|
||||||
|
>
|
||||||
|
Trunk
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const MainForm = () => {
|
|||||||
<TableBody>
|
<TableBody>
|
||||||
{vehicles.map((row) => (
|
{vehicles.map((row) => (
|
||||||
<TableRow key={row.vin}>
|
<TableRow key={row.vin}>
|
||||||
<TableCell align="center" sortDirection={true}>
|
<TableCell align="center">
|
||||||
<Link to={`/vehicle-status/${row.vin}`}>{row.vin}</Link>
|
<Link to={`/vehicle-status/${row.vin}`}>{row.vin}</Link>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="center">{row.model}</TableCell>
|
<TableCell align="center">{row.model}</TableCell>
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ const SendCommand = ({ vins }) => {
|
|||||||
}}
|
}}
|
||||||
onChange={changeCommandHandler}
|
onChange={changeCommandHandler}
|
||||||
>
|
>
|
||||||
{commands.map((item) => (
|
{commands.map((item, index) => (
|
||||||
<option key={item.value} value={item.value}>
|
<option key={index} value={item.value}>
|
||||||
{item.label}
|
{item.label}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
|
|||||||
28
src/components/Dashboard/index.jsx
Normal file
28
src/components/Dashboard/index.jsx
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import React, { useEffect } from "react";
|
||||||
|
import useStyles from "../useStyles";
|
||||||
|
|
||||||
|
import { useStatusContext } from "../Contexts/StatusContext";
|
||||||
|
|
||||||
|
const Dashboard = () => {
|
||||||
|
const classes = useStyles();
|
||||||
|
const { setTitle } = useStatusContext();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setTitle("Dashboard");
|
||||||
|
// eslint-disable-next-line
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={classes.paper}>
|
||||||
|
<iframe
|
||||||
|
title="Vehicle Signals"
|
||||||
|
src="https://grafana.fiskerdps.com/d-solo/YZaAlIeGz/vehicle-signals?orgId=1&refresh=30s&from=1622594368093&to=1622597968093&panelId=2"
|
||||||
|
width="900"
|
||||||
|
height="400"
|
||||||
|
frameBorder="0"
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Dashboard;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { List } from "@material-ui/core";
|
import { List } from "@material-ui/core";
|
||||||
import ListItemLink from "../ListItemLink";
|
import ListItemLink from "../ListItemLink";
|
||||||
|
import ListItemExternalLink from "../ListItemExternalLink";
|
||||||
import { useUserContext } from "../Contexts/UserContext";
|
import { useUserContext } from "../Contexts/UserContext";
|
||||||
import { Roles, hasRole } from "../../utils/roles";
|
import { Roles, hasRole } from "../../utils/roles";
|
||||||
|
|
||||||
@@ -10,6 +11,11 @@ const menuData = [
|
|||||||
to: "/home",
|
to: "/home",
|
||||||
roles: [],
|
roles: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Dashboard",
|
||||||
|
to: "/dashboard",
|
||||||
|
roles: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Deploy Packages",
|
label: "Deploy Packages",
|
||||||
to: "/updates",
|
to: "/updates",
|
||||||
@@ -35,6 +41,11 @@ const menuData = [
|
|||||||
to: "/vehicles-command",
|
to: "/vehicles-command",
|
||||||
roles: [Roles.CREATE],
|
roles: [Roles.CREATE],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Create Charts",
|
||||||
|
url: "https://grafana.fiskerdps.com",
|
||||||
|
roles: [],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function SideMenu() {
|
export default function SideMenu() {
|
||||||
@@ -51,7 +62,10 @@ export default function SideMenu() {
|
|||||||
<List>
|
<List>
|
||||||
{menu.map((item, index) => (
|
{menu.map((item, index) => (
|
||||||
<li key={index}>
|
<li key={index}>
|
||||||
<ListItemLink primary={item.label} to={item.to} />
|
{item.to && <ListItemLink primary={item.label} to={item.to} />}
|
||||||
|
{item.url && (
|
||||||
|
<ListItemExternalLink primary={item.label} url={item.url} />
|
||||||
|
)}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@@ -30,6 +30,28 @@ exports[`SideMenu Authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
@@ -140,6 +162,31 @@ exports[`SideMenu Authenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -175,6 +222,53 @@ exports[`SideMenu Unauthenticated 1`] = `
|
|||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button"
|
||||||
|
href="/dashboard"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiButtonBase-root MuiListItem-root MuiListItem-gutters MuiListItem-button MuiTypography-colorPrimary"
|
||||||
|
href="https://grafana.fiskerdps.com"
|
||||||
|
rel="noopener"
|
||||||
|
role="button"
|
||||||
|
style="text-decoration: inherit;"
|
||||||
|
tabindex="0"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="MuiListItemText-root"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
||||||
|
>
|
||||||
|
Create Charts
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="MuiTouchRipple-root"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
46
src/components/ListItemExternalLink.jsx
Normal file
46
src/components/ListItemExternalLink.jsx
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import React from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
import ListItem from "@material-ui/core/ListItem";
|
||||||
|
import ListItemIcon from "@material-ui/core/ListItemIcon";
|
||||||
|
import ListItemText from "@material-ui/core/ListItemText";
|
||||||
|
import { Link } from "@material-ui/core";
|
||||||
|
|
||||||
|
function ListItemExternalLink(props) {
|
||||||
|
const { icon, primary, url } = props;
|
||||||
|
const style = {
|
||||||
|
textDecoration: "inherit",
|
||||||
|
color: "inherit",
|
||||||
|
"&:link": {
|
||||||
|
textDecoration: "inherit",
|
||||||
|
color: "inherit",
|
||||||
|
cursor: "auto",
|
||||||
|
},
|
||||||
|
"&:visited": {
|
||||||
|
textDecoration: "inherit",
|
||||||
|
color: "inherit",
|
||||||
|
cursor: "auto",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ListItem
|
||||||
|
button
|
||||||
|
component={Link}
|
||||||
|
style={style}
|
||||||
|
href={url}
|
||||||
|
rel="noopener"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{icon ? <ListItemIcon>{icon}</ListItemIcon> : null}
|
||||||
|
<ListItemText primary={primary} />
|
||||||
|
</ListItem>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListItemExternalLink.propTypes = {
|
||||||
|
icon: PropTypes.element,
|
||||||
|
primary: PropTypes.string.isRequired,
|
||||||
|
url: PropTypes.string.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ListItemExternalLink;
|
||||||
@@ -18,6 +18,7 @@ const CarUpdatesStatus = React.lazy(() => import("../CarUpdates/Status"));
|
|||||||
const CarUpdates = React.lazy(() => import("../Cars/Status"));
|
const CarUpdates = React.lazy(() => import("../Cars/Status"));
|
||||||
const VehiclesList = React.lazy(() => import("../Cars/List"));
|
const VehiclesList = React.lazy(() => import("../Cars/List"));
|
||||||
const SendCommandBulk = React.lazy(() => import("../Cars/SendCommandBulk"));
|
const SendCommandBulk = React.lazy(() => import("../Cars/SendCommandBulk"));
|
||||||
|
const Dashboard = React.lazy(() => import("../Dashboard"));
|
||||||
|
|
||||||
const SiteRoutes = () => {
|
const SiteRoutes = () => {
|
||||||
const { token, groups } = useUserContext();
|
const { token, groups } = useUserContext();
|
||||||
@@ -110,6 +111,14 @@ const SiteRoutes = () => {
|
|||||||
groups={groups}
|
groups={groups}
|
||||||
roles={[Roles.CREATE]}
|
roles={[Roles.CREATE]}
|
||||||
/>
|
/>
|
||||||
|
<AuthRoute
|
||||||
|
path="/dashboard"
|
||||||
|
render={() => <Dashboard />}
|
||||||
|
type={TYPES.PROTECTED}
|
||||||
|
token={token}
|
||||||
|
groups={groups}
|
||||||
|
roles={[Roles.READ, Roles.CREATE]}
|
||||||
|
/>
|
||||||
<PageNotFound />
|
<PageNotFound />
|
||||||
</Switch>
|
</Switch>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|||||||
@@ -1,68 +1,75 @@
|
|||||||
const LockUnlockParams = [
|
const Locks = [
|
||||||
{
|
{
|
||||||
value: "LOCK",
|
value: "right_front",
|
||||||
label: "Lock",
|
label: "Front right door",
|
||||||
},
|
},{
|
||||||
{
|
value: "left_front",
|
||||||
value: "UNLOCK",
|
label: "Front left door",
|
||||||
label: "Unlock",
|
},{
|
||||||
|
value: "right_rear",
|
||||||
|
label: "Rear right door",
|
||||||
|
},{
|
||||||
|
value: "left_rear",
|
||||||
|
label: "Rear left door",
|
||||||
|
},{
|
||||||
|
value: "trunk",
|
||||||
|
label: "Trunk",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const OpenCloseParams = [
|
const Windows = [
|
||||||
{
|
{
|
||||||
value: "OPEN",
|
value: "right_front",
|
||||||
label: "Open",
|
label: "Front right window",
|
||||||
},
|
},{
|
||||||
{
|
value: "left_front",
|
||||||
value: "CLOSE",
|
label: "Front left window",
|
||||||
label: "Close",
|
},{
|
||||||
|
value: "right_rear",
|
||||||
|
label: "Rear right window",
|
||||||
|
},{
|
||||||
|
value: "left_rear",
|
||||||
|
label: "Rear left window",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const Commands = [{
|
const Commands = [{
|
||||||
value: "LOG",
|
value: "lock",
|
||||||
|
label: "Lock door",
|
||||||
|
parameters: Locks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "unlock",
|
||||||
|
label: "Unlock door",
|
||||||
|
parameters: Locks,
|
||||||
|
},{
|
||||||
|
value: "open",
|
||||||
|
label: "Open window",
|
||||||
|
parameters: Windows,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "close",
|
||||||
|
label: "Close window",
|
||||||
|
parameters: Windows,
|
||||||
|
},{
|
||||||
|
value: "log",
|
||||||
label: "Log level",
|
label: "Log level",
|
||||||
parameters: [
|
parameters: [
|
||||||
{
|
{
|
||||||
value: "INFO",
|
value: "info",
|
||||||
label: "Info",
|
label: "Info",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "DEBUG",
|
value: "debug",
|
||||||
label: "Debug",
|
label: "Debug",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "TRACE",
|
value: "trace",
|
||||||
label: "Trace",
|
label: "Trace",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},{
|
},{
|
||||||
value: "FRONT-RIGHT",
|
value: "headlights",
|
||||||
label: "Front right door",
|
|
||||||
parameters: LockUnlockParams,
|
|
||||||
},{
|
|
||||||
value: "FRONT-LEFT",
|
|
||||||
label: "Front left door",
|
|
||||||
parameters: LockUnlockParams,
|
|
||||||
},{
|
|
||||||
value: "REAR-RIGHT",
|
|
||||||
label: "Rear right door",
|
|
||||||
parameters: LockUnlockParams,
|
|
||||||
},{
|
|
||||||
value: "REAR-LEFT",
|
|
||||||
label: "Rear left door",
|
|
||||||
parameters: LockUnlockParams,
|
|
||||||
},{
|
|
||||||
value: "TRUNK",
|
|
||||||
label: "Trunk",
|
|
||||||
parameters: LockUnlockParams,
|
|
||||||
},{
|
|
||||||
value: "WINDOWS",
|
|
||||||
label: "Windows",
|
|
||||||
parameters: OpenCloseParams,
|
|
||||||
},{
|
|
||||||
value: "FLASH-HEADLIGHTS",
|
|
||||||
label: "Flash headlights",
|
label: "Flash headlights",
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user