A Polymer based Dashboard UI for Node-RED
A Polymer based dashboard UI for Node-RED
This is very similar to node-red-dashboard.
In fact it’s a fully rewritten fork of Andrei Tatars original
node-red-contrib-ui.
This project is in an early development stage, see the issue tracker to get an idea of the roadmap.
Until now I’m only implementing what I want for myself, e.g. I’m only using it on my phone in portait mode,
so there is no multi-column layout yet… Several Widgets known from node-red-dashboard aren’t implemented,
e.g. Audio, Chart and Form. Also there is almost no documentation done until now…
As usual do npm install node-red-contrib-polymer
. Default URL of the Dashboard is thenhttp://<node-red-host>:<node-red-port>/polymer
.
There are some validations, checks and convenience things missing until now, so you need to make sure that you create a
Site Node, a Page Node and a Group Node. The Group needs to have the Page as parent, the Page needs to have the Site as
parent. Then you can add elements with the Group as parent.
Sites and Pages need to have an unique URL-safe name.
You can add or remove classes by simply sending a msg.payload
containing an Attribute addClass
or removeClass
. You
can add/remove multiple classes by just seperating them with spaces.
Example msg.payload
:
{"addClass": "blue bold", "removeClass": "foo"}
will add the classes “blue” and “bold” and remove the class “foo”
Example msg.payload
:
{"style": {"display": "none"}}
You can directly set any attribute of any node. For boolean attributes use an empty string to set them and null
to
remove them.
Example msg.payload
:
{
"label": "new label!",
"raised": "",
"disabled": null,
"style": {"background-color": "red", "font-weight": "bold"},
"addClass": "foo"
}
This will change the attribute label to “new label!”, add the attribute raised
, remove the attribute disabled
, sets
the background-color to red, the font-weight to bold and add the class foo
- all with one single message.
node-red-contrib-polymer uses the Font Awesome Icons. Just type in the name of an icon
into the icon option.
Until now Icons can be used in the Page and Button Widgets.
Pull requests welcome!
Please post feature requests, bug reports, suggestions and critics in the Github issue tracker.
For Development you need to bower install
and npm install
in the src directory.
If the dist
folder does not exist node-red will server form the src
folder. Mind that this can possibly lead to
reduced performance. To create a build in the dist
folder use the Gulp task “default”.
MIT
Copyright (c) 2017 Sebastian Raff
Copyright (c) 2015 Andrei Tatar