inject node label - show topic for timestamp mode if short

This commit is contained in:
Dave Conway-Jones 2016-10-11 09:27:02 +01:00
parent dcfaf1e2b9
commit 9704fb04d9
1 changed files with 5 additions and 1 deletions

View File

@ -219,7 +219,11 @@
return this._("inject.inject")+suffix;
}
} else if (this.payloadType === 'date') {
return this._("inject.timestamp")+suffix;
if ((this.topic !== "") && (this.topic.length <= 16)) {
return this.topic + ":" + this._("inject.timestamp")+suffix;
} else {
return this._("inject.timestamp")+suffix;
}
} else if (this.payloadType === 'flow' && this.payload.length < 19) {
return 'flow.'+this.payload+suffix;
} else if (this.payloadType === 'global' && this.payload.length < 17) {