-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for panels state=Done #19
base: main
Are you sure you want to change the base?
Wait for panels state=Done #19
Conversation
Hi @intermittentnrg, I would not have expected that this program is useful any longer, and I am very happy to hear that it apparently still works, now even better with your patch. Thank you so much for submitting this improvement, I love it. With kind regards, |
Thoughts
Without validating your patch yet, if Grafana (now?) offers a While I believe it works like your patch demonstrates it, I am thinking about if we could mount it at the place where the synchronization between the Grafana/JavaScript and Python domains happens, also getting rid of the busy/delayed Python loop, which is currently polling the whole stack. DetailsAt those spots, we staged an event-based synchronization mechanism, which, under the hood, also uses polling, but is based on Marionette's It does the "all data loaded" check within the JavaScript domain, and emits a synthesized |
I think if your code could fit there, and emits this event appropriately, we could get rid of the manual exposure timing in the Python domain completely, which is effectively a By doing so, grafanimate will become both more robust, and efficient, like originally intended. 1 Do you think you may have the capacity to squeeze your code into that box, effectively replacing the ingredients of Grafana Studio's Footnotes
|
It still works! But I think grafana-studio.js is mostly not doing anything after Grafana changed from Angular to React. I have made several more changes, but they're mostly hardcoded and need to be done as options. I will look at your feedback and make changes to the PR. |
Also what about support for old grafana? Should old use-panel-events and similar code be deleted to remove things that don't work or don't do anything in current grafana? |
Hi again,
I am not completely following to understand how grafanimate would properly work, if the code in
I don't think we need to be backwards-compatible. To be fair, we can run another maintenance release before bringing in breaking changes, so we can build upon that if there is demand.
I think it will be good to migrate the event handling to your proposal. Other things that don't work would also need to be modernized. With kind regards, |
Ok I glossed over those parts mainly looking at the styling. So I mean just the stuff that refers to elements and angular. Also I will look at updating grafana-studio.js as suggested, but also it's kinda neat to keep the code mostly in python I think? But I understand your point why it's better in JS. |
I will love to have most code in Python. But it is not a good idea to send JavaScript code from Python each time you want to invoke it, as it needs to be parsed and compiled each and every time. Better to load it into the browser in a regular way, using JavaScript, and invoke it using Python/Marionette. In other words, |
e6bc987
to
f005557
Compare
Regarding |
Thanks for the heads up, @intermittentnrg. We will need to find a different solution. Do you have any suggestions? |
I came up with this selector for removing padding around panels:
Using The recommendation by Grafana is to use plugins? / adding files and rebuilding Grafana? Not really keen on this approach, I use their official docker image. Anyway should we perhaps remove all broken css manipulation from grafana-studio.js? It can live on/die in git history. The kiosk enabling doesn't work either but appending |
Hi @intermittentnrg. We will be happy to accept any patches to modernize grafanimate, making it compatible with recent versions of Grafana. We haven't been able to keep up with maintenance, and we are about to migrate it to https://github.com/grafana-toolbox. Let us know if we should add you as a collaborator on this project while we are already on the refactoring, so we can share future maintenance, if you like that idea. |
I guess it is because synchronization with Grafana is currently utterly broken, never has been stable, and we currently don't have a good solution. Or do we? Sorry if I lost track about any recent improvements from your pen, please educate me if I'm wrong. Because synchronization is broken, rendering each frame will take so long because it will fully consume the timeout each time for each frame again. This makes usage unbearable. If it works well on your workstation, but does not on your Raspberry Pi, it is yet another sign that this subsystem would need to be improved significantly. Until it is, please don't run it on a Pi. |
Another thing comes to mind: Didn't the code introduce manual exposure times some time ago? Footnotes
|
Got it. Reading up on the conversation we had on this PR, I see that we may have stopped over at #19 (comment):
|
I have these 2 checks.
But they maybe only check if data request is complete, and not that the canvas has been redrawn. It mostly works! But I'm noticing some skipped frames when running on Pi, I have a kubernetes cluster with 4x Pi. And it's probably fine on my desktop PC. But if it works consistently on Pi then it must be fully solved right? Could compare the screenshot image if it's different to previous? But probably not a nice way to do it. |
Also had a lot of startup errors, timeout and JS errors. Just installed vnc server inside the docker image to see what's going on as logs and gecko.log weren't helpful... Inspired by docker-seleinum which has this super useful VNC feature: https://github.com/SeleniumHQ/docker-selenium?tab=readme-ov-file#using-a-vnc-client |
Just comparing the screenshot contents would be very reliable and simple.. Not sure if I like the idea tho. https://stackoverflow.com/questions/34669068/how-to-verify-that-two-images-are-exactly-identical |
Alternative method to use-panel-events and exposure-time options.
I think it still needs ~0.2 second exposure time.
Also not tested with older versions of Grafana.
I have been using grafanimate with some customizations to post videos of my Grafana to X/Twitter
https://x.com/IntermittentNRG/status/1712826595977674850
Submitted for your consideration.