Added local support for the page.

This commit is contained in:
Owaise Imdad
2025-06-09 21:25:34 +05:30
parent 3886617b11
commit 4608390cfd
2 changed files with 17 additions and 4 deletions
@@ -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,
})}
</>
)}
.
+4
View File
@@ -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}}"
}
}