Merge pull request #1635 from YinDongFang/feature/style

Fix some UI style/Component bugs
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-01-27 07:10:00 -08:00
commit e0333af16b
5 files changed
+23 -24

No files matched your search

@@ -625,8 +625,7 @@ const InfrastructureDetails = () => {
</ButtonGroup> </ButtonGroup>
</Stack> </Stack>
<Stack <Stack
direction={"row"} direction="row"
height={chartContainerHeight} // FE team HELP!
gap={theme.spacing(8)} // FE team HELP! gap={theme.spacing(8)} // FE team HELP!
flexWrap="wrap" // //FE team HELP! Better way to do this? flexWrap="wrap" // //FE team HELP! Better way to do this?
sx={{ sx={{
+12 -16
View File
@@ -137,13 +137,11 @@ function Infrastructure() {
id: "actions", id: "actions",
content: "Actions", content: "Actions",
render: (row) => ( render: (row) => (
<IconButton> <InfrastructureMenu
<InfrastructureMenu monitor={row}
monitor={row} isAdmin={isAdmin}
isAdmin={isAdmin} updateCallback={handleActionMenuDelete}
updateCallback={handleActionMenuDelete} />
/>
</IconButton>
), ),
}, },
]; ];
@@ -158,14 +156,12 @@ function Infrastructure() {
const uptimePercentage = ((monitor?.uptimePercentage ?? 0) * 100) const uptimePercentage = ((monitor?.uptimePercentage ?? 0) * 100)
.toFixed(2) .toFixed(2)
.toString(); .toString();
const percentageColor = const percentageColor = monitor.uptimePercentage < 0.25
monitor.uptimePercentage < 0.25 ? theme.palette.error.main
? theme.palette.error.main : monitor.uptimePercentage < 0.5
: monitor.uptimePercentage < 0.5 ? theme.palette.warning.main
? theme.palette.percentage.uptimeFair : theme.palette.success.main;
: monitor.uptimePercentage < 0.75
? theme.palette.percentage.uptimeGood
: theme.palette.success.lowContrast;
return { return {
id: monitor._id, id: monitor._id,
name: monitor.name, name: monitor.name,
@@ -243,7 +239,7 @@ function Infrastructure() {
backgroundColor={theme.palette.tertiary.main} backgroundColor={theme.palette.tertiary.main}
sx={{ sx={{
padding: ".25em .75em", padding: ".25em .75em",
borderRadius: "50%", borderRadius: "10000px",
fontSize: "12px", fontSize: "12px",
fontWeight: 500, fontWeight: 500,
}} }}
+8 -2
View File
@@ -106,9 +106,15 @@ const PageSpeed = () => {
component="span" component="span"
className="current-monitors-counter" className="current-monitors-counter"
color={theme.palette.primary.contrastText} color={theme.palette.primary.contrastText}
border={1} border={2}
borderColor={theme.palette.primary.lowContrast} borderColor={theme.palette.accent.main}
backgroundColor={theme.palette.tertiary.main} backgroundColor={theme.palette.tertiary.main}
sx={{
padding: ".25em .75em",
borderRadius: "10000px",
fontSize: "12px",
fontWeight: 500,
}}
> >
{summary?.totalMonitors ?? 0} {summary?.totalMonitors ?? 0}
</Box> </Box>
@@ -234,7 +234,7 @@ const UptimeDataTable = ({
backgroundColor={theme.palette.tertiary.main} backgroundColor={theme.palette.tertiary.main}
sx={{ sx={{
padding: ".25em .75em", padding: ".25em .75em",
borderRadius: "50%", borderRadius: "10000px",
fontSize: "12px", fontSize: "12px",
fontWeight: 500, fontWeight: 500,
}} }}
+1 -3
View File
@@ -71,9 +71,7 @@ const UptimeMonitors = () => {
? theme.palette.error.main ? theme.palette.error.main
: monitor.uptimePercentage < 0.5 : monitor.uptimePercentage < 0.5
? theme.palette.warning.main ? theme.palette.warning.main
: monitor.uptimePercentage < 0.75 : theme.palette.success.main;
? theme.palette.success.main
: theme.palette.success.main;
} }
return { return {