Trim before truncating "keword not found" message

This commit is contained in:
Christopher Wilkinson 2023-04-08 17:23:29 +01:00
parent 680dccefea
commit 0e516a42e5
No known key found for this signature in database
GPG Key ID: 693AE6BC332CD748

View File

@ -400,7 +400,7 @@ class Monitor extends BeanModel {
bean.msg += ", keyword is found";
bean.status = UP;
} else {
data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ");
data = data.replace(/<[^>]*>?|[\n\r]|\s+/gm, " ").trim();
if (data.length > 50) {
data = data.substring(0, 47) + "...";
}