From fd6f7cd8813a5e5359ca5cfca4049003ab8d3bff Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 23 Jan 2017 13:57:06 +0000 Subject: [PATCH] Display debug node name in debug panel if its known --- nodes/core/core/58-debug.html | 2 +- nodes/core/core/lib/debug/debug-utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes/core/core/58-debug.html b/nodes/core/core/58-debug.html index d53623162..c421c0604 100644 --- a/nodes/core/core/58-debug.html +++ b/nodes/core/core/58-debug.html @@ -170,7 +170,7 @@ this.handleDebugMessage = function(t,o) { var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z); 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); diff --git a/nodes/core/core/lib/debug/debug-utils.js b/nodes/core/core/lib/debug/debug-utils.js index ad18dab2c..9c9f48661 100644 --- a/nodes/core/core/lib/debug/debug-utils.js +++ b/nodes/core/core/lib/debug/debug-utils.js @@ -205,7 +205,7 @@ RED.debug = (function() { var metaRow = $('
').appendTo(msg); $(''+ getTimestamp()+'').appendTo(metaRow); if (sourceNode) { - $('',{href:"#",class:"debug-message-name"}).html('node: '+sourceNode.id) + $('',{href:"#",class:"debug-message-name"}).html('node: '+(sourceNode.name||sourceNode.id)) .appendTo(metaRow) .click(function(evt) { evt.preventDefault();