refactor: include new components

main
Josue 4 years ago committed by Tsu-ba-me
parent a0a1237c5d
commit 3552dbffce
  1. 23
      striker-ui/pages/index.tsx

@ -5,9 +5,11 @@ import Anvils from '../components/Anvils';
import Nodes from '../components/Nodes'; import Nodes from '../components/Nodes';
import CPU from '../components/CPU'; import CPU from '../components/CPU';
import SharedStorage from '../components/SharedStorage'; import SharedStorage from '../components/SharedStorage';
import ReplicatedStorage from '../components/ReplicatedStorage';
import Memory from '../components/Memory'; import Memory from '../components/Memory';
import Network from '../components/Network';
import PeriodicFetch from '../lib/fetchers/periodicFetch'; import PeriodicFetch from '../lib/fetchers/periodicFetch';
import Servers from '../components/Servers';
import Storage from '../components/Storage';
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
grid: { grid: {
@ -30,20 +32,31 @@ const Home = (): JSX.Element => {
container container
justify="flex-start" justify="flex-start"
direction="column" direction="column"
className={classes.grid} // className={classes.grid}
> >
<Anvils list={data} /> <Anvils list={data} />
<Nodes anvil={data?.anvils[0]} /> <Nodes anvil={data?.anvils[0]} />
</Grid> </Grid>
</Grid> </Grid>
<Grid item xs={5}> <Grid item xs={3}>
<Grid
container
justify="flex-start"
direction="column"
className={classes.grid}
>
<Servers anvil={data?.anvils[0]} />
</Grid>
</Grid>
<Grid item xs={3}>
<Grid <Grid
container container
justify="flex-start" justify="flex-start"
direction="column" direction="column"
className={classes.grid} className={classes.grid}
> >
<ReplicatedStorage /> <Storage uuid={data?.anvils[0].anvil_uuid} />
<SharedStorage anvil={data?.anvils[0]} />
</Grid> </Grid>
</Grid> </Grid>
<Grid item xs={3}> <Grid item xs={3}>
@ -55,7 +68,7 @@ const Home = (): JSX.Element => {
> >
{data?.anvils?.length ? ( {data?.anvils?.length ? (
<> <>
<SharedStorage anvil={data.anvils[0]} /> <Network />
<CPU uuid={data.anvils[0].anvil_uuid} /> <CPU uuid={data.anvils[0].anvil_uuid} />
<Memory uuid={data.anvils[0].anvil_uuid} /> <Memory uuid={data.anvils[0].anvil_uuid} />
</> </>

Loading…
Cancel
Save