Merge pull request #2014 from bluewave-labs/uptime-monitoring-form-improvements
Improve Uptime Monitor Configuration
This commit is contained in:
3 files changed
+11
-8
No files matched your search
@@ -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}
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
Reference in new issue
Block a user