Added local support for the page.
This commit is contained in:
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 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,
|
||||
})}
|
||||
</>
|
||||
)}
|
||||
.
|
||||
|
||||
Reference in new issue
Block a user