@flowfuse/node-red-dashboard
Advanced tools
Comparing version 1.16.0 to 1.16.1-3db5503-202409031237.0
@@ -0,1 +1,4 @@ | ||
const statestore = require('../store/state.js') | ||
const { appendTopic } = require('../utils/index.js') | ||
module.exports = function (RED) { | ||
@@ -10,3 +13,49 @@ function GaugeNode (config) { | ||
const evts = { | ||
onChange: true | ||
beforeSend: async function (msg) { | ||
const updates = msg.ui_update | ||
if (updates) { | ||
if (typeof updates.title !== 'undefined') { | ||
// dynamically set "label" property | ||
statestore.set(group.getBase(), node, msg, 'title', updates.title) | ||
} | ||
if (typeof updates.gtype !== 'undefined') { | ||
// dynamically set "gauge type" property | ||
statestore.set(group.getBase(), node, msg, 'gtype', updates.gtype) | ||
} | ||
if (typeof updates.gstyle !== 'undefined') { | ||
// dynamically set "gauge style" property | ||
statestore.set(group.getBase(), node, msg, 'gstyle', updates.gstyle) | ||
} | ||
if (typeof updates.prefix !== 'undefined') { | ||
// dynamically set "prefix" property | ||
statestore.set(group.getBase(), node, msg, 'prefix', updates.prefix) | ||
} | ||
if (typeof updates.suffix !== 'undefined') { | ||
// dynamically set "suffix" property | ||
statestore.set(group.getBase(), node, msg, 'suffix', updates.suffix) | ||
} | ||
if (typeof updates.units !== 'undefined') { | ||
// dynamically set "units" property | ||
statestore.set(group.getBase(), node, msg, 'units', updates.units) | ||
} | ||
if (typeof updates.icon !== 'undefined') { | ||
// dynamically set "icon" property | ||
statestore.set(group.getBase(), node, msg, 'icon', updates.icon) | ||
} | ||
if (typeof updates.segments !== 'undefined') { | ||
// dynamically set "segments" property | ||
statestore.set(group.getBase(), node, msg, 'segments', updates.segments) | ||
} | ||
if (typeof updates.min !== 'undefined') { | ||
// dynamically set "min" property | ||
statestore.set(group.getBase(), node, msg, 'min', updates.min) | ||
} | ||
if (typeof updates.max !== 'undefined') { | ||
// dynamically set "max" property | ||
statestore.set(group.getBase(), node, msg, 'max', updates.max) | ||
} | ||
} | ||
msg = await appendTopic(RED, config, node, msg) | ||
return msg | ||
} | ||
} | ||
@@ -13,0 +62,0 @@ |
{ | ||
"name": "@flowfuse/node-red-dashboard", | ||
"version": "1.16.0", | ||
"version": "1.16.1-3db5503-202409031237.0", | ||
"description": "Dashboard 2.0 - A collection of Node-RED nodes that provide functionality to build your own UI applications (inc. forms, buttons, charts).", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1
1
609568
108
3310
1