Updates to encode/decode message when passed over debug comms link

This commit is contained in:
Nick O'Leary 2021-05-13 13:38:34 +01:00
parent 001f066769
commit 4ff991764e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 15 additions and 8 deletions

View File

@ -178,8 +178,14 @@ RED.utils = (function() {
RED.popover.tooltip(pinPath,RED._("node-red:debug.sidebar.pinPath"));
}
if (extraTools) {
extraTools.addClass("red-ui-debug-msg-tools-other");
extraTools.appendTo(tools);
var t = extraTools;
if (typeof t === 'function') {
t = t(key,msg);
}
if (t) {
t.addClass("red-ui-debug-msg-tools-other");
t.appendTo(tools);
}
}
}
function checkExpanded(strippedKey,expandPaths,minRange,maxRange) {
@ -476,7 +482,8 @@ RED.utils = (function() {
rootPath: rootPath,
expandPaths: expandPaths,
ontoggle: ontoggle,
exposeApi: exposeApi
exposeApi: exposeApi,
tools: tools
}
).appendTo(row);
}
@ -504,8 +511,8 @@ RED.utils = (function() {
rootPath: rootPath,
expandPaths: expandPaths,
ontoggle: ontoggle,
exposeApi: exposeApi
exposeApi: exposeApi,
tools: tools
}
).appendTo(row);
}
@ -553,8 +560,8 @@ RED.utils = (function() {
rootPath: rootPath,
expandPaths: expandPaths,
ontoggle: ontoggle,
exposeApi: exposeApi
exposeApi: exposeApi,
tools: tools
}
).appendTo(row);
}

View File

@ -872,7 +872,7 @@ function encodeObject(msg,opts) {
}
}
return value;
}," ");
});
} else {
try { msg.msg = msg.msg.toString(); }
catch(e) { msg.msg = "[Type not printable]" + util.inspect(msg.msg); }