2 files changed
+3
-8
No files matched your search
@@ -9,11 +9,6 @@ import PropTypes from "prop-types";
|
|||||||
|
|
||||||
const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
|
const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
let timeSinceLastCheck = 0;
|
|
||||||
|
|
||||||
if (monitor?.lastCheckTimestamp) {
|
|
||||||
timeSinceLastCheck = Date.now() - monitor?.lastCheckTimestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
@@ -37,7 +32,7 @@ const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
|
|||||||
heading={"Last check"}
|
heading={"Last check"}
|
||||||
subHeading={
|
subHeading={
|
||||||
<LastUpdate
|
<LastUpdate
|
||||||
lastUpdateTime={timeSinceLastCheck}
|
lastUpdateTime={monitor?.timeSinceLastCheck}
|
||||||
suffix={"seconds ago"}
|
suffix={"seconds ago"}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
|
|||||||
backgroundColor={theme.palette.successSecondary.lowContrast}
|
backgroundColor={theme.palette.successSecondary.lowContrast}
|
||||||
color={theme.palette.success.lowContrast}
|
color={theme.palette.success.lowContrast}
|
||||||
>
|
>
|
||||||
Uptime: {(monitor.totalUptime * 100).toFixed(2)}%
|
Uptime: {(monitor.uptimePercentage * 100).toFixed(2)}%
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -69,7 +69,7 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
|
|||||||
Last updated{" "}
|
Last updated{" "}
|
||||||
<LastUpdate
|
<LastUpdate
|
||||||
suffix={"seconds ago"}
|
suffix={"seconds ago"}
|
||||||
lastUpdateTime={monitor.timeSinceLastCheck}
|
lastUpdateTime={monitor?.timeSinceLastCheck}
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in new issue
Block a user