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