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:
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import { List } from "@material-ui/core";
|
||||
import ListItemLink from "../ListItemLink";
|
||||
import ListItemExternalLink from "../ListItemExternalLink";
|
||||
import { useUserContext } from "../Contexts/UserContext";
|
||||
import { Roles, hasRole } from "../../utils/roles";
|
||||
|
||||
@@ -10,6 +11,11 @@ const menuData = [
|
||||
to: "/home",
|
||||
roles: [],
|
||||
},
|
||||
{
|
||||
label: "Dashboard",
|
||||
to: "/dashboard",
|
||||
roles: [],
|
||||
},
|
||||
{
|
||||
label: "Deploy Packages",
|
||||
to: "/updates",
|
||||
@@ -35,6 +41,11 @@ const menuData = [
|
||||
to: "/vehicles-command",
|
||||
roles: [Roles.CREATE],
|
||||
},
|
||||
{
|
||||
label: "Create Charts",
|
||||
url: "https://grafana.fiskerdps.com",
|
||||
roles: [],
|
||||
},
|
||||
];
|
||||
|
||||
export default function SideMenu() {
|
||||
@@ -51,7 +62,10 @@ export default function SideMenu() {
|
||||
<List>
|
||||
{menu.map((item, 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>
|
||||
))}
|
||||
</List>
|
||||
|
||||
@@ -30,6 +30,28 @@ exports[`SideMenu Authenticated 1`] = `
|
||||
/>
|
||||
</a>
|
||||
</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"
|
||||
@@ -140,6 +162,31 @@ exports[`SideMenu Authenticated 1`] = `
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -175,6 +222,53 @@ exports[`SideMenu Unauthenticated 1`] = `
|
||||
/>
|
||||
</a>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user