node-red/node-red-dashboard

Name: node-red-dashboard

Owner: node-red

Description: A dashboard UI for Node-RED

Created: 2016-05-05 16:42:19.0

Updated: 2018-01-20 06:05:28.0

Pushed: 2018-01-12 21:20:18.0

Homepage:

Size: 12214

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

node-red-dashboard

NPM version

This module provides a set of nodes in Node-RED to quickly create a live data dashboard.

For the latest updates see the CHANGELOG.md

Pre-requisites

Node-RED-Dashboard requires Node-RED version 0.14 or more recent.

Install

To install the stable version use the Menu - Manage palette option and search for node-red-dashboard, or run the following command in your Node-RED user directory (typically ~/.node-red):

npm i node-red-dashboard

Open your Node-RED instance and you should have UI nodes available in the palette and a new dashboard tab in the right side panel. The UI interface is available at http://localhost:1880/ui (if the default settings are used).

If you want to try the latest version from github, you can install it by

npm i node-red/node-red-dashboard
Layout

The dashboard layout should be considered as a grid.

Each group element has a width - by default 6 'units' (a unit is 48px wide by default with a 6px gap).

Each widget in the group also has a width - by default, 'auto' which means it will fill the width of the group it is in, but you can set it to a fixed number of units.

The layout algorithm of the dashboard always tries to place items as high and to the left as they can within their container - this applies to how groups are positioned on the page, as well as how widgets are positioned in a group.

Given a group with width 6, if you add six widgets, each with a width of 2, then they will be laid out in two rows - three widgets in each.

If you add two groups of width 6, as long as your browser window is wide enough, they will sit alongside each other. If you shrink the browser, at some point the second group will shift to be below the first, in a column.

It is advisable to use multiple groups if possible, rather than one big group, so that the page can dynamically resize on smaller screens.

Features
Dashboard sidebar

The widget layout is managed by a dashboard tab in the sidebar of the Node-RED editor.

Layout Theme Site Widgets

Group labels are optional.

Most widgets can have a label and value - both of these can be specified by properties of the incoming msg if required, and modified by angular filters. For example the label can be set to {{msg.topic}}, or the value could be set to {{value | number:1}}% to round the value to one decimal place and append a % sign.

Each node may parse the msg.payload to make it suitable for display. This converted version is exposed as the variable called value, (see example above).

Any widget can be disabled by passing in a msg.enabled property set to false;. Note: this doesn't stop the widget receiving messages but does stop inputs being active and does re-style the widget.

Most ui widgets can also be configured by using a msg.ui_control message - see config-fields.md for futher details.

Tip: The Text widget will accept html - so you can use it together with the fa-icons we already use to create indicator type widgets.

Securing the Dashboard

You can use the httpNodeAuth property in your Node-RED settings.js file to secure the Dashboard as it is created the same way as other HTTP nodes are. The details can be found at the bottom of this page in the docs http://nodered.org/docs/security

Multiple Users

This Dashboard does NOT support multiple individual users. It is a view of the status of the underlying Node-RED flow, which itself is single user. If the state of the flow changes then all clients will get notified of that change.

Discussions and suggestions

Use the Node-RED google group: https://groups.google.com/forum/#!forum/node-red or the Dashboard-ui channel in Slack

The current work in progress list is shown in the Github Project.

Contributing

Before raising a pull-request, please read our contributing guide.

This project adheres to the Contributor Covenant 1.4. By participating, you are expected to uphold this code. Please report unacceptable behavior to any of the project's core team.

Developers
\.node-red\node_modules
clone https://github.com/node-red/node-red-dashboard.git
ode-red-dashboard
install

The plugin uses the `distfolder if it exists. Make sure it has been deleted if you want to use the non-minified version while developing. After finishing changes to the front-end code in the src folder, you can use ``gulp``` to update and rebuild the minified files and update the appcache manifest.

gulp

We also have suggested lint and js styles that can be checked with:

gulp lint
gulp jscs

If submitting a Pull Request (PR) please do NOT include the minified /dist files.

Thank you.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.