Add disk device as third metric value
This commit is contained in:
1 parent
7cb985116e
commit
98214ff578
2 files changed
+17
-2
No files matched your search
@@ -6,7 +6,7 @@ import { Stack, Typography, Box } from "@mui/material";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
const Gauge = ({ value, heading, metricOne, valueOne, metricTwo, valueTwo }) => {
|
||||
const Gauge = ({ value, heading, metricOne, valueOne, metricTwo, valueTwo, metricThree, valueThree }) => {
|
||||
const theme = useTheme();
|
||||
|
||||
const valueStyle = {
|
||||
@@ -19,6 +19,8 @@ const Gauge = ({ value, heading, metricOne, valueOne, metricTwo, valueTwo }) =>
|
||||
textAlign: "right",
|
||||
};
|
||||
|
||||
const isThirdMetric = metricThree !== undefined && valueThree !== undefined;
|
||||
|
||||
return (
|
||||
<BaseContainer>
|
||||
<Stack
|
||||
@@ -70,6 +72,15 @@ const Gauge = ({ value, heading, metricOne, valueOne, metricTwo, valueTwo }) =>
|
||||
<Typography>{metricTwo}</Typography>
|
||||
<Typography sx={valueStyle}>{valueTwo}</Typography>
|
||||
</Stack>
|
||||
<Stack
|
||||
justifyContent={"space-between"}
|
||||
direction="row"
|
||||
alignItems="center"
|
||||
gap={theme.spacing(2)}
|
||||
>
|
||||
<Typography>{metricThree}</Typography>
|
||||
<Typography sx={valueStyle}>{valueThree}</Typography>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Stack>
|
||||
</BaseContainer>
|
||||
|
||||
Reference in new issue
Block a user