change placeholders

This commit is contained in:
mohadeseh safari committed 2025-03-28 13:06:40 -04:00
1 parent d58150df6b
commit 5908b4457b
3 files changed
+14 -14

No files matched your search

+7 -5
View File
@@ -68,9 +68,9 @@ const Configure = () => {
]; ];
const expectedValuePlaceholders = { const expectedValuePlaceholders = {
regex: "^2[0-9]{2}$", regex: "^(success|ok)$",
equal: "200", equal: "success",
include: "success", include: "ok",
}; };
useEffect(() => { useEffect(() => {
@@ -479,7 +479,8 @@ const Configure = () => {
color={theme.palette.primary.contrastTextTertiary} color={theme.palette.primary.contrastTextTertiary}
opacity={0.8} opacity={0.8}
> >
The expected value to check in the response body content. Examples: specific text, HTML elements, or JSON values in the response. The expected value is used to match against response result, and
the match determines the status.
</Typography> </Typography>
</Stack> </Stack>
<Stack> <Stack>
@@ -499,7 +500,8 @@ const Configure = () => {
color={theme.palette.primary.contrastTextTertiary} color={theme.palette.primary.contrastTextTertiary}
opacity={0.8} opacity={0.8}
> >
Optional path to extract specific data from JSON responses. Common examples: "status", "data.status", "meta.code". Leave empty to check the entire response. This expression will be evaluated against the reponse JSON data
and the result will be used to match against the expected value.
See&nbsp; See&nbsp;
<Typography <Typography
component="a" component="a"
+7 -6
View File
@@ -41,9 +41,9 @@ const CreateMonitor = () => {
]; ];
const expectedValuePlaceholders = { const expectedValuePlaceholders = {
regex: "^2[0-9]{2}$", regex: "^(success|ok)$",
equal: "200", equal: "success",
include: "success", include: "ok",
}; };
const monitorTypeMaps = { const monitorTypeMaps = {
@@ -465,7 +465,8 @@ const CreateMonitor = () => {
color={theme.palette.primary.contrastTextTertiary} color={theme.palette.primary.contrastTextTertiary}
opacity={0.8} opacity={0.8}
> >
The expected value to check in the response body content. Examples: specific text, HTML elements, or JSON values in the response. The expected value is used to match against response result, and the
match determines the status.
</Typography> </Typography>
</Stack> </Stack>
<Stack> <Stack>
@@ -485,8 +486,8 @@ const CreateMonitor = () => {
color={theme.palette.primary.contrastTextTertiary} color={theme.palette.primary.contrastTextTertiary}
opacity={0.8} opacity={0.8}
> >
Optional path to extract specific data from JSON responses. Common examples: "status", "data.status", "meta.code". Leave empty to check the entire response. This expression will be evaluated against the reponse JSON data and
See&nbsp; the result will be used to match against the expected value. See&nbsp;
<Typography <Typography
component="a" component="a"
href="https://jmespath.org/" href="https://jmespath.org/"
-3
View File
@@ -263,9 +263,6 @@ class NetworkService {
description: monitor.description, description: monitor.description,
interval: monitor.interval, interval: monitor.interval,
notifications: monitor.notifications, notifications: monitor.notifications,
matchMethod: monitor.matchMethod,
expectedValue: monitor.expectedValue,
jsonPath: monitor.jsonPath,
}; };
return this.axiosInstance.put(`/monitors/${monitorId}`, updatedFields, { return this.axiosInstance.put(`/monitors/${monitorId}`, updatedFields, {
headers: { headers: {