mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-14 13:38:39 -05:00
Added local support for the page.
This commit is contained in:
@@ -7,14 +7,22 @@ import { formatDurationRounded } from "../../Utils/timeUtils";
|
||||
import ConfigButton from "./ConfigButton";
|
||||
import SkeletonLayout from "./skeleton";
|
||||
import PropTypes from "prop-types";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const { statusColor, determineState } = useUtils();
|
||||
if (isLoading) {
|
||||
return <SkeletonLayout />;
|
||||
}
|
||||
|
||||
const intervalText = t("monitorStatus.checkingEvery", {
|
||||
interval: formatDurationRounded(monitor?.interval),
|
||||
});
|
||||
|
||||
const captureVersion = monitor?.stats?.aggregateData?.latestCheck?.capture?.version;
|
||||
|
||||
return (
|
||||
<Stack
|
||||
direction="row"
|
||||
@@ -36,12 +44,13 @@ const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
|
||||
</Typography>
|
||||
<Dot />
|
||||
<Typography>
|
||||
Checking every {formatDurationRounded(monitor?.interval)}{" "}
|
||||
{monitor?.stats?.aggregateData?.latestCheck?.capture?.version && (
|
||||
{intervalText}
|
||||
{captureVersion && (
|
||||
<>
|
||||
{" "}
|
||||
with Capture agent{" "}
|
||||
{monitor.stats.aggregateData.latestCheck.capture.version}
|
||||
{t("monitorStatus.withCaptureAgent", {
|
||||
version: captureVersion,
|
||||
})}
|
||||
</>
|
||||
)}
|
||||
.
|
||||
|
||||
@@ -558,5 +558,9 @@
|
||||
"ping": "Enter the URL or IP to ping (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard.",
|
||||
"docker": "Enter the Docker ID of your container. Docker IDs must be the full 64 char Docker ID. You can run docker inpsect <short_id> to get the full container ID.",
|
||||
"port": "Enter the URL or IP of the server, the port number and a clear display name that appears on the dashboard."
|
||||
},
|
||||
"monitorStatus": {
|
||||
"checkingEvery": "Checking every {{interval}}",
|
||||
"withCaptureAgent": "with Capture agent {{version}}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user