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

Ensure z property included in full message debug payload

Fixes #2315 #2316
This commit is contained in:
Nick O'Leary 2019-10-11 11:07:48 +01:00
parent 451835fbeb
commit f62a933d1c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ module.exports = function(RED) {
if (err) { if (err) {
done(RED._("debug.invalid-exp", {error: editExpression})); done(RED._("debug.invalid-exp", {error: editExpression}));
} else { } else {
done(null,{id:node.id, name:node.name, topic:msg.topic, msg:value, _path:msg._path}); done(null,{id:node.id, z:node.z, name:node.name, topic:msg.topic, msg:value, _path:msg._path});
} }
}); });
} else { } else {
@ -88,7 +88,7 @@ module.exports = function(RED) {
node.log("\n"+util.inspect(msg, {colors:useColors, depth:10})); node.log("\n"+util.inspect(msg, {colors:useColors, depth:10}));
} }
if (this.active && this.tosidebar) { if (this.active && this.tosidebar) {
sendDebug({id:node.id, name:node.name, topic:msg.topic, msg:msg, _path:msg._path}); sendDebug({id:node.id, z:node.z, name:node.name, topic:msg.topic, msg:msg, _path:msg._path});
} }
done(); done();
} else { } else {

View File

@ -448,7 +448,7 @@ RED.debug = (function() {
var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg); var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg);
$('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow); $('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
if (sourceNode) { if (sourceNode) {
$('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+(sourceNode.name||sourceNode.id)) $('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+sanitize(o.name||sourceNode.name||sourceNode.id))
.appendTo(metaRow) .appendTo(metaRow)
.on("click", function(evt) { .on("click", function(evt) {
evt.preventDefault(); evt.preventDefault();