From 9704fb04d9775c87e58afebefaf30c6bd6bac587 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 11 Oct 2016 09:27:02 +0100 Subject: [PATCH] inject node label - show topic for timestamp mode if short --- nodes/core/core/20-inject.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nodes/core/core/20-inject.html b/nodes/core/core/20-inject.html index 1adddd9d5..14117e16d 100644 --- a/nodes/core/core/20-inject.html +++ b/nodes/core/core/20-inject.html @@ -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) {