Commit Graph

19 Commits

Author SHA1 Message Date
Nick O'Leary 973b31521e
Tidy up debug message status count 2022-04-26 16:04:09 +01:00
Rafael Muynarsk a63dfc4650 Added condition that.statusType === "counter" in the debug.html file 2022-04-24 17:13:53 -03:00
Rafael Muynarsk 8924ac2783 implementing message count on the debug node 2022-04-23 20:18:51 -03:00
Hiroyasu Nishiyama 226f45d8d5 fix reference error of msg.status in debug node 2022-04-12 11:33:02 +09:00
Alexandre Alapetite 280d63fde7
Fix util.encodeObject 2022-02-03 15:59:25 +01:00
Alexandre Alapetite e55cbb3e3d
Fix bug in debug node due to msg.hasOwnProperty construct
`msg.hasOwnProperty("status")` might make the debug node crash/produce an error if the payload was created with `Object.create(null)`.
This is the case e.g. for `ini` (to parse INI files), an official NPM node:
4f289946b3/lib/ini.js (L63)

My Node-RED node `node-red-contrib-parser-ini`, which is using that library, was hit by this bug and I had to ship a workaround
fe6b1eb4b1/parser-ini.js (L14)

The `msg.hasOwnProperty("xxx")` construct should not be used since ECMAScript 5.1.

ESLint advises in the same direction https://eslint.org/docs/rules/no-prototype-builtins

This patch was produced using the following regex:
Search: `\b([\w.]+).hasOwnProperty\(`
Replace: `Object.prototype.hasOwnProperty.call($1, `

This could be applied more gobally if desired.
2022-02-03 02:01:22 +01:00
Nick O'Leary 04ffa06221
Add proper error handling for 404 errors when serving debug files 2021-11-26 11:30:51 +00:00
Nick O'Leary cd3aba2b89
Allow nodes to access resolved theme files
Fixes #2968
2021-04-29 10:17:07 +01:00
Nick O'Leary 6ea978d83d
Prevent needless retention of node status messages 2020-11-16 21:05:13 +00:00
Dave Conway-Jones b96d562700
fix debug status to not loop, make migration more seamless, detect status type objects 2020-07-04 15:26:02 +01:00
Dave Conway-Jones 16a634063a
Fix debug node status to migrate old nodes to correct default mode. 2020-06-05 09:48:12 +01:00
Nick O'Leary 876a7a4646
Add bulk-activate actions for debug node
Adds the actions:

 - core:activate-all-debug-nodes
 - core:activate-all-flow-debug-nodes

to match the deactivate* actions.

Also adds:

 - core:activate-selected-debug-nodes
 - core:deactivate-selected-debug-nodes

Adds a new httpAdmin route - /debug/(enable/disable) - that can be
use to bulk enable/disable nodes via HTTP Post.
2020-05-27 12:20:23 +01:00
Dave Conway-Jones a600feb5de
Move debug status text length check to just before dsiplay. 2020-05-19 10:57:33 +01:00
Dave Conway-Jones 1d36ce0fdf
debug node: add auto handling of error and status msgs if set to show status 2020-05-15 23:32:27 +01:00
Dave Conway-Jones 88d4d306f3
Add some colour smarts to debug status 2020-05-15 16:06:34 +01:00
Dave Conway-Jones 1d71fb3554
Let debug node show status indpendent of main output 2020-05-14 15:38:48 +01:00
Nick O'Leary 95a51aafdc
Add path property to debug messages
Fixes #2358

This property can be used to identify the full path to the node that
logged a given message. If the node is inside a subflow (and maybe
nested many levels deep), this path can be used to help find the
node, rather than just the top-level subflow instance node.

A side-effect of this change is the Debug sidebar is now able to
show the message tools for a message coming from a deeply nested
subflow
2020-01-17 16:56:30 +00:00
Nick O'Leary f62a933d1c
Ensure z property included in full message debug payload
Fixes #2315 #2316
2019-10-11 11:07:48 +01:00
Nick O'Leary da6db24f9e
Reorganise nodes into new categories 2019-08-21 14:23:23 +01:00