Skip to contentSkip to conversation

WebKnotty UI concept test from browser

DISCUSSION Svein Seldal 1 participant 1 message Oct 9, 2022

lore
Share & tools
lore
#0 lore raw

Hi

This is my first post to this mail list, so please forgive me if this is out of norm.

I love the knotty UI, with the progress and the churning of the individual tasks. However I'm often running bitbake in a tty-less context under a build management system and one doesn't get the nice pulse of ongoing activities. What if bitbake could export in real-time its knotty-like progress to a web page?

This weekend I hacked together a concept test of exporting the bitbake events over WebSocket to a crude react web application with the purpose of creating an output in a web page similar to what the interactive Knotty does on terminal. This concept can be found here:

https://github.com/sveinse/bitbake-ws-concept/tree/2.0

Briefly explained the knotty UI is modified to connect to an external WebSocket server and it will upload all log and events in real-time. contrib/webknotty/ contains a small react-based webapp that receives the bitbake generated logs and events and presents them on screen. Please see the above link to see a screenshot of the page. To connect these together contrib/wsproxy.py implements a small WS proxy server that allows bitbake and the web clients to connect.

Why not use Toaster? Well, firstly, I like the Knotty way of indicating build progress. Secondly, my use of bitbake is a part of a much larger build infrastructure, and having a WS interface allows external integration with the top-level build UI. Much like what the teamcity UI does, but still maintaining the essence of knotty.

The purpose was simply to test how this might be done. I do not have any opinion on the direction of bitbake, but I hope that it might be interesting. I'm not very familiar with the inner workings of bitbake, as I'm sure there are other ways this could be realized. Perhaps the xmlrpc interface can be used to connect the web UI? I haven't spent any time on the web UI and the react webapp, since this is simply a proof of concept.

All in all, I publish this in hope that others might find it interesting.

Best regards,
Svein