Merge branch 'master' into 0.17

This commit is contained in:
Nick O'Leary
2017-04-11 14:53:44 +01:00
6 changed files with 40 additions and 7 deletions

View File

@@ -83,6 +83,19 @@
url: "debug/"+this.id+"/"+(this.active?"enable":"disable"),
type: "POST",
success: function(resp, textStatus, xhr) {
var historyEvent = {
t:'edit',
node:node,
changes:{
active: !node.active
},
dirty:node.dirty,
changed:node.changed
};
node.changed = true;
RED.nodes.dirty(true);
RED.history.push(historyEvent);
if (xhr.status == 200) {
RED.notify(node._("debug.notification.activated",{label:label}),"success");
} else if (xhr.status == 201) {

View File

@@ -100,6 +100,10 @@ module.exports = function(RED) {
var seenAts = [];
try {
msg.format = msg.msg.constructor.name || "Object";
// Handle special case of msg.req/res objects from HTTP In node
if (msg.format === "IncomingMessage" || msg.format === "ServerResponse") {
msg.format = "Object";
}
} catch(err) {
msg.format = "Object";
}
@@ -116,7 +120,7 @@ module.exports = function(RED) {
msg.msg = msg.msg.slice(0,debuglength);
}
}
if (isArray || (msg.format === "Object")) {
if (isArray || msg.format === "Object") {
msg.msg = safeJSONStringify(msg.msg, function(key, value) {
if (key === '_req' || key === '_res') {
return "[internal]"