Add init box
This commit is contained in:
1 parent
f7490ffe64
commit
e0d4f0d0f6
5 files changed
+25
No files matched your search
@@ -91,3 +91,15 @@ export const PausedStatusBox = ({ n }: { n: number }) => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const InitializingStatusBox = ({ n }: { n: number }) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
return (
|
||||||
|
<StatusBox
|
||||||
|
label={t("monitorStatus.initializing")}
|
||||||
|
n={n}
|
||||||
|
color={theme.palette.warning.lowContrast}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -660,6 +660,7 @@
|
|||||||
"checkingEvery": "Checking every {{interval}}",
|
"checkingEvery": "Checking every {{interval}}",
|
||||||
"down": "down",
|
"down": "down",
|
||||||
"paused": "paused",
|
"paused": "paused",
|
||||||
|
"initializing": "initializing",
|
||||||
"up": "up",
|
"up": "up",
|
||||||
"withCaptureAgent": "with Capture agent {{version}}"
|
"withCaptureAgent": "with Capture agent {{version}}"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import type { IMonitor, IMonitorWithStats } from "@/types/monitor";
|
|||||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useDelete } from "@/hooks/UseApi";
|
import { useDelete } from "@/hooks/UseApi";
|
||||||
|
import { InitializingStatusBox } from "@/components/design-elements/StatusBox";
|
||||||
|
|
||||||
const GLOBAL_REFRESH = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
const GLOBAL_REFRESH = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
||||||
|
|
||||||
@@ -90,6 +91,9 @@ const PageSpeedMonitorsPage = () => {
|
|||||||
<UpStatusBox n={upCount} />
|
<UpStatusBox n={upCount} />
|
||||||
<DownStatusBox n={downCount} />
|
<DownStatusBox n={downCount} />
|
||||||
<PausedStatusBox n={pausedCount} />
|
<PausedStatusBox n={pausedCount} />
|
||||||
|
<InitializingStatusBox
|
||||||
|
n={count - (upCount + downCount + pausedCount)}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<InfraMonitorsTable
|
<InfraMonitorsTable
|
||||||
monitors={monitors}
|
monitors={monitors}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import type { IMonitor, IMonitorWithStats } from "@/types/monitor";
|
|||||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useDelete } from "@/hooks/UseApi";
|
import { useDelete } from "@/hooks/UseApi";
|
||||||
|
import { InitializingStatusBox } from "@/components/design-elements/StatusBox";
|
||||||
|
|
||||||
const GLOBAL_REFRESH = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
const GLOBAL_REFRESH = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
||||||
|
|
||||||
@@ -90,6 +91,9 @@ const PageSpeedMonitorsPage = () => {
|
|||||||
<UpStatusBox n={upCount} />
|
<UpStatusBox n={upCount} />
|
||||||
<DownStatusBox n={downCount} />
|
<DownStatusBox n={downCount} />
|
||||||
<PausedStatusBox n={pausedCount} />
|
<PausedStatusBox n={pausedCount} />
|
||||||
|
<InitializingStatusBox
|
||||||
|
n={count - (upCount + downCount + pausedCount)}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<PageSpeedMonitorTable
|
<PageSpeedMonitorTable
|
||||||
monitors={monitors}
|
monitors={monitors}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import {
|
|||||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useDelete } from "@/hooks/UseApi";
|
import { useDelete } from "@/hooks/UseApi";
|
||||||
|
import { InitializingStatusBox } from "@/components/design-elements/StatusBox";
|
||||||
|
|
||||||
const GLOBAL_REFRESH = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
const GLOBAL_REFRESH = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
||||||
|
|
||||||
@@ -124,6 +125,9 @@ const UptimeMonitors = () => {
|
|||||||
<UpStatusBox n={upCount} />
|
<UpStatusBox n={upCount} />
|
||||||
<DownStatusBox n={downCount} />
|
<DownStatusBox n={downCount} />
|
||||||
<PausedStatusBox n={pausedCount} />
|
<PausedStatusBox n={pausedCount} />
|
||||||
|
<InitializingStatusBox
|
||||||
|
n={count - (upCount + downCount + pausedCount)}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<HeaderFilter
|
<HeaderFilter
|
||||||
selectedTypes={selectedTypes}
|
selectedTypes={selectedTypes}
|
||||||
|
|||||||
Reference in new issue
Block a user