Update Dashboard Charts (#47)

* Update dashboard charts

* Remove chart time lock

* Update snapshot test
This commit is contained in:
John Wu
2021-06-02 11:26:38 -07:00
committed by GitHub
parent a8fff2f85c
commit d8f14aaeba
5 changed files with 607 additions and 256 deletions

View File

@@ -91,6 +91,10 @@ describe("App", () => {
await check("/vehicles-command", "span.MuiButton-label", "Sign In");
});
it("Route /dashboard unauthenticated", async () => {
await check("/dashboard", "span.MuiButton-label", "Sign In");
});
it("Route / authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/", "h1", "Welcome John!");
@@ -154,4 +158,10 @@ describe("App", () => {
setToken(TEST_AUTH_OBJECT);
await check("/carupdate-deploy/1", "h6", "Deploy ");
});
it("Route /dashboard authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/dashboard", "h6", "Dashboard");
});
});

File diff suppressed because it is too large Load Diff

View File

@@ -15,8 +15,17 @@ const Dashboard = () => {
return (
<div className={classes.paper}>
<iframe
className={classes.iframe}
title="Vehicle Connected"
src="https://grafana.fiskerdps.com/d-solo/1VTVJ_qGk/dashboard?orgId=2&refresh=5s&panelId=6"
width="900"
height="400"
frameBorder="0"
></iframe>
<iframe
className={classes.iframe}
title="Vehicle Signals"
src="https://grafana.fiskerdps.com/d-solo/YZaAlIeGz/vehicle-signals?orgId=1&refresh=30s&from=1622594368093&to=1622597968093&panelId=2"
src="https://grafana.fiskerdps.com/d-solo/1VTVJ_qGk/dashboard?orgId=2&refresh=5s&panelId=2"
width="900"
height="400"
frameBorder="0"

View File

@@ -46,10 +46,10 @@ exports[`File Upload Form Should render 1`] = `
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-32 MuiOutlinedInput-notchedOutline"
class="PrivateNotchedOutline-root-33 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-34"
class="PrivateNotchedOutline-legendLabelled-35"
>
<span>
Package name
@@ -92,10 +92,10 @@ exports[`File Upload Form Should render 1`] = `
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-32 MuiOutlinedInput-notchedOutline"
class="PrivateNotchedOutline-root-33 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-34"
class="PrivateNotchedOutline-legendLabelled-35"
>
<span>
Version
@@ -138,10 +138,10 @@ exports[`File Upload Form Should render 1`] = `
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-32 MuiOutlinedInput-notchedOutline"
class="PrivateNotchedOutline-root-33 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-34"
class="PrivateNotchedOutline-legendLabelled-35"
>
<span>
Description
@@ -185,10 +185,10 @@ exports[`File Upload Form Should render 1`] = `
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-32 MuiOutlinedInput-notchedOutline"
class="PrivateNotchedOutline-root-33 MuiOutlinedInput-notchedOutline"
>
<legend
class="PrivateNotchedOutline-legendLabelled-34"
class="PrivateNotchedOutline-legendLabelled-35"
>
<span>
Release Notes URL

View File

@@ -166,6 +166,9 @@ const useStyles = makeStyles((theme) => ({
grow: {
flexGrow: 1,
},
iframe: {
marginTop: 10,
},
}));
export default useStyles;