Compare commits
1 Commits
slice/41-m
...
slice/42-e
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b745dfb51 |
@@ -1,6 +1,70 @@
|
|||||||
[
|
[
|
||||||
{"id":"dashboardAPI_basic_tab","type":"tab","label":"dashboardAPI basic","disabled":false,"info":"dashboardAPI basic example"},
|
{
|
||||||
{"id":"dashboardAPI_basic_node","type":"dashboardapi","z":"dashboardAPI_basic_tab","name":"dashboardAPI basic","x":420,"y":180,"wires":[["dashboardAPI_basic_dbg"]]},
|
"id": "dashboardAPI_basic_tab",
|
||||||
{"id":"dashboardAPI_basic_inj","type":"inject","z":"dashboardAPI_basic_tab","name":"basic trigger","props":[{"p":"topic","vt":"str"},{"p":"payload","vt":"str"}],"topic":"ping","payload":"1","payloadType":"str","x":160,"y":180,"wires":[["dashboardAPI_basic_node"]]},
|
"type": "tab",
|
||||||
{"id":"dashboardAPI_basic_dbg","type":"debug","z":"dashboardAPI_basic_tab","name":"dashboardAPI basic debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":660,"y":180,"wires":[]}
|
"label": "dashboardAPI basic — measurement → Grafana",
|
||||||
|
"disabled": false,
|
||||||
|
"info": "Demonstrates the round-trip:\n- inject simulates a child.register message from a measurement node\n- dashboardapi composes a Grafana dashboard for that child\n- http request posts the dashboard to Grafana\n- debug shows the HTTP response\n\nConfigure the dashboardapi node with your Grafana host/port + bearer token\n(encrypted via Node-RED credentials). Default targets http://grafana:3000\nfrom inside the Docker compose stack."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "dashboardAPI_basic_node",
|
||||||
|
"type": "dashboardapi",
|
||||||
|
"z": "dashboardAPI_basic_tab",
|
||||||
|
"name": "dashboardAPI",
|
||||||
|
"protocol": "http",
|
||||||
|
"host": "grafana",
|
||||||
|
"port": 3000,
|
||||||
|
"folderUid": "",
|
||||||
|
"defaultBucket": "telemetry",
|
||||||
|
"x": 460,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [["dashboardAPI_basic_http"]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "dashboardAPI_basic_inj",
|
||||||
|
"type": "inject",
|
||||||
|
"z": "dashboardAPI_basic_tab",
|
||||||
|
"name": "simulate child.register (measurement)",
|
||||||
|
"props": [
|
||||||
|
{ "p": "topic", "vt": "str" },
|
||||||
|
{ "p": "payload", "v": "{\"config\":{\"general\":{\"id\":\"meas-demo-001\",\"name\":\"FT-001 demo\"},\"functionality\":{\"softwareType\":\"measurement\",\"positionVsParent\":\"downstream\"}}}", "vt": "json" }
|
||||||
|
],
|
||||||
|
"topic": "child.register",
|
||||||
|
"x": 180,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [["dashboardAPI_basic_node"]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "dashboardAPI_basic_http",
|
||||||
|
"type": "http request",
|
||||||
|
"z": "dashboardAPI_basic_tab",
|
||||||
|
"name": "POST /api/dashboards/db",
|
||||||
|
"method": "use",
|
||||||
|
"ret": "obj",
|
||||||
|
"paytoqs": "ignore",
|
||||||
|
"url": "",
|
||||||
|
"tls": "",
|
||||||
|
"persist": false,
|
||||||
|
"proxy": "",
|
||||||
|
"authType": "",
|
||||||
|
"senderr": false,
|
||||||
|
"x": 720,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [["dashboardAPI_basic_dbg"]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "dashboardAPI_basic_dbg",
|
||||||
|
"type": "debug",
|
||||||
|
"z": "dashboardAPI_basic_tab",
|
||||||
|
"name": "Grafana response",
|
||||||
|
"active": true,
|
||||||
|
"tosidebar": true,
|
||||||
|
"console": false,
|
||||||
|
"tostatus": false,
|
||||||
|
"complete": "payload",
|
||||||
|
"targetType": "msg",
|
||||||
|
"x": 960,
|
||||||
|
"y": 200,
|
||||||
|
"wires": []
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user