Hey there,
I have not found any info about this topic so far.
For the current project I am heavily relying on context data to store and process (flow and global context data stored in RAM and file storage).
Up until now I used the Node RED dashboard to display the data.
But as the project became more and more complex I needed more flexibility for the GUI.
That's why I switched to uibuilder recently.
Forgive my ignorance in this regard, I am not a web dev. by any means.
I am looking for a way to access my context data from within Node-RED directly and use it in uibuilder. Sending all context data continuously to uibuilder via messages is what I'd like to avert.
in the Node-RED dashboard you have a node for each button, text field, display and so on. In uibuilder you'd have hundreds of msg objects to be received and parsed by the single uibuilder node.
Not sure if I am on the wrong track here, but could I somehow access a variable somehow like I am able to do in the function node? I mean by using something like flow.set() or flow.get(), or global.get()?
As far as I understand the Node-RED is all based on node.js and the data must be stored somewhere. So why not read the data directly but use cumbersome messages for everything? I am fine with the flow system when it comes to the general structure and build. But I like to keep it simple and use a lot of function nodes to process data in objects and structures at once instead of consecutively.
Is this the way to go?
Honestly I don't know, it's just the way I am used to program (I have a background in c/c++ and plc programming).
Let's use a very simple example here (this is just a very small part of my context data):
[
{"number":4751,"creation_time":1600700057133,"positions":
[
{"lid_type":1,"body_type":1},
{"lid_type":2,"body_type":2},
{"lid_type":3,"body_type":3},
{"lid_type":1,"body_type":3},
{"lid_type":3,"body_type":1}
],"start_time":"","finish_time":"","qa_passed":false,"state":"new"},
{"number":4752,"creation_time":1600700059531,"positions":
[
{"lid_type":1,"body_type":1},
{"lid_type":3,"body_type":1}
],"start_time":"","finish_time":"","qa_passed":false,"state":"new"},
{"number":4753,"creation_time":1600703634559,"positions":
[
{"lid_type":1,"body_type":1},
{"lid_type":3,"body_type":1}
],"start_time":"","finish_time":"","qa_passed":false,"state":"new"},
{"number":4754,"creation_time":1600703671892,"positions":
[
{"lid_type":1,"body_type":1},
{"lid_type":3,"body_type":1}
],"start_time":"","finish_time":"","qa_passed":false,"state":"new"},
{"number":4755,"creation_time":1600890617062,"positions":
[
{"lid_type":1,"body_type":1},
{"lid_type":3,"body_type":1}
],"start_time":"","finish_time":"","qa_passed":false,"state":"new"}
]
Let's say I want to display all the information in a table and only 3 values in this array of objects change.
The ideal way would be to update the related table cells only, not sending the whole array over and over again with every change. I am looking into the tabulator tables front-end library right now. It enables me to only update changed values. But somehow I need to give tabulator access to this data to let it examine it.
Would I really need to send ALL data continuously to the uibuilder node, let tabulator examine the data and in the worst case update a single cell, or even nothing at all and trough the rest into the void?
Web development with all the different html, css, js, php files, virtual dom, dom and so on is something I am still trying to get my head around. What framework or front-end libs to use, how to access data, process it and send it here, or there... still learing this stuff. Right now I just what to display lots of data compact and well-arranged. The dashboard is just not doing it for me.
Maybe you guys can somehow point me at the right direction..
Maybe you'll even tell me to use a database instead
Thanks and cheers
newbow
PS: I am not sure if my text is properly conveying the my weird train of thoughts. I hope it somehow makes sense