merge
This commit is contained in:
1 parent
c94c0261ab
commit
88fc158d9f
23 files changed
+251
-228
No files matched your search
@@ -110,6 +110,8 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange })
|
||||
networkError,
|
||||
devices,
|
||||
isLoading,
|
||||
isPublic,
|
||||
isPublished,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -56,7 +56,7 @@ const useSubscribeToMonitors = () => {
|
||||
});
|
||||
setNetworkError(true);
|
||||
}
|
||||
}, [user, getMonitorWithPercentage, theme]);
|
||||
}, [user, getMonitorWithPercentage, theme, isLoading]);
|
||||
return [isLoading, networkError, monitors, monitorsSummary, filteredMonitors];
|
||||
};
|
||||
export { useSubscribeToMonitors };
|
||||
@@ -17,6 +17,7 @@ import PeopleAltOutlinedIcon from "@mui/icons-material/PeopleAltOutlined";
|
||||
import InfoBox from "../../../Components/InfoBox";
|
||||
import StatusHeader from "../../DistributedUptime/Details/Components/StatusHeader";
|
||||
import MonitorsList from "./Components/MonitorsList";
|
||||
import { RowContainer } from "../../../Components/StandardContainer";
|
||||
|
||||
//Utils
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
@@ -162,19 +163,27 @@ const DistributedUptimeStatus = () => {
|
||||
url={url}
|
||||
type="distributed"
|
||||
/>
|
||||
|
||||
<StatusHeader
|
||||
monitor={monitor}
|
||||
connectionStatus={connectionStatus}
|
||||
elementToCapture={elementToCapture}
|
||||
/>
|
||||
|
||||
<SubHeader
|
||||
headerText={t("distributedStatusHeaderText")}
|
||||
|
||||
<SubHeader
|
||||
headerText={t("distributedStatusHeaderText")}
|
||||
subHeaderText={t("distributedStatusSubHeaderText")}
|
||||
rightCatagoryTitle={t("distributedRightCatagoryTitle")}
|
||||
rightDescription = {t("distributedRightCatagoryDescription")}
|
||||
/>
|
||||
>
|
||||
<RowContainer>
|
||||
<Stack>
|
||||
<Typography variant={`body2`}>
|
||||
{t("distributedRightCatagoryTitle")}
|
||||
</Typography>
|
||||
<Typography variant={`h2`}>
|
||||
{t("distributedRightCatagoryDescription")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</RowContainer>
|
||||
</SubHeader>
|
||||
|
||||
<NextExpectedCheck
|
||||
lastUpdateTime={monitor?.timeSinceLastCheck ?? 0}
|
||||
@@ -229,10 +238,18 @@ const DistributedUptimeStatus = () => {
|
||||
monitor={monitor}
|
||||
lastUpdateTrigger={lastUpdateTrigger}
|
||||
/>
|
||||
<TimeFrameHeader
|
||||
timeFrame={timeFrame}
|
||||
setTimeFrame={setTimeFrame}
|
||||
/>
|
||||
|
||||
<SubHeader
|
||||
headerText={t("distributedStatusServerMonitors")}
|
||||
subHeaderText={t("distributedStatusServerMonitorsDescription")}
|
||||
alignItems="end"
|
||||
>
|
||||
<TimeFrameHeader
|
||||
timeFrame={timeFrame}
|
||||
setTimeFrame={setTimeFrame}
|
||||
/>
|
||||
</SubHeader>
|
||||
|
||||
<MonitorsList
|
||||
monitors={statusPage?.subMonitors}
|
||||
timeFrame={timeFrame}
|
||||
|
||||
@@ -147,9 +147,7 @@ const CreateInfrastructureMonitor = () => {
|
||||
thresholds,
|
||||
};
|
||||
|
||||
const action = await dispatch(
|
||||
createInfrastructureMonitor({ monitor: form })
|
||||
);
|
||||
const action = await dispatch(createInfrastructureMonitor({ monitor: form }));
|
||||
if (action.meta.requestStatus === "fulfilled") {
|
||||
createToast({ body: "Infrastructure monitor created successfully!" });
|
||||
navigate("/infrastructure");
|
||||
|
||||
@@ -132,7 +132,7 @@ const Integrations = () => {
|
||||
>
|
||||
<Typography component="h1">Integrations</Typography>
|
||||
<Typography mb={theme.spacing(12)}>
|
||||
Connect Checkmate to your favorite service.
|
||||
Connect Prism to your favorite service.
|
||||
</Typography>
|
||||
<Grid
|
||||
container
|
||||
|
||||
@@ -70,7 +70,7 @@ const Configure = () => {
|
||||
const expectedValuePlaceholders = {
|
||||
regex: "^[\w.-]+@gmail.com$",
|
||||
equal: "janet@gmail.com",
|
||||
include: "@gmail.com"
|
||||
include: "@gmail.com",
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -451,8 +451,8 @@ const Configure = () => {
|
||||
onChange={(event) => handleChange(event, "interval")}
|
||||
items={frequencies}
|
||||
/>
|
||||
{
|
||||
monitor.type === "http" && <>
|
||||
{monitor.type === "http" && (
|
||||
<>
|
||||
<Select
|
||||
id="match-method"
|
||||
label="Match Method"
|
||||
@@ -466,7 +466,9 @@ const Configure = () => {
|
||||
id="expected-value"
|
||||
label="Expected value"
|
||||
isOptional={true}
|
||||
placeholder={expectedValuePlaceholders[monitor.matchMethod || "equal"]}
|
||||
placeholder={
|
||||
expectedValuePlaceholders[monitor.matchMethod || "equal"]
|
||||
}
|
||||
value={monitor.expectedValue}
|
||||
onChange={(event) => handleChange(event, "expectedValue")}
|
||||
error={errors["expectedValue"] ? true : false}
|
||||
@@ -477,7 +479,8 @@ const Configure = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
The expected value is used to match against response result, and the match determines the status.
|
||||
The expected value is used to match against response result, and
|
||||
the match determines the status.
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
@@ -497,15 +500,22 @@ const Configure = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
This expression will be evaluated against the reponse JSON data and the result will be used to match against the expected value. See
|
||||
<Typography component="a" href="https://jmespath.org/" target="_blank" color="info">
|
||||
This expression will be evaluated against the reponse JSON data
|
||||
and the result will be used to match against the expected value.
|
||||
See
|
||||
<Typography
|
||||
component="a"
|
||||
href="https://jmespath.org/"
|
||||
target="_blank"
|
||||
color="info"
|
||||
>
|
||||
jmespath.org
|
||||
</Typography>
|
||||
for query language documentation.
|
||||
</Typography>
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
)}
|
||||
</Stack>
|
||||
</ConfigBox>
|
||||
<Stack
|
||||
|
||||
@@ -42,7 +42,7 @@ const CreateMonitor = () => {
|
||||
const expectedValuePlaceholders = {
|
||||
regex: "^[\w.-]+@gmail.com$",
|
||||
equal: "janet@gmail.com",
|
||||
include: "@gmail.com"
|
||||
include: "@gmail.com",
|
||||
};
|
||||
|
||||
const monitorTypeMaps = {
|
||||
@@ -416,8 +416,8 @@ const CreateMonitor = () => {
|
||||
onChange={(event) => handleChange(event, "interval")}
|
||||
items={SELECT_VALUES}
|
||||
/>
|
||||
{
|
||||
monitor.type === "http" && <>
|
||||
{monitor.type === "http" && (
|
||||
<>
|
||||
<Select
|
||||
id="match-method"
|
||||
label="Match Method"
|
||||
@@ -431,7 +431,9 @@ const CreateMonitor = () => {
|
||||
id="expected-value"
|
||||
label="Expected value"
|
||||
isOptional={true}
|
||||
placeholder={expectedValuePlaceholders[monitor.matchMethod || "equal"]}
|
||||
placeholder={
|
||||
expectedValuePlaceholders[monitor.matchMethod || "equal"]
|
||||
}
|
||||
value={monitor.expectedValue}
|
||||
onChange={(event) => handleChange(event, "expectedValue")}
|
||||
error={errors["expectedValue"] ? true : false}
|
||||
@@ -442,7 +444,8 @@ const CreateMonitor = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
The expected value is used to match against response result, and the match determines the status.
|
||||
The expected value is used to match against response result, and the
|
||||
match determines the status.
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
@@ -462,15 +465,21 @@ const CreateMonitor = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
This expression will be evaluated against the reponse JSON data and the result will be used to match against the expected value. See
|
||||
<Typography component="a" href="https://jmespath.org/" target="_blank" color="info">
|
||||
This expression will be evaluated against the reponse JSON data and
|
||||
the result will be used to match against the expected value. See
|
||||
<Typography
|
||||
component="a"
|
||||
href="https://jmespath.org/"
|
||||
target="_blank"
|
||||
color="info"
|
||||
>
|
||||
jmespath.org
|
||||
</Typography>
|
||||
for query language documentation.
|
||||
</Typography>
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
)}
|
||||
</Stack>
|
||||
</ConfigBox>
|
||||
<Stack
|
||||
|
||||
@@ -2,12 +2,7 @@ import { useState } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { networkService } from "../../../../main";
|
||||
import { createToast } from "../../../../Utils/toastUtils";
|
||||
export const useChecksFetch = ({
|
||||
monitorId,
|
||||
dateRange,
|
||||
page,
|
||||
rowsPerPage,
|
||||
}) => {
|
||||
export const useChecksFetch = ({ monitorId, dateRange, page, rowsPerPage }) => {
|
||||
const [checks, setChecks] = useState(undefined);
|
||||
const [checksCount, setChecksCount] = useState(undefined);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
@@ -63,6 +63,7 @@ export const useMonitorFetch = ({
|
||||
rowsPerPage,
|
||||
theme,
|
||||
triggerUpdate,
|
||||
getMonitorWithPercentage,
|
||||
]);
|
||||
return {
|
||||
monitors,
|
||||
|
||||
@@ -124,7 +124,6 @@ const UptimeMonitors = () => {
|
||||
!monitorsAreLoading &&
|
||||
(totalMonitors === 0 || typeof totalMonitors === "undefined")
|
||||
) {
|
||||
|
||||
return (
|
||||
<Fallback
|
||||
vowelStart={true}
|
||||
|
||||
Reference in new issue
Block a user