Skip to content

Commit 65cd2db

Browse files
authored
Merge pull request #160 from node-red/v110
Updates for Node-RED 1.1.0
2 parents cc786e4 + f4272d3 commit 65cd2db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3778
-180
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.DS_Store
22
_site
3+
.jekyll-cache
4+
Gemfile.lock

Gemfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6+
7+
# gem "rails"
8+
9+
gem "jekyll-paginate", "~> 1.1"
10+
11+
gem "jekyll-redirect-from", "~> 0.16.0"

_includes/toc-creating-nodes.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
<li {% if page.url == "/docs/creating-nodes/first-node" %}class="active"{% endif %}><a href="/docs/creating-nodes/first-node">Creating your first node</a></li>
77
<li {% if page.url == "/docs/creating-nodes/node-js" %}class="active"{% endif %}><a href="/docs/creating-nodes/node-js">JavaScript File</a></li>
88
<li {% if page.url == "/docs/creating-nodes/node-html" %}class="active"{% endif %}><a href="/docs/creating-nodes/node-html">HTML File</a></li>
9-
<li {% if page.url == "/docs/creating-nodes/context" %}class="active"{% endif %}><a href="/docs/creating-nodes/context">Storing Context</a></li>
9+
<li {% if page.url == "/docs/creating-nodes/packaging" %}class="active"{% endif %}><a href="/docs/creating-nodes/packaging">Packaging</a></li>
1010
<li {% if page.url == "/docs/creating-nodes/properties" %}class="active"{% endif %}><a href="/docs/creating-nodes/properties">Node properties</a></li>
1111
<li {% if page.url == "/docs/creating-nodes/credentials" %}class="active"{% endif %}><a href="/docs/creating-nodes/credentials">Node credentials</a></li>
1212
<li {% if page.url == "/docs/creating-nodes/appearance" %}class="active"{% endif %}><a href="/docs/creating-nodes/appearance">Node appearance</a></li>
13+
<li {% if page.url == "/docs/creating-nodes/edit-dialog" %}class="active"{% endif %}><a href="/docs/creating-nodes/edit-dialog">Node edit dialog</a></li>
14+
<li {% if page.url == "/docs/creating-nodes/context" %}class="active"{% endif %}><a href="/docs/creating-nodes/context">Storing Context</a></li>
1315
<li {% if page.url == "/docs/creating-nodes/status" %}class="active"{% endif %}><a href="/docs/creating-nodes/status">Node status</a></li>
1416
<li {% if page.url == "/docs/creating-nodes/config-nodes" %}class="active"{% endif %}><a href="/docs/creating-nodes/config-nodes">Configuration nodes</a></li>
1517
<li {% if page.url == "/docs/creating-nodes/help-style-guide" %}class="active"{% endif %}><a href="/docs/creating-nodes/help-style-guide">Help style guide</a></li>
1618
<li {% if page.url == "/docs/creating-nodes/examples" %}class="active"{% endif %}><a href="/docs/creating-nodes/examples">Adding examples</a></li>
17-
<li {% if page.url == "/docs/creating-nodes/packaging" %}class="active"{% endif %}><a href="/docs/creating-nodes/packaging">Packaging</a></li>
1819
<li {% if page.url == "/docs/creating-nodes/i18n" %}class="active"{% endif %}><a href="/docs/creating-nodes/i18n">Internationalisation</a></li>
1920
</ul>
2021
</li>

_includes/toc-editor-guide.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<li {% if page.url == "/docs/user-guide/editor/workspace/flows" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/flows" style="padding-left: 50px;">Flows</a></li>
88
<li {% if page.url == "/docs/user-guide/editor/workspace/nodes" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/nodes" style="padding-left: 50px;">Nodes</a></li>
99
<li {% if page.url == "/docs/user-guide/editor/workspace/wires" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/wires" style="padding-left: 50px;">Wires</a></li>
10+
<li {% if page.url == "/docs/user-guide/editor/workspace/groups" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/groups" style="padding-left: 50px;">Groups</a></li>
1011
<li {% if page.url == "/docs/user-guide/editor/workspace/subflows" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/subflows" style="padding-left: 50px;">Subflows</a></li>
1112
<li {% if page.url == "/docs/user-guide/editor/workspace/selection" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/selection" style="padding-left: 50px;">Selection</a></li>
1213
<li {% if page.url == "/docs/user-guide/editor/workspace/import-export" %}class="active"{% endif %}><a href="/docs/user-guide/editor/workspace/import-export" style="padding-left: 50px;">Import/Export</a></li>
@@ -15,6 +16,7 @@
1516
<li {% if page.url == "/docs/user-guide/editor/palette/manager" %}class="active"{% endif %}><a href="/docs/user-guide/editor/palette/manager" style="padding-left: 50px;">Palette Manager</a></li>
1617
<li {% if page.url == "/docs/user-guide/editor/sidebar/" %}class="active"{% endif %}><a href="/docs/user-guide/editor/sidebar">Sidebar</a></li>
1718
<li {% if page.url == "/docs/user-guide/editor/sidebar/info" %}class="active"{% endif %}><a href="/docs/user-guide/editor/sidebar/info" style="padding-left: 50px;">Information</a></li>
19+
<li {% if page.url == "/docs/user-guide/editor/sidebar/help" %}class="active"{% endif %}><a href="/docs/user-guide/editor/sidebar/help" style="padding-left: 50px;">Help</a></li>
1820
<li {% if page.url == "/docs/user-guide/editor/sidebar/debug" %}class="active"{% endif %}><a href="/docs/user-guide/editor/sidebar/debug" style="padding-left: 50px;">Debug</a></li>
1921
<li {% if page.url == "/docs/user-guide/editor/sidebar/config" %}class="active"{% endif %}><a href="/docs/user-guide/editor/sidebar/config" style="padding-left: 50px;">Config nodes</a></li>
2022
<li {% if page.url == "/docs/user-guide/editor/sidebar/context" %}class="active"{% endif %}><a href="/docs/user-guide/editor/sidebar/context" style="padding-left: 50px;">Context data</a></li>
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
---
2+
layout: blog
3+
title: Version 1.1 released
4+
author: nick
5+
---
6+
7+
Node-RED 1.1 is now available to [install](https://npmjs.org/package/node-red).
8+
9+
If upgrading, please read the [upgrade instructions](http://nodered.org/docs/getting-started/upgrading.html).
10+
11+
---
12+
13+
<iframe width="560" height="315" src="https://www.youtube.com/embed/FHP7qsaz7ZI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
14+
15+
---
16+
17+
18+
- [Editor Updates](#editor-updates)
19+
- [Information sidebar redesign](#information-sidebar-redesign)
20+
- [New Help sidebar](#new-help-sidebar)
21+
- [Grouping nodes](#grouping-nodes)
22+
- [Runtime features](#runtime-features)
23+
- [node-red-admin built-in](#node-red-admin-built-in)
24+
- [Overriding individual settings](#overriding-individual-settings)
25+
- [`httpAdminMiddleware` setting](#httpadminmiddleware-setting)
26+
- [Custom `adminAuth` token handling](#custom-adminauth-token-handling)
27+
- [Installing nodes from other locations](#installing-nodes-from-other-locations)
28+
- [Refreshing HTTPS certificates](#refreshing-https-certificates)
29+
- [Node updates](#node-updates)
30+
- [JSONata `$moment` support](#jsonata-moment-support)
31+
- [Inject node properties](#inject-node-properties)
32+
- [Function node lifecycle](#function-node-lifecycle)
33+
- [Debug node status](#debug-node-status)
34+
- [Trigger node](#trigger-node)
35+
36+
37+
38+
## Editor Updates
39+
40+
### Information sidebar redesign
41+
42+
The info sidebar now includes a tree-view of your flows - we call it the outliner.
43+
This gives another way to navigate your flows and quickly find things.
44+
45+
![](/blog/content/images/2020/06/info-sidebar.png){:width="40%"}
46+
47+
Each node has a button that takes you to it in the workspace, a button to
48+
enable/disable it and, in the case of the Inject and Debug nodes, a button to
49+
trigger their action. Double-clicking on a node will bring up its edit dialog.
50+
51+
[more...](/docs/user-guide/editor/sidebar/info)
52+
53+
### New Help sidebar
54+
55+
To make room for the outliner, the help section of the sidebar has now moved
56+
to its own sidebar tab. The added benefit of putting the help in its own tab
57+
is you can now browse all of the available help topics without having to select
58+
a node of the right type in the workspace.
59+
60+
It will also give us a space to add other help topics in the editor in the future.
61+
62+
[more...](/docs/user-guide/editor/sidebar/help)
63+
64+
### Grouping nodes
65+
66+
To help organise your flows you can now group your nodes in the editor.
67+
The group can have a custom border and background colour and an optional label.
68+
69+
![](/blog/content/images/2020/06/groups-one.gif)
70+
71+
Groups are added to the flow as a new type of node. As people start using them,
72+
it will make it harder to share flows with users who haven't yet upgraded.
73+
To help out, we've published [`node-red-node-group`](https://flows.nodered.org/node/node-red-node-group)
74+
which registers a `group` node type but does absolutely nothing. Installing this
75+
module will allow older versions of Node-RED to import flows that include a
76+
group - although they won't see the groups in the editor. And the module knows
77+
not to register itself when it isn't needed, so there's no issue upgrading to 1.1
78+
with it installed.
79+
80+
[more ...](/docs/user-guide/editor/workspace/groups)
81+
82+
## Runtime features
83+
84+
### node-red-admin built-in
85+
86+
The `node-red-admin` command-line tool has existed since the start of the project,
87+
but it isn't something widely known about or used. It can be used to remotely
88+
administer a Node-RED runtime.
89+
90+
To make it more useful, it is now integrated into the `node-red` command. You run it with:
91+
92+
```
93+
node-red admin
94+
```
95+
96+
One of the useful commands it provides is a way to hash passwords suitable for
97+
`adminAuth`. It prompts you for the password you want to use and it gives you
98+
back the hash you can paste into your settings file.
99+
100+
```
101+
$ node-red admin hash-pw
102+
Password:
103+
$2b$08$sjxLvq8MmycyWJpxPLyweuw/WlYt1MX56eG5Q5nlyxJs2fASGm2jm
104+
```
105+
106+
The other commands let you list what nodes are installed, enable/disable them,
107+
install new ones or remove old ones. You can also search the flow library.
108+
109+
[more...](/docs/getting-started/local#command-line-usage)
110+
111+
### Overriding individual settings
112+
113+
The `node-red` command now supports the `-D` option to override individual settings.
114+
For example, to temporarily run with a different level of logging you can use:
115+
116+
```
117+
node-red -D logging.console.level=trace
118+
```
119+
120+
[more...](/docs/getting-started/local#override-individual-settings)
121+
122+
123+
### `httpAdminMiddleware` setting
124+
125+
We've had the `httpNodeMiddleware` option for a while now - allowing a custom
126+
middleware to be added to the HTTP In node routes. This release adds
127+
`httpAdminMiddleware` that does the same thing for all of the admin routes,
128+
which includes the editor itself. This can be used, for example, to add custom
129+
http headers to all admin requests. Not something most end users need, but has
130+
been a requirement from those who embed the editor into their own applications.
131+
132+
[more...](/docs/user-guide/runtime/securing-node-red#custom-middleware)
133+
134+
### Custom `adminAuth` token handling
135+
136+
`adminAuth` now supports a custom `tokens` function that can be used to validate any auth token passed to the admin api. This opens up some more flexible options to integrate Node-RED admin security with other authentication systems.
137+
138+
[more...](/docs/user-guide/runtime/securing-node-red#custom-authentication-tokens)
139+
140+
### Installing nodes from other locations
141+
142+
The admin api for installing new nodes has been extended to support a 'url'
143+
parameter - which should be a full url to a `tgz` containing the node to install.
144+
145+
This hasn't been written up in the docs yet, but for now, you can read the original
146+
[design note](https://github.com/node-red/designs/tree/master/designs/node-installation)
147+
148+
### Refreshing HTTPS certificates
149+
150+
The runtime can now be configured to periodically refresh its https certificates.
151+
This feature requires Node.js 12 or later.
152+
153+
The default [settings file has been updated](https://github.com/node-red/node-red/blob/c048b1a25b36040f169f443701b9a0dde2f57914/packages/node_modules/node-red/settings.js#L139-L171) with examples for how to configure this.
154+
155+
[more...](/docs/user-guide/runtime/securing-node-red#refreshing-https-certificates)
156+
157+
## Node updates
158+
159+
### JSONata `$moment` support
160+
161+
We've added support for the Moment date/time library within JSONata expressions via the `$moment` function.
162+
163+
This adds some long needed timezone awareness into the core of Node-RED. For example, you can get the current time in Auckland with the expression:
164+
165+
```
166+
$moment().tz("Pacific/Auckland")
167+
```
168+
169+
If you wanted to get the time 2 hours from now, you can do:
170+
171+
```
172+
$moment().add(2, "hours")
173+
```
174+
175+
It can also do a much better job of parsing dates:
176+
177+
```
178+
$moment($.payload, "YYYY-MM-DD")
179+
```
180+
181+
We're considering making the Moment library available as a default built-in of the Function node as well, but that will
182+
be a future release.
183+
184+
### Inject node properties
185+
186+
The Inject node can now set any properties on the message it sends - you aren't limited to just `topic` and `payload`.
187+
188+
![](/blog/content/images/2020/06/inject-props.png)
189+
190+
### Function node lifecycle
191+
192+
The Function node now lets you provide code that should be run when the node is
193+
deployed and when it is being stopped. This lets you initialise any state in the
194+
node before it starts handling any messages. Note that each piece of code is in
195+
a separate scope - you cannot declare variables in one and access them in the others.
196+
You need to use `context` to pass things between them.
197+
198+
The main Function has also been made a proper async Function so you can use `await` at the top level, if that's your sort of thing.
199+
200+
![](/blog/content/images/2020/06/func-lifecycle.png)
201+
202+
### Debug node status
203+
204+
The Debug node can now set its status message independently of what it passes
205+
to the Debug sidebar. Useful if you want to Debug a shorter summary to status,
206+
whilst showing more complete information in the sidebar where there is more space.
207+
208+
Whilst talking about the Debug node, we've added a number of actions in the editor
209+
to help activate/deactive lots of nodes in one go.
210+
211+
You can searching for them in the Action List (`Ctrl/Cmd-Shift-P` or `View -> Action List`)
212+
and you can assign keyboard shortcuts to them:
213+
214+
- `core:activate-selected-debug-nodes`
215+
- `core:activate-all-debug-nodes`
216+
- `core:activate-all-flow-debug-nodes`
217+
- `core:deactivate-selected-debug-nodes`
218+
- `core:deactivate-all-debug-nodes`
219+
- `core:deactivate-all-flow-debug-nodes`
220+
221+
222+
### Trigger node
223+
224+
The Trigger node can now optionally send its 'second message' on a separate output.
225+
226+
If you want it to handle separate streams of messages, you are no longer tied
227+
to using `msg.topic` to identify the streams - you can use any message property.
228+
229+
230+
231+
232+
233+
18.9 KB
Loading
701 KB
Loading
65.9 KB
Loading
6.04 KB
Loading

css/docs.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ div.figure p.caption {
254254
font-style: italic;
255255
color: #999;
256256
}
257-
257+
div.figure pre {
258+
margin-bottom: 0px
259+
}
258260
table.action-ref {
259261
width: auto;
260262
min-width: 310px;
@@ -362,7 +364,7 @@ td {
362364
padding: 6px 5px;
363365
border-bottom: 1px solid #F4DEDE;
364366
}
365-
td:first-child span {
367+
td:first-child span.method {
366368
font-family: "Ubuntu Mono";
367369
font-size: 0.9em;
368370
background: #F4DEDE;

0 commit comments

Comments
 (0)