diff --git a/server/model/monitor.js b/server/model/monitor.js index b8e8eb30c..162772875 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -81,7 +81,14 @@ class Monitor extends BeanModel { bean.status = 1; } else { - if (res.data.includes(this.keyword)) { + let data = res.data; + + // Convert to string for object/array + if (typeof data !== "string") { + data = JSON.stringify(data) + } + + if (data.includes(this.keyword)) { bean.msg += ", keyword is found" bean.status = 1; } else { diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 7054d73ac..01af50610 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -30,7 +30,7 @@
-
Search keyword in plain html response and it is case-sensitive
+
Search keyword in plain html or JSON response and it is case-sensitive