mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Display debug node name in debug panel if its known
This commit is contained in:
parent
3fdeb38bb7
commit
fd6f7cd881
@ -170,7 +170,7 @@
|
|||||||
this.handleDebugMessage = function(t,o) {
|
this.handleDebugMessage = function(t,o) {
|
||||||
var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z);
|
var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z);
|
||||||
if (sourceNode) {
|
if (sourceNode) {
|
||||||
o._source = {id:sourceNode.id,z:sourceNode.z};
|
o._source = {id:sourceNode.id,z:sourceNode.z,name:sourceNode.name};
|
||||||
|
|
||||||
}
|
}
|
||||||
RED.debug.handleDebugMessage(o);
|
RED.debug.handleDebugMessage(o);
|
||||||
|
@ -205,7 +205,7 @@ RED.debug = (function() {
|
|||||||
var metaRow = $('<div class="debug-message-meta"></div>').appendTo(msg);
|
var metaRow = $('<div class="debug-message-meta"></div>').appendTo(msg);
|
||||||
$('<span class="debug-message-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
|
$('<span class="debug-message-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
|
||||||
if (sourceNode) {
|
if (sourceNode) {
|
||||||
$('<a>',{href:"#",class:"debug-message-name"}).html('node: '+sourceNode.id)
|
$('<a>',{href:"#",class:"debug-message-name"}).html('node: '+(sourceNode.name||sourceNode.id))
|
||||||
.appendTo(metaRow)
|
.appendTo(metaRow)
|
||||||
.click(function(evt) {
|
.click(function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user