mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4402 from node-red/Let-debug-status-length-be-settable
Let debug node status msg length be settable via settings
This commit is contained in:
commit
fea1da5542
@ -5,6 +5,7 @@ module.exports = function(RED) {
|
|||||||
const fs = require("fs-extra");
|
const fs = require("fs-extra");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
var debuglength = RED.settings.debugMaxLength || 1000;
|
var debuglength = RED.settings.debugMaxLength || 1000;
|
||||||
|
var statuslength = RED.settings.debugStatusLength || 32;
|
||||||
var useColors = RED.settings.debugUseColors || false;
|
var useColors = RED.settings.debugUseColors || false;
|
||||||
util.inspect.styles.boolean = "red";
|
util.inspect.styles.boolean = "red";
|
||||||
const { hasOwnProperty } = Object.prototype;
|
const { hasOwnProperty } = Object.prototype;
|
||||||
@ -164,7 +165,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st.length > 32) { st = st.substr(0,32) + "..."; }
|
if (st.length > statuslength) { st = st.substr(0,statuslength) + "..."; }
|
||||||
|
|
||||||
var newStatus = {fill:fill, shape:shape, text:st};
|
var newStatus = {fill:fill, shape:shape, text:st};
|
||||||
if (JSON.stringify(newStatus) !== node.oldState) { // only send if we have to
|
if (JSON.stringify(newStatus) !== node.oldState) { // only send if we have to
|
||||||
|
4
packages/node_modules/node-red/settings.js
vendored
4
packages/node_modules/node-red/settings.js
vendored
@ -449,6 +449,7 @@ module.exports = {
|
|||||||
* - ui (for use with Node-RED Dashboard)
|
* - ui (for use with Node-RED Dashboard)
|
||||||
* - debugUseColors
|
* - debugUseColors
|
||||||
* - debugMaxLength
|
* - debugMaxLength
|
||||||
|
* - debugStatusLength
|
||||||
* - execMaxBufferSize
|
* - execMaxBufferSize
|
||||||
* - httpRequestTimeout
|
* - httpRequestTimeout
|
||||||
* - mqttReconnectTime
|
* - mqttReconnectTime
|
||||||
@ -504,6 +505,9 @@ module.exports = {
|
|||||||
/** The maximum length, in characters, of any message sent to the debug sidebar tab */
|
/** The maximum length, in characters, of any message sent to the debug sidebar tab */
|
||||||
debugMaxLength: 1000,
|
debugMaxLength: 1000,
|
||||||
|
|
||||||
|
/** The maximum length, in characters, of status messages under the debug node */
|
||||||
|
//debugStatusLength: 32,
|
||||||
|
|
||||||
/** Maximum buffer size for the exec node. Defaults to 10Mb */
|
/** Maximum buffer size for the exec node. Defaults to 10Mb */
|
||||||
//execMaxBufferSize: 10000000,
|
//execMaxBufferSize: 10000000,
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user