Skip to content

Dashboard 1.0 Migration Guide

Why Migrate?

The original Node-RED Dashboard is no longer being actively developed, with the following note on the GH repository:

This project is based on Angular v1 - As that is now no longer maintained, this project should be considered to be on "life support". Small patches will be applied on a best can do basis, but there will be no major feature upgrades, and underlying security breakage may occur.

This guide is intended to help users migrate from the original Dashboard (1.0) to this new project, Dashboard 2.0.

We have, where possible, replicated functionality from Dashboard 1.0, and in some cases, improved upon it. If there are any features you feel are missing, please raise an issue on the GitHub repository

Where to start

Whilst we spent a lot of time trying to work out how we could make Dashboard 2.0 backward compatible with Dashboard 1.0, unfortunately, we've just been unable to accomplish that. As such, re-building Dashboards in Dashboard 2.0 is (currently) a manual process.

Installing

You can get started by installing the Dashboard 2.0 module through Node-RED's palette manager - search @flowfuse/node-red-dashboard.

Dashboard 2.0 will work alongside Dashboard 1.0, so you can start building your new Dashboard in parallel with your existing one, with the new Dashboard being available at http://<node-red-host>:<node-red-port>/dashboard.

Migration Script

It is worth noting that we do have plans to write some migrations scripts, that will take in a flow.json containing Dashboard 1.0 nodes, and output a flow.json containing Dashboard 2.0 nodes. However, this is not yet available, and will unlikely conduct a perfect 100% migration. Any thoughts, opinions and feedback on this idea are very welcome on the GitHub issue.

Dashboard 1.0 Nodes

The following details a direct comparison of all properties available on each node in Dashboard 1.0, and what changes have been made, if any, in Dashboard 2.0.

ui_audio

This node has not yet been migrated to Dashboard 2.0

You can track progress, and input thoughts and ideas on this here: Widget: Audio #52

ui_button

Button

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
labelno changesnull
groupno changesnull
sizeno changesnull
iconnot yet supportedIssue #322
tooltipnot yet supportedIssue #374
colornot yet supportedIssue #375
backgroundnot yet supportedIssue #375
payloadno changesnull
topicno changesnull
emulate clicknot yet supportedIssue #209
classno changesnull

Dynamic Properties

The following are Dashboard 1.0 msg.<property> values that could be sent to the node to affect functionality & contents of the node.

PropertyStatusNotes
labelnot yet supportedIssue #376
iconnot yet supportedIssue #376
enabled/disablednot yet supportedIssue #352
visible/hiddennot yet supportedIssue #377

ui_chart

Chart stuff

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
classno changesnull
typepartly supportedLine and Bar (V) are already migrated. There is still work to be done to support Bar (H), Pie, Polar and Radar charts. Scatter plots have also been added.
legendno changesnull
cutoutimprovedWe now support both the 'size' and 'shape' of dots in a Scatter and Line chart.
interpolatenot yet supportedIssue #384
x-axis limitno changesnull
x-axis labelnot yet supportedIssue #382
y-axis min/maxno changesnull
colorsno changesnull
blank labelnot yet supportedIssue #383

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
x-axis type'Time', 'Linear' or 'Categorical' are available depending on the Chart Type.
seriesAllows customisation of the msg property, or nested json key that defines which 'series' a given datapoint belongs to.

In Dashboard 1.0, this was always msg.topic.
x-propertyWhen providing objects or arrays of data into a chart, this property can be used to define which key in the data should be used to populate the x-axis. For example, with the following data point:
{date: '2023-10-30', value: 6}
setting this property to date would set the x value to 2023-10-30.
y-propertyWhen providing objects or arrays of data into a chart, this property can be used to define which key in the data should be used to populate the y-axis. For example, with the following data point:
{date: '2023-10-30', value: 6}
setting this property to value would set the y value to 6.

Injecting Data

There is a significant crossover between Dashboard 1.0 and 2.0 in how you can inject data into a chart, but some important, and notable differences that utilises the new series and property options available.

Injecting raw data can be done with:

  • msg.payload = <value>
    • In this case, the value received by the chart will be used as a y value, and the x value will be automatically added as the current date/time.
  • msg.payload = { y: <value> }
    • In this case, the y value will be used as defined, and the x value will be calculated as the current date/time.
  • msg.payload = { x: <value>, y: <value> }
    • In this case, the x and y values will be used as the x and y values of the data point.
  • msg.payload = [{ x: <value>, y: <value> }, { x: <value>, y: <value> }]
    • In this case, multiple points will be plotted into a single line.
  • msg.payload = [{ x: <value>, y: <value>, line: <value> }, { x: <value>, y: <value>, line: <value> }]
    • In this case, multiple points will be plotted, and if the series property is set to property:line then the line property will be used to determine which line each data point should be plotted on.

When wanting to separate data into multiple series in Dashboard 1.0, you had to define an appropriate msg.topic. This is now a configurable option in Dashboard 2.0, with the default value as per Dashboard 1.0. This means, that if you want to inject multiple data points, you could now send:

js
msg.payload = [{
    "category": "cat-1",
    "value": 2,
    "date": "2023-10-23"
}, {
    "category": "cat-2",
    "value": 3,
    "date": "2023-10-23"
}, {
    "category": "cat-1",
    "value": 1,
    "date": "2023-10-24"
}, {
    "category": "cat-2",
    "value": 6,
    "date": "2023-10-24"
}]

Where the series property of this chart could be set to key:category.

Charts now store data on a message-by-message bassis for clearer auditing, and so do not store as per Dashboard 1.0. This means that the format:

[{
    "series": ["A", "B"],
    "data": [
        [
            { "x": 1504029632890, "y": 5 },
            { "x": 1504029636001, "y": 4 },
            { "x": 1504029638656, "y": 2 }
        ],
        [
            { "x": 1504029633514, "y": 6 },
            { "x": 1504029636622, "y": 7 },
            { "x": 1504029639539, "y": 6 }
        ]
    ],
    "labels": [""]
}]

is currently not supported. If this is of particular importance, please do voice your support here.

ui_colour_picker

Whilst there is currently not an explicit ui_colour_picker widget, the ui_text_input widget can be used to achieve the same result, by setting "type" to "color"

ui_control

Send events to Dashboard in order to show/hide content, disable/enable content and navigate between pages

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
eventsno changesAll events supported except for the group open/close events. Track #406 progress here.

Controls List

All Dashboard 1.0 controls are supported in Dashboard 2.0, with the exception of the open/close control for a group, which is currently not supported.

You can see detailed documentation of the available controls, and emitted events here.

ui_date_picker

Whilst there is currently not an explicit ui_date_picker widget, the ui_text_input widget can be used to achieve the same result, by setting "type" to "date", "time", "week" or "month".

There has also been a request for a Time/Date Range component, which is in the plans.

ui_dropdown

Dropdown

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
labelno changesnull
tooltipnot yet supportedIssue #385
placeholdernot yet supportedIssue #386
optionsno changesnull
multiselectno changesnull
passthruno changesnull
topicno changesnull
classno changesnull

Dynamic Properties

The following are Dashboard 1.0 msg.<property> values that could be sent to the node to affect functionality & contents of the node.

PropertyStatusNotes
msg.payloadno changesAllows for dynamic selection of an option (docs)
msg.optionsno changesAllows for dynamic definition of an option (docs)

ui_form

Form stuff

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
labelno changesnull
classno changesnull
elementsno changesnull
submit textno changesnull
clear textno changesnull
two-columnsno changesnull
topicno changesnull

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
resetOn 'submit', this property defines whether or not the form clears it's data in the Dashboard.

Dynamic Properties

The following are Dashboard 1.0 msg.<property> values that could be sent to the node to affect functionality & contents of the node.

PropertyStatusNotes
msg.propertiesnot yet supportedIssue #287
msg.payloadnot yet supportedIssue #363

ui_gauge

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
titleno changesnull
gtypepartly supportedHalf Gauges and 3/4 Gauages are supported, currently no support for 'Compass', 'Levels' and 'Donut'
labelno changesChanged to 'units'
formatno plan to supportReplaced with 'prefix' and 'suffix' options
seg1no plan to supportReplaced with more flexible segments systems
seg2no plan to supportReplaced with more flexible segments systems
colorsno plan to supportReplaced with more flexible segments systems
diffno plan to support
classno changesnull

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
gstyleAllows for control over whether the arc is rounded or a 'needle' style
prefixText shown before the value in the center of the gauge
suffixText shown after the value in the center of the gauge
segmentsArray of objects that define the segments of the gauge
iconIcon displayed beneath the gauge (from MDI)

This node has not yet been migrated to Dashboard 2.0

You can track progress of this development effort here: Issue #387

ui_numeric

Whilst this widget has no explicitely been transferred into Dashboard 2.0, the functionality is still available in the ui-text-input widget, where you can select the "type" to be "number".

You can track progress of this development effort here: Issue #41

ui_slider

Slider stuff

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
labelno changesnull
classno changesnull
tooltipnot yet supportedIssue #388
rangeno changesnull
outputno changesnull
passthruno changesnull
topicno changesnull

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
show thumbDefines whether the tooltip/thumb is shown on the slider when value is changed.

ui_switch

Switch stuff

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
labelno changesnull
classno changesnull
tooltipnot yet supportedIssue #389
iconno changesnull
off iconno changesnull
off icon colorno changesnull
on iconno changesnull
on icon colorno changesnull
passthruno changesnull
'on' payloadno changesnull
'off' payloadno changesnull
topicno changesnull

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
show thumbDefines whether the tooltip/thumb is shown on the slider when value is changed.

ui_template

We have big plans in the short term for further improvements to `ui-template`. This is mostly focussed on the ability to inject full Vue component behaviour, two-way binding, and third-party JS library injection.

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
typemodified'Widget in Group' is still the default, but we have (temporarily) removed the <head> injection, and replaced it with two options for injecting CSS, one scoped to all pages, and another scoped to a single page
sizeno changesnull
classno changesnull
templatemodifiedThere is no longer support for Angular-based templates.

Instead, templates should be written using VueJS. Vuetify components are also supported natively, providing a rich ecosystem of available widgets.
passthrunot yet supportedIssue #354
reload on refreshmodifiedDefault behaviour is that, if there is a known state, it will atomatically be restored.
store outputmodifiedIf using the new in-buil;d 'send' function from within a template, this will store the output of the send function in the nodes state.

ui_text

Text Stuff

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
classno changesnull
formatnot yet supportedIssue #390
layoutno changesnull
apply styleno changesnull
fontno changesnull
text sizeno changesnull
text colorno changesnull

ui_text_input

Text Stuff

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
groupno changesnull
sizeno changesnull
labelno changesnull
classno changesnull
tooltipnot yet supportedIssue #393
modeno changesMulti-line text input option also added
delayno changesnull
passthruno changesnull
send on blurno changesnull
payloadno plan to supportnull
topicno changesnull

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
send on delayThis will overrides the 'delay' setting, and provides explcit control over when the message is sent.
send on enterThis will send a message when the user presses in the text input.

ui_toast

'UI Tast' has been renamed to 'UI Notification' in Dashboard 2.0, but most of the functionality is identical.'

Property Migration Status

The following table lists the Dashboard 1.0 properties, and details any changes, or whether that property has not yet been migrated, into Dashboard 2.0.

PropertyStatusNotes
nameno changesnull
positionno changesnull
classno changesnull
timeoutno changesAs countdown timer will also now show as part of the top border of the notification.
highlightcolorInstead of now just defining a single 'border' colour, the 'highlight' is used on the left-side of the notification'
raw injectionno changesPermits the injection fo raw HTML and JS content into the widgets.
topicno changesnull

New Properties

The following details newly implemented properties and features in Dashboard 2.0 for this node.

PropertyNotes
allow manualDefines whether the notification can be manually dismissed, or not.
show countdownWhen a timer is provided, if this is trye, it will show a decreasing coloured bar across the top of the Dashboard's modal.

Theming

We have tried to make theming in Dashboard 2.0 more low-code friendly, by providing a number of exposed properties, and a wrapping ui-theme config node which is assigned at the ui-page level.

Example of editing a themeExample of the properties exposed in the Node-RED Editor when defining a theme

We have plans to extend this themeing configuration further, such that you can also define grid spacing, fonts, etc.

Any further customisation of the overall layout and theme of the Dashboard will require custom CSS, which can be injected via the ui_template node.

Layouts

Dashboard 2.0 follows a similar architecture to Dashboard 1.0 for managing hierarchy in the UI. The differences can be seen if we compare them side-by-side:

Dashboard 1.0Dashboard 2.0Difference
ui-baseui-baseWe've exposed this as a config node in Dashboard 2.0, where a ui-page is assigned a parent ui-base. Whilst not yet supported, eventually, we wish to support multiple base Dashboards in the same Node-RED instance.
ui-tabui-pageIn addition to a renaming here, we've also added support for a ui-page to have a defined "Theme" (driven by our new ui-theme config nodes). Each ui-page also has a new "Layout" option, which can be set on a page-by-page basis.
ui-groupui-groupCurrently no "collapse" behaviour, but other functionality is the same.

We currently have three layouts available in Dashboard 2.0:

  • Grid - Modelled with CSS's grid layout, this is the default layout, and uses a fixed 12 column approach, whereby content will scale horiztonally with screen width, making it far more friendly for responsive layouts.
  • Fixed - This uses a CSS Flex Layout and is the most similar we currently have to the only layout in Dashboard 1.0. Improvements are required here to improve the "packing" nature of the layout though.
  • Notebook - Mimicking a Jupyter Notebook layout, this provides content with a maxiimum width, scales with mobile devices, and allows for content to be stacked vertically.

We also have future plans to support injection of third-party layouts, and even client-side editable layouts (e.g. drag-and-drop layout design).

Third-Party Widgets

Any addons that were built for Dashboard 1.0 (e.g. ui-svg, ui-worldmap) are not supported in Dashboard 2.0.

We do need community contributions to re-build them the "Dashboard 2.0 way". If you're interested in helping us with this exercise, we have a guide on how to build custom widgets to help you get started.