1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

shorten ping label if more than one target

This commit is contained in:
Dave Conway-Jones 2020-04-03 17:55:30 +01:00
parent 7667de5ced
commit 9b1eeb2756
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -74,8 +74,8 @@ var timerParameterValidator = function(node,v){
},
label: function() {
let lbl = this.name||this.host||this._("ping.ping");
if(lbl.length > 20){
lbl = lbl.substring(0,17) + "..."
if (lbl.split(',').length > 1){
lbl = this._("ping.ping");
}
return lbl;
},