Merge pull request #3054 from TechWilk/keyword-not-found-whitespace

Trim before truncating "keword not found" message
pull/3161/head
Louis Lam 1 year ago committed by GitHub
commit 8d24891b8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) + "...";
}

Loading…
Cancel
Save