Update server/model/monitor.js

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
This commit is contained in:
Jimmy Huang 2022-04-01 15:26:50 +08:00 committed by GitHub
parent 244a7b3671
commit a4be651118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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