Merge pull request #2014 from bluewave-labs/uptime-monitoring-form-improvements

Improve Uptime Monitor Configuration
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-03-28 16:09:19 -07:00
commit 8da0d22d83
3 files changed
+11 -8

No files matched your search

+4 -4
View File
@@ -69,9 +69,9 @@ const Configure = () => {
]; ];
const expectedValuePlaceholders = { const expectedValuePlaceholders = {
regex: "^[\w.-]+@gmail.com$", regex: "^(success|ok)$",
equal: "janet@gmail.com", equal: "success",
include: "@gmail.com", include: "ok",
}; };
useEffect(() => { useEffect(() => {
@@ -490,7 +490,7 @@ const Configure = () => {
id="json-path" id="json-path"
label="JSON Path" label="JSON Path"
isOptional={true} isOptional={true}
placeholder="data.email" placeholder="data.status"
value={monitor.jsonPath} value={monitor.jsonPath}
onChange={(event) => handleChange(event, "jsonPath")} onChange={(event) => handleChange(event, "jsonPath")}
error={errors["jsonPath"] ? true : false} error={errors["jsonPath"] ? true : false}
+4 -4
View File
@@ -41,9 +41,9 @@ const CreateMonitor = () => {
]; ];
const expectedValuePlaceholders = { const expectedValuePlaceholders = {
regex: "^[\w.-]+@gmail.com$", regex: "^(success|ok)$",
equal: "janet@gmail.com", equal: "success",
include: "@gmail.com", include: "ok",
}; };
const monitorTypeMaps = { const monitorTypeMaps = {
@@ -477,7 +477,7 @@ const CreateMonitor = () => {
id="json-path" id="json-path"
label="JSON Path" label="JSON Path"
isOptional={true} isOptional={true}
placeholder="data.email" placeholder="data.status"
value={monitor.jsonPath} value={monitor.jsonPath}
onChange={(event) => handleChange(event, "jsonPath")} onChange={(event) => handleChange(event, "jsonPath")}
error={errors["jsonPath"] ? true : false} error={errors["jsonPath"] ? true : false}
+3
View File
@@ -263,6 +263,9 @@ 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}`, payload, { return this.axiosInstance.put(`/monitors/${monitorId}`, payload, {
headers: { headers: {