Skip to content

Commit 9a13b13

Browse files
committed
Add edit-dialog page to creating nodes guide
1 parent 2f34189 commit 9a13b13

24 files changed

Lines changed: 2972 additions & 99 deletions

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

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;

css/editor-style.min.css

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/syntax.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.highlight .k { color: #66d9ef } /* Keyword */
66
.highlight .l { color: #ae81ff } /* Literal */
77
.highlight .n { color: #f8f8f2 } /* Name */
8-
.highlight .o { color: #f92672 } /* Operator */
8+
.highlight .o { color: #dc8f8f } /* Operator */
99
.highlight .p { color: #f8f8f2 } /* Punctuation */
1010
.highlight .cm { color: #afa98c } /* Comment.Multiline */
1111
.highlight .cp { color: #afa98c } /* Comment.Preproc */
@@ -15,7 +15,7 @@
1515
.highlight .gs { font-weight: bold } /* Generic.Strong */
1616
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
1717
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
18-
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
18+
.highlight .kn { color: #dc8f8f } /* Keyword.Namespace */
1919
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
2020
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
2121
.highlight .kt { color: #66d9ef } /* Keyword.Type */
@@ -34,9 +34,9 @@
3434
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
3535
.highlight .nx { color: #a6e22e } /* Name.Other */
3636
.highlight .py { color: #f8f8f2 } /* Name.Property */
37-
.highlight .nt { color: #f92672 } /* Name.Tag */
37+
.highlight .nt { color: #dc8f8f } /* Name.Tag */
3838
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
39-
.highlight .ow { color: #f92672 } /* Operator.Word */
39+
.highlight .ow { color: #dc8f8f } /* Operator.Word */
4040
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
4141
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
4242
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
@@ -61,5 +61,5 @@
6161

6262
.highlight .gh { } /* Generic Heading & Diff Header */
6363
.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
64-
.highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */
64+
.highlight .gd { color: #dc8f8f; } /* Generic.Deleted & Diff Deleted */
6565
.highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */

docs/api/admin/methods/index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ slug:
1111

1212
Endpoint | Description
1313
------------------------------------------------------------|-------------------------
14-
[<span>GET</span>/auth/login](get/auth/login) | Get the active authentication scheme
15-
[<span>POST</span>/auth/token](post/auth/token) | Exchange credentials for access token
16-
[<span>POST</span>/auth/revoke](post/auth/revoke) | Revoke an access token
17-
[<span>GET</span>/settings](get/settings) | Get the runtime settings
18-
[<span>GET</span>/flows](get/flows) | Get the active flow configuration
19-
[<span>POST</span>/flows](post/flows) | Set the active flow configuration
20-
[<span>POST</span>/flow](post/flow) | Add a flow to the active configuration
21-
[<span>GET</span>/flow/:id](get/flow) | Get an individual flow configuration
22-
[<span>PUT</span>/flow/:id](put/flow) | Update an individual flow configuration
23-
[<span>DELETE</span>/flow/:id](delete/flow) | Delete an individual flow configuration
24-
[<span>GET</span>/nodes](get/nodes) | Get a list of the installed nodes
25-
[<span>POST</span>/nodes](post/nodes) | Install a new node module
26-
[<span>GET</span>/nodes/:module](get/nodes/module) | Get a node module's information
27-
[<span>PUT</span>/nodes/:module](put/nodes/module) | Enable/Disable a node module
28-
[<span>DELETE</span>/nodes/:module](delete/nodes/module) | Remove a node module
29-
[<span>GET</span>/nodes/:module/:set](get/nodes/module/set) | Get a node module set information
30-
[<span>PUT</span>/nodes/:module/:set](put/nodes/module/set) | Enable/Disable a node set
14+
[<span class="method">GET</span>/auth/login](get/auth/login) | Get the active authentication scheme
15+
[<span class="method">POST</span>/auth/token](post/auth/token) | Exchange credentials for access token
16+
[<span class="method">POST</span>/auth/revoke](post/auth/revoke) | Revoke an access token
17+
[<span class="method">GET</span>/settings](get/settings) | Get the runtime settings
18+
[<span class="method">GET</span>/flows](get/flows) | Get the active flow configuration
19+
[<span class="method">POST</span>/flows](post/flows) | Set the active flow configuration
20+
[<span class="method">POST</span>/flow](post/flow) | Add a flow to the active configuration
21+
[<span class="method">GET</span>/flow/:id](get/flow) | Get an individual flow configuration
22+
[<span class="method">PUT</span>/flow/:id](put/flow) | Update an individual flow configuration
23+
[<span class="method">DELETE</span>/flow/:id](delete/flow) | Delete an individual flow configuration
24+
[<span class="method">GET</span>/nodes](get/nodes) | Get a list of the installed nodes
25+
[<span class="method">POST</span>/nodes](post/nodes) | Install a new node module
26+
[<span class="method">GET</span>/nodes/:module](get/nodes/module) | Get a node module's information
27+
[<span class="method">PUT</span>/nodes/:module](put/nodes/module) | Enable/Disable a node module
28+
[<span class="method">DELETE</span>/nodes/:module](delete/nodes/module) | Remove a node module
29+
[<span class="method">GET</span>/nodes/:module/:set](get/nodes/module/set) | Get a node module set information
30+
[<span class="method">PUT</span>/nodes/:module/:set](put/nodes/module/set) | Enable/Disable a node set

docs/creating-nodes/credentials.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,39 @@ flows are exported from the editor.
1212
To add credentials to a node, the following steps are taken:
1313

1414
1. Add a new `credentials` entry to the node's definition:
15-
16-
credentials: {
17-
username: {type:"text"},
18-
password: {type:"password"}
19-
},
20-
15+
```javascript
16+
credentials: {
17+
username: {type:"text"},
18+
password: {type:"password"}
19+
},
20+
```
2121
The entries take a single option - their `type` which can be either `text` or
2222
`password`.
2323

2424
2. Add suitable entries to the edit template for the node
25-
26-
<div class="form-row">
27-
<label for="node-input-username"><i class="icon-tag"></i> Username</label>
28-
<input type="text" id="node-input-username">
29-
</div>
30-
<div class="form-row">
31-
<label for="node-input-password"><i class="icon-tag"></i> Password</label>
32-
<input type="password" id="node-input-password">
33-
</div>
34-
25+
```html
26+
<div class="form-row">
27+
<label for="node-input-username"><i class="icon-tag"></i> Username</label>
28+
<input type="text" id="node-input-username">
29+
</div>
30+
<div class="form-row">
31+
<label for="node-input-password"><i class="icon-tag"></i> Password</label>
32+
<input type="password" id="node-input-password">
33+
</div>
34+
```
3535
Note that the template uses the same element `id` conventions as regular
3636
node properties.
3737

3838
3. In the node's `.js` file, the call to `RED.nodes.registerType` must be updated
3939
to include the credentials:
40-
41-
RED.nodes.registerType("my-node",MyNode,{
42-
credentials: {
43-
username: {type:"text"},
44-
password: {type:"password"}
45-
}
46-
});
40+
```javascript
41+
RED.nodes.registerType("my-node",MyNode,{
42+
credentials: {
43+
username: {type:"text"},
44+
password: {type:"password"}
45+
}
46+
});
47+
```
4748

4849
### Accessing credentials
4950

0 commit comments

Comments
 (0)