Add sub options to Inject node

This commit is contained in:
Nick O'Leary
2018-06-25 10:38:34 +01:00
parent 80873e4ea9
commit c243481432
2 changed files with 39 additions and 6 deletions

View File

@@ -237,10 +237,13 @@ If you want every 20 minutes from now - use the <i>"interval"</i> option.</p>
} 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) {
return 'global.'+this.payload+suffix;
} else if (this.payloadType === 'flow' || this.payloadType === 'global') {
var key = this.payload;
var m = /^#:\((\S+?)\)::(.*)$/.exec(key);
if (m) {
key = m[2];
}
return 'flow.'+key+suffix;
} else {
return this._("inject.inject")+suffix;
}