fix: various UI/UX improvements for infrastructure pages
## Changes - Fix infrastructure monitor configure page loading error by adding required dateRange parameter - Fix URL validation error when editing existing infrastructure monitors - Fix monitor update using correct 'id' property instead of '_id' - Fix gauge box labels: "Device" (capitalized) and "Mounted on" instead of "mountpoint" - Show full device path instead of truncated ".../" prefix - Implement CSS Grid layout for gauge boxes ensuring consistent widths across all rows - Gauge boxes expand to fill space only when 4+ boxes exist ## Files Modified - client/src/Pages/Infrastructure/Create/index.jsx - client/src/Pages/Infrastructure/Create/hooks/useInfrastructureSubmit.jsx - client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx - client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/Gauge.jsx - client/src/Pages/Infrastructure/Details/Components/BaseContainer/index.jsx - client/src/Pages/Infrastructure/Details/Hooks/useHardwareUtils.jsx - client/src/locales/en.json
This commit is contained in:
1 parent
b5caabed20
commit
bf15018173
7 files changed
+39
-33
No files matched your search
@@ -17,21 +17,26 @@ const Gauge = ({
|
||||
valueThree,
|
||||
metricFour,
|
||||
valueFour,
|
||||
shouldExpand = false,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
|
||||
const valueStyle = {
|
||||
borderRadius: theme.spacing(2),
|
||||
backgroundColor: theme.palette.tertiary.main,
|
||||
width: "40%",
|
||||
minWidth: "40%",
|
||||
maxWidth: "60%",
|
||||
mb: theme.spacing(2),
|
||||
mt: theme.spacing(2),
|
||||
pr: theme.spacing(2),
|
||||
textAlign: "right",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
};
|
||||
|
||||
return (
|
||||
<BaseContainer>
|
||||
<BaseContainer shouldExpand={shouldExpand}>
|
||||
<Stack
|
||||
direction="column"
|
||||
gap={theme.spacing(2)}
|
||||
@@ -116,6 +121,7 @@ Gauge.propTypes = {
|
||||
valueThree: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
metricFour: PropTypes.string,
|
||||
valueFour: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
shouldExpand: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Gauge;
|
||||
Reference in new issue
Block a user