merge
This commit is contained in:
1 parent
c94c0261ab
commit
88fc158d9f
23 files changed
+251
-228
No files matched your search
@@ -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