It's a call to a db.
[
{
"id": "5c9a8bc72c31fb9b",
"type": "mysql",
"z": "6151ad3d1b9f5d2b",
"mydb": "e15aca1763c788ca",
"name": "",
"x": 1290,
"y": 80,
"wires": [
[
"b50966c9f3402ebb"
]
]
},
{
"id": "781c6dcce21d66c0",
"type": "ui_dropdown",
"z": "6151ad3d1b9f5d2b",
"name": "",
"label": "Device",
"tooltip": "",
"place": "Select option",
"group": "f5110ba5bc3bd478",
"order": 1,
"width": 12,
"height": 1,
"passthru": false,
"multiple": false,
"options": [
{
"label": "",
"value": "",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1620,
"y": 80,
"wires": [
[
"1e4a3d0df17758a9"
]
]
},
{
"id": "b50966c9f3402ebb",
"type": "change",
"z": "6151ad3d1b9f5d2b",
"name": "",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$.payload.device",
"tot": "jsonata"
},
{
"t": "delete",
"p": "payload",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1440,
"y": 80,
"wires": [
[
"781c6dcce21d66c0"
]
]
},
{
"id": "0672735324f36a3a",
"type": "mysql",
"z": "6151ad3d1b9f5d2b",
"mydb": "e15aca1763c788ca",
"name": "",
"x": 1290,
"y": 180,
"wires": [
[
"3ab056e3333b020d"
]
]
},
{
"id": "a6ed8e2b4f54998e",
"type": "ui_dropdown",
"z": "6151ad3d1b9f5d2b",
"name": "",
"label": "Application",
"tooltip": "",
"place": "Select option",
"group": "e9693e324fca96f2",
"order": 1,
"width": 12,
"height": 1,
"passthru": false,
"multiple": false,
"options": [
{
"label": "",
"value": "",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1630,
"y": 180,
"wires": [
[
"f5cbc76a106f2eac"
]
]
},
{
"id": "3ab056e3333b020d",
"type": "change",
"z": "6151ad3d1b9f5d2b",
"name": "",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$.payload.application",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1440,
"y": 180,
"wires": [
[
"a6ed8e2b4f54998e"
]
]
},
{
"id": "fe83e3bd0a40a1c1",
"type": "mysql",
"z": "6151ad3d1b9f5d2b",
"mydb": "e15aca1763c788ca",
"name": "",
"x": 1290,
"y": 280,
"wires": [
[
"87b661f1951127a8"
]
]
},
{
"id": "c233f2bf99bad8f0",
"type": "ui_dropdown",
"z": "6151ad3d1b9f5d2b",
"name": "",
"label": "Gateway",
"tooltip": "",
"place": "Select option",
"group": "4aed5d542edfe9c6",
"order": 1,
"width": 12,
"height": 1,
"passthru": false,
"multiple": false,
"options": [
{
"label": "",
"value": "",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1620,
"y": 280,
"wires": [
[
"0b69920c10efdeed"
]
]
},
{
"id": "87b661f1951127a8",
"type": "change",
"z": "6151ad3d1b9f5d2b",
"name": "",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$.payload.ttngateway",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1440,
"y": 280,
"wires": [
[
"c233f2bf99bad8f0"
]
]
},
{
"id": "1e4a3d0df17758a9",
"type": "change",
"z": "6151ad3d1b9f5d2b",
"name": "",
"rules": [
{
"t": "set",
"p": "device",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1780,
"y": 80,
"wires": [
[]
]
},
{
"id": "f5cbc76a106f2eac",
"type": "change",
"z": "6151ad3d1b9f5d2b",
"name": "",
"rules": [
{
"t": "set",
"p": "application",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1810,
"y": 180,
"wires": [
[]
]
},
{
"id": "0b69920c10efdeed",
"type": "change",
"z": "6151ad3d1b9f5d2b",
"name": "",
"rules": [
{
"t": "set",
"p": "ttngateway",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1790,
"y": 280,
"wires": [
[]
]
},
{
"id": "4e05824c8e10af76",
"type": "comment",
"z": "6151ad3d1b9f5d2b",
"name": "Dashboard - Device",
"info": "",
"x": 1330,
"y": 40,
"wires": []
},
{
"id": "fbf648ed3bc62f38",
"type": "comment",
"z": "6151ad3d1b9f5d2b",
"name": "Dashboard - Application",
"info": "",
"x": 1340,
"y": 140,
"wires": []
},
{
"id": "343d3d97510588b0",
"type": "comment",
"z": "6151ad3d1b9f5d2b",
"name": "Dashboard - Gateway",
"info": "",
"x": 1340,
"y": 240,
"wires": []
},
{
"id": "48b18d4fa64343b5",
"type": "function",
"z": "6151ad3d1b9f5d2b",
"name": "",
"func": "flow.set('db', msg.payload)\n\n\nmsg1 = {topic :\"SELECT device FROM tdevice;\"}\n\nmsg2 = {topic :\"SELECT application FROM tapplication;\"}\n\nmsg3 = {topic :\"SELECT ttngateway FROM ttngateway;\"}\n\n\n\nreturn [msg1, msg2, msg3];",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1120,
"y": 180,
"wires": [
[
"5c9a8bc72c31fb9b"
],
[
"0672735324f36a3a"
],
[
"fe83e3bd0a40a1c1"
]
]
},
{
"id": "e15aca1763c788ca",
"type": "MySQLdatabase",
"name": "",
"host": "dbsoiot.civilwbkm1wy.eu-west-1.rds.amazonaws.com",
"port": "3306",
"db": "soiot",
"tz": "",
"charset": "UTF8"
},
{
"id": "f5110ba5bc3bd478",
"type": "ui_group",
"name": "Device",
"tab": "2a4dc6a148102b1a",
"order": 1,
"disp": true,
"width": "12",
"collapse": false,
"className": ""
},
{
"id": "e9693e324fca96f2",
"type": "ui_group",
"name": "Application;",
"tab": "2a4dc6a148102b1a",
"order": 2,
"disp": true,
"width": "12",
"collapse": false,
"className": ""
},
{
"id": "4aed5d542edfe9c6",
"type": "ui_group",
"name": "Gateway",
"tab": "2a4dc6a148102b1a",
"order": 3,
"disp": true,
"width": "12",
"collapse": false,
"className": ""
},
{
"id": "2a4dc6a148102b1a",
"type": "ui_tab",
"name": "Node Map",
"icon": "dashboard",
"order": 5,
"disabled": false,
"hidden": false
}
]