Merge pull request #1912 from bluewave-labs/fix/uptime-percentage

fix uptime percentage
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-03-11 11:39:32 -07:00
commit ebd4b90a99
2 files changed
+2 -4

No files matched your search

@@ -30,7 +30,6 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
};
let bgColor = COLOR_MAP[connectionStatus];
return (
<ColContainer backgroundColor={bgColor}>
<Stack
@@ -61,7 +60,8 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
backgroundColor={theme.palette.successSecondary.lowContrast}
color={theme.palette.success.lowContrast}
>
{t("distributedUptimeDetailsStatusHeaderUptime")} {(monitor.totalUptime * 100).toFixed(2)}%
{t("distributedUptimeDetailsStatusHeaderUptime")}{" "}
{(monitor.uptimePercentage * 100).toFixed(2)}%
</Typography>
</Stack>
<Typography
-2
View File
@@ -24,7 +24,6 @@ const PublicStatus = () => {
const [isDeleteOpen, setIsDeleteOpen] = useState(false);
// Utils
const theme = useTheme();
const isAdmin = useIsAdmin();
const location = useLocation();
const navigate = useNavigate();
@@ -33,7 +32,6 @@ const PublicStatus = () => {
const [deleteStatusPage, isDeleting] = useStatusPageDelete(fetchStatusPage, url);
// Setup
const currentPath = location.pathname;
let sx = { paddingLeft: theme.spacing(20), paddingRight: theme.spacing(20) };
let link = undefined;
const isPublic = location.pathname.startsWith("/status/uptime/public");