Upload files to "flows/pomp"
This commit is contained in:
59
flows/pomp/template.json.tpl
Normal file
59
flows/pomp/template.json.tpl
Normal file
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"id": "inject1",
|
||||
"type": "inject",
|
||||
"name": "Start – {{name}} v{{version}}",
|
||||
"props": [ { "p": "payload" } ],
|
||||
"repeat": "",
|
||||
"crontab": "",
|
||||
"once": false,
|
||||
"onceDelay": 0.1,
|
||||
"topic": "",
|
||||
"payload": "{{id}}",
|
||||
"payloadType": "str",
|
||||
"wires": [["function1"]],
|
||||
"version": 9
|
||||
},
|
||||
{
|
||||
"id": "function1",
|
||||
"type": "function",
|
||||
"name": "Verwerk asset data v{{version}}",
|
||||
"func": "msg.payload = { \"asset_id\": \"{{id}}\", \"asset_name\": \"{{name}}\", \"version\": {{version}}, \"timestamp\": Date.now() }; return msg;",
|
||||
"outputs": 1,
|
||||
"wires": [["change1","debug1","http1"]]
|
||||
},
|
||||
{
|
||||
"id": "change1",
|
||||
"type": "change",
|
||||
"name": "Voeg status toe v{{version}}",
|
||||
"rules": [ { "t": "set", "p": "payload.status", "pt": "msg", "to": "active", "tot": "str" } ],
|
||||
"wires": [["debug1"]]
|
||||
},
|
||||
{
|
||||
"id": "http1",
|
||||
"type": "http request",
|
||||
"name": "Stuur naar API v{{version}}",
|
||||
"method": "POST",
|
||||
"ret": "txt",
|
||||
"url": "http://localhost:3000/api/asset",
|
||||
"tls": "",
|
||||
"persist": false,
|
||||
"proxy": "",
|
||||
"authType": "",
|
||||
"wires": [["debug1"]]
|
||||
},
|
||||
{
|
||||
"id": "debug1",
|
||||
"type": "debug",
|
||||
"name": "Output debug v{{version}}",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "payload",
|
||||
"targetType": "msg",
|
||||
"statusVal": "",
|
||||
"statusType": "auto",
|
||||
"wires": []
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user