mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -636,7 +636,7 @@
|
||||
url: "inject/"+this.id,
|
||||
type:"POST",
|
||||
success: function(resp) {
|
||||
RED.notify(node._("inject.success",{label:label}),{type:"success",id:"inject"});
|
||||
RED.notify(node._("inject.success",{label:label}),{type:"success",id:"inject", timeout: 2000});
|
||||
},
|
||||
error: function(jqXHR,textStatus,errorThrown) {
|
||||
if (jqXHR.status == 404) {
|
||||
|
@@ -129,9 +129,9 @@
|
||||
RED.history.push(historyEvent);
|
||||
RED.view.redraw();
|
||||
if (xhr.status == 200) {
|
||||
RED.notify(node._("debug.notification.activated",{label:label}),"success");
|
||||
RED.notify(node._("debug.notification.activated",{label:label}),{type: "success", timeout: 2000});
|
||||
} else if (xhr.status == 201) {
|
||||
RED.notify(node._("debug.notification.deactivated",{label:label}),"success");
|
||||
RED.notify(node._("debug.notification.deactivated",{label:label}),{type: "success", timeout: 2000});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -1,18 +1,18 @@
|
||||
[
|
||||
{
|
||||
"id": "2ebdd51e.c5d17a",
|
||||
"id": "b05816ab.7f2b08",
|
||||
"type": "comment",
|
||||
"z": "4b63452d.672afc",
|
||||
"name": "Convert array of JavaScript objects to CSV with column name header",
|
||||
"info": "CSV node can convert an array of JavaScript objects to multi-line CSV text with column name header at first line.",
|
||||
"x": 390,
|
||||
"y": 1200,
|
||||
"z": "c6ffdacd.d887e8",
|
||||
"name": "Specify column names in input message",
|
||||
"info": "Column names can be specified by `columns` property of incoming message.\n",
|
||||
"x": 240,
|
||||
"y": 200,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "2b4d538d.ada07c",
|
||||
"id": "39205b5c.690684",
|
||||
"type": "inject",
|
||||
"z": "4b63452d.672afc",
|
||||
"z": "c6ffdacd.d887e8",
|
||||
"name": "",
|
||||
"props": [
|
||||
{
|
||||
@@ -30,41 +30,41 @@
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 260,
|
||||
"y": 1260,
|
||||
"x": 200,
|
||||
"y": 260,
|
||||
"wires": [
|
||||
[
|
||||
"3e5c9e8.5065b62"
|
||||
"526b59ba.2fa068"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "db02c7be.0984e8",
|
||||
"id": "b78a407e.2d083",
|
||||
"type": "csv",
|
||||
"z": "4b63452d.672afc",
|
||||
"z": "c6ffdacd.d887e8",
|
||||
"name": "",
|
||||
"sep": ",",
|
||||
"hdrin": false,
|
||||
"hdrout": "all",
|
||||
"multi": "one",
|
||||
"ret": "\\n",
|
||||
"temp": "kind,price",
|
||||
"temp": "",
|
||||
"skip": "0",
|
||||
"strings": true,
|
||||
"include_empty_strings": "",
|
||||
"include_null_values": "",
|
||||
"x": 600,
|
||||
"y": 1260,
|
||||
"x": 750,
|
||||
"y": 260,
|
||||
"wires": [
|
||||
[
|
||||
"61f8b772.ddb1f8"
|
||||
"8b7084dd.986f68"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "3e5c9e8.5065b62",
|
||||
"id": "526b59ba.2fa068",
|
||||
"type": "template",
|
||||
"z": "4b63452d.672afc",
|
||||
"z": "c6ffdacd.d887e8",
|
||||
"name": "JS object",
|
||||
"field": "payload",
|
||||
"fieldType": "msg",
|
||||
@@ -72,18 +72,18 @@
|
||||
"syntax": "plain",
|
||||
"template": "[\n {\n \"kind\": \"Apple\",\n \"price\": 100,\n \"origin\": \"Canada\"\n },\n {\n \"kind\": \"Orange\",\n \"price\": 120,\n \"origin\": \"USA\"\n },\n {\n \"kind\": \"Banana\",\n \"price\": 80,\n \"origin\": \"Philippines\"\n }\n]",
|
||||
"output": "json",
|
||||
"x": 430,
|
||||
"y": 1260,
|
||||
"x": 370,
|
||||
"y": 260,
|
||||
"wires": [
|
||||
[
|
||||
"db02c7be.0984e8"
|
||||
"b204077a.227778"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "61f8b772.ddb1f8",
|
||||
"id": "8b7084dd.986f68",
|
||||
"type": "debug",
|
||||
"z": "4b63452d.672afc",
|
||||
"z": "c6ffdacd.d887e8",
|
||||
"name": "",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
@@ -92,8 +92,35 @@
|
||||
"complete": "false",
|
||||
"statusVal": "",
|
||||
"statusType": "auto",
|
||||
"x": 780,
|
||||
"y": 1260,
|
||||
"x": 930,
|
||||
"y": 260,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "b204077a.227778",
|
||||
"type": "change",
|
||||
"z": "c6ffdacd.d887e8",
|
||||
"name": "",
|
||||
"rules": [
|
||||
{
|
||||
"t": "set",
|
||||
"p": "columns",
|
||||
"pt": "msg",
|
||||
"to": "kind,price",
|
||||
"tot": "str"
|
||||
}
|
||||
],
|
||||
"action": "",
|
||||
"property": "",
|
||||
"from": "",
|
||||
"to": "",
|
||||
"reg": false,
|
||||
"x": 570,
|
||||
"y": 260,
|
||||
"wires": [
|
||||
[
|
||||
"b78a407e.2d083"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
@@ -21,9 +21,10 @@
|
||||
the body of the message.</p>
|
||||
<p>The function is expected to return a message object (or multiple message objects), but can choose
|
||||
to return nothing in order to halt a flow.</p>
|
||||
<p>The <b>Setup</b> tab contains code that will be run whenever the node is started.
|
||||
The <b>Close</b> tab contains code that will be run when the node is stopped.</p>
|
||||
<p>If an promise object is returned from the setup code, input message processing starts after its completion.</p>
|
||||
<p>The <b>On Start</b> tab contains code that will be run whenever the node is started.
|
||||
The <b>On Stop</b> tab contains code that will be run when the node is stopped.</p>
|
||||
<p>If the On Start code returns a Promise object, the node will not start handling messages
|
||||
until the promise is resolved.</p>
|
||||
<h3>Details</h3>
|
||||
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
|
||||
for more information on writing functions.</p>
|
||||
|
Reference in New Issue
Block a user