Added local support for the page.

This commit is contained in:
Owaise Imdad committed 2025-06-09 21:25:34 +05:30
1 parent 3886617b11
commit 4608390cfd
2 files changed
+17 -4

No files matched your search

@@ -7,14 +7,22 @@ import { formatDurationRounded } from "../../Utils/timeUtils";
import ConfigButton from "./ConfigButton"; import ConfigButton from "./ConfigButton";
import SkeletonLayout from "./skeleton"; import SkeletonLayout from "./skeleton";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => { const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation();
const { statusColor, determineState } = useUtils(); const { statusColor, determineState } = useUtils();
if (isLoading) { if (isLoading) {
return <SkeletonLayout />; return <SkeletonLayout />;
} }
const intervalText = t("monitorStatus.checkingEvery", {
interval: formatDurationRounded(monitor?.interval),
});
const captureVersion = monitor?.stats?.aggregateData?.latestCheck?.capture?.version;
return ( return (
<Stack <Stack
direction="row" direction="row"
@@ -36,12 +44,13 @@ const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
</Typography> </Typography>
<Dot /> <Dot />
<Typography> <Typography>
Checking every {formatDurationRounded(monitor?.interval)}{" "} {intervalText}
{monitor?.stats?.aggregateData?.latestCheck?.capture?.version && ( {captureVersion && (
<> <>
{" "} {" "}
with Capture agent{" "} {t("monitorStatus.withCaptureAgent", {
{monitor.stats.aggregateData.latestCheck.capture.version} 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.", "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.", "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." "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}}"
} }
} }