Skip to content

Commit

Permalink
Trim before truncating "keword not found" message
Browse files Browse the repository at this point in the history
  • Loading branch information
TechWilk committed Apr 11, 2023
1 parent 680dcce commit 0e516a4
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 0e516a4

Please sign in to comment.