refactor: use storage bar as progress bar with adapted style

main
Josue 4 years ago committed by Tsu-ba-me
parent 8f33d34ed8
commit 5783c195be
  1. 9
      striker-ui/components/AnvilNode.tsx

@ -1,6 +1,7 @@
import { Grid, Switch } from '@material-ui/core'; import { Grid, Switch } from '@material-ui/core';
import AllocationBar from './AllocationBar'; import InnerPanel from './InnerPanel';
import ProgressBar from './ProgressBar';
import { BodyText } from './Text'; import { BodyText } from './Text';
const AnvilNode = ({ const AnvilNode = ({
@ -14,7 +15,7 @@ const AnvilNode = ({
node.map( node.map(
(n): JSX.Element => { (n): JSX.Element => {
return ( return (
<> <InnerPanel key={n.node_uuid}>
<Grid container alignItems="center" justify="space-around"> <Grid container alignItems="center" justify="space-around">
<Grid item xs={6}> <Grid item xs={6}>
<BodyText text={`Node: ${n.node_name}`} /> <BodyText text={`Node: ${n.node_name}`} />
@ -29,10 +30,10 @@ const AnvilNode = ({
<BodyText text={n.state_message} /> <BodyText text={n.state_message} />
</Grid> </Grid>
<Grid item xs={10}> <Grid item xs={10}>
<AllocationBar allocated={n.state_percent} /> <ProgressBar progressPercentage={n.state_percent} />
</Grid> </Grid>
</Grid> </Grid>
</> </InnerPanel>
); );
}, },
)} )}

Loading…
Cancel
Save