Skip to content

Commit

Permalink
Merge pull request louislam#3054 from TechWilk/keyword-not-found-whit…
Browse files Browse the repository at this point in the history
…espace

Trim before truncating "keword not found" message
  • Loading branch information
louislam authored May 13, 2023
2 parents ba7de3f + 0e516a4 commit 8d24891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/model/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) + "...";
}
Expand Down

0 comments on commit 8d24891

Please sign in to comment.