Merge branch 'develop' into feat/migrate-hardcoded-strings
This commit is contained in:
6 files changed
+16
-20
No files matched your search
@@ -9,11 +9,6 @@ import PropTypes from "prop-types";
|
||||
|
||||
const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
|
||||
const theme = useTheme();
|
||||
let timeSinceLastCheck = 0;
|
||||
|
||||
if (monitor?.lastCheckTimestamp) {
|
||||
timeSinceLastCheck = Date.now() - monitor?.lastCheckTimestamp;
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack
|
||||
@@ -37,7 +32,7 @@ const StatBoxes = ({ monitor, lastUpdateTrigger }) => {
|
||||
heading={"Last check"}
|
||||
subHeading={
|
||||
<LastUpdate
|
||||
lastUpdateTime={timeSinceLastCheck}
|
||||
lastUpdateTime={monitor?.timeSinceLastCheck}
|
||||
suffix={"seconds ago"}
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
|
||||
{t("distributedUptimeDetailsStatusHeaderLastUpdate")}{" "}
|
||||
<LastUpdate
|
||||
suffix={"seconds ago"}
|
||||
lastUpdateTime={monitor.timeSinceLastCheck}
|
||||
lastUpdateTime={monitor?.timeSinceLastCheck}
|
||||
/>
|
||||
</Typography>
|
||||
</Stack>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import DataTable from "../../../../../Components/Table";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { ColoredLabel } from "../../../../../Components/Label";
|
||||
import { StatusLabel } from "../../../../../Components/Label";
|
||||
import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward";
|
||||
import { Stack, Typography } from "@mui/material";
|
||||
const StatusPagesTable = ({ data }) => {
|
||||
@@ -66,12 +66,11 @@ const StatusPagesTable = ({ data }) => {
|
||||
id: "status",
|
||||
content: "Status",
|
||||
render: (row) => {
|
||||
const status = row.isPublished ? "published" : "unpublished";
|
||||
return (
|
||||
<ColoredLabel
|
||||
label={row.isPublished ? "Published" : "Unpublished"}
|
||||
color={
|
||||
row.isPublished ? theme.palette.success.main : theme.palette.warning.main
|
||||
}
|
||||
<StatusLabel
|
||||
status={status}
|
||||
text={row.isPublished ? "Published" : "Unpublished"}
|
||||
/>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user