Skip to content
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

Replace setKioskmode() with &kiosk query param #54

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

intermittentnrg
Copy link
Collaborator

@intermittentnrg intermittentnrg commented Jan 7, 2025

Alternative to #53

Probably need to update loadDashboard() in grafana-studio.js also.

@intermittentnrg intermittentnrg changed the title Repace setKioskmode() with &kiosk query param Replace setKioskmode() with &kiosk query param Jan 7, 2025
@intermittentnrg
Copy link
Collaborator Author

What is the point of loadDashboard() in grafana-studio.js? https://github.com/grafana-toolbox/grafanimate/blob/main/grafanimate/grafana-studio.js#L99-L108
It's just reimplementation of make_grafana in core.py? https://github.com/grafana-toolbox/grafanimate/blob/main/grafanimate/core.py#L35-L48

Is it to support login or? For me it would make sense to delete the javascript version.

@amotl amotl mentioned this pull request Jan 11, 2025
@amotl
Copy link
Contributor

amotl commented Jan 11, 2025

Thank you very much. What do you think about this patch, @maurerle?

@maurerle
Copy link
Collaborator

What is the point of loadDashboard() in grafana-studio.js?
There is the functionality to have a list of dashboards or panels or something in which the navigation happens completely in JS.
Though I do not think it is used for now.

So I am fine with removing this :)
Patch looks good from my side.

Login does currently rely on one request to do the login and a second python request to show the dashboard - while the grafana-studio.js is injected freshly into the page, so this does not rely on the js version of loadDashboard as well.

Did you test this? Then it is fine from my side :)

@intermittentnrg
Copy link
Collaborator Author

intermittentnrg commented Jan 11, 2025

I mean I used to set the full dashboard URL from GRAFANA_URL, completely removing the need for loadDashboard() to generate the URL. Never quite understood the need for dashboard uid param.

I do not use or test login with grafana builtin auth, I instead use reverse proxy auth using oauth2-proxy. And I just bypass the auth when running grafanimate.

I am using this code locally and have tested it, but may not have tested everything like login, and have made other changes also.

@maurerle
Copy link
Collaborator

@intermittentnrg would you like to rebase the PR and set it ready?

Copy link
Contributor

@amotl amotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Approving this, as there are no other objections. If someone needs the features you may remove hereby, it will not be too difficult to bring them back.

@amotl amotl requested a review from maurerle January 14, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants