Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flowfuse/node-red-dashboard

Package Overview
Dependencies
Maintainers
0
Versions
581
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flowfuse/node-red-dashboard - npm Package Compare versions

Comparing version 1.16.0 to 1.16.1-3db5503-202409031237.0

51

nodes/widgets/ui_gauge.js

@@ -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 @@

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc