I’m pretty new to Textualize and yet I managed to put together a small application that can display the contents of the /var/log/suricata/eve.json file in different formats (table, JSON, etc.) using filters (SuricataLog); the framework is awesome.
Now to my issue: The files I’m trying to display can be quite large and I would love to provide some feedback about back to the user (as opposed of freezing for a few seconds only to display the contents on a scroll-able pane .
Here are my questions:
- It is better to re-create the table over and over as we get contents or I can add rows to it until I’m done? I don’t fully understand how the module can refresh while I send more rows in the background
- I also send JSON data back to the user. This one is trickier because I cannot render single JSON line but I need to keep appending contents, so the final render is a scroll-able JSON document, made of multiple JSON lines
For question #1 I think I may be able to do it by returning an empty table while I populate the contents with background thread, for question #2 no idea what type of container can do what I want in textualize.
Happy to discuss my code, you can see the class here: EveLogApp
Thanks in advance!,