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:
gorkem-bwl committed 2026-01-15 22:04:56 -05:00
1 parent b5caabed20
commit bf15018173
7 files changed
+39 -33

No files matched your search

@@ -123,14 +123,7 @@ const useHardwareUtils = () => {
const formatDeviceName = (device) => {
const deviceStr = String(device || "");
// Extract the last part of the path (after last '/')
const parts = deviceStr.split("/");
const lastPart = parts[parts.length - 1];
// If there's more than one part, show with "..." prefix
const displayText = parts.length > 1 ? `.../${lastPart}` : deviceStr;
// Always show tooltip with full device path
// Show full device path
return (
<Tooltip
title={deviceStr}
@@ -149,7 +142,7 @@ const useHardwareUtils = () => {
maxWidth: "100%",
}}
>
{displayText}
{deviceStr}
</Typography>
</Tooltip>
);
@@ -181,14 +174,7 @@ const useHardwareUtils = () => {
);
}
// Extract the last part of the path (after last '/')
const parts = mountpointStr.split("/");
const lastPart = parts[parts.length - 1];
// If there's more than one part, show with "..." prefix
const displayText = parts.length > 1 ? `.../${lastPart}` : mountpointStr;
// Always show tooltip with full mountpoint path
// Show full mountpoint path
return (
<Tooltip
title={mountpointStr}
@@ -207,7 +193,7 @@ const useHardwareUtils = () => {
maxWidth: "100%",
}}
>
{displayText}
{mountpointStr}
</Typography>
</Tooltip>
);