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

Add option to expand Collapsed panels in pdf #124

Open
knockingOn opened this issue May 7, 2019 · 15 comments
Open

Add option to expand Collapsed panels in pdf #124

knockingOn opened this issue May 7, 2019 · 15 comments

Comments

@knockingOn
Copy link

The collapsed panels containing multiple graphs are not captured in the pdf report.
Only expanded ones are being captured
am i doing something wrong?

@IzakMarais
Copy link
Owner

Hmm this could either be a bug in the reporter or an artifact of the way the Grafana API responds to dashboard requests. The reporter requests the dashboard JSON from Grafana and iterates over all the panels, downloading them and then adding them to a structure to render the LaTeX doc. This issue will require investigating that interaction.

@knockingOn
Copy link
Author

Is there any way in Grafana where i can specify all panels to be expanded while the dashboard loads up?
although this question is little bit off topic.. but asking for the help anyway.. since you seem to be familiar with Grafana as well.
Thank You

@IzakMarais
Copy link
Owner

IzakMarais commented May 8, 2019 via email

@IzakMarais
Copy link
Owner

Any feedback on whether saving the dashboard with panels expanded solves this problem?

@amirmalka
Copy link

@IzakMarais We are facing the same issue.
A workaround is indeed to save the dashboard JSON with all panels expanded, but it's not a good solution overall.
Any chance for a fix?

@IzakMarais
Copy link
Owner

From a quick look at the dashboard JSON returned for collapsed panels, it seems like all the needed information is still there. The conclusion is that this is a bug in the reporter.

@IzakMarais IzakMarais added the bug label Dec 10, 2019
@amirmalka
Copy link

@IzakMarais Thanks for the prompt response!
Do you think it will be fixed anytime soon?

@IzakMarais
Copy link
Owner

IzakMarais commented Dec 10, 2019 via email

amirmalka pushed a commit to amirmalka/reporter that referenced this issue Apr 22, 2020
@amirmalka
Copy link

@IzakMarais waiting for your kind approval :)

@chelliwell
Copy link

What would this change do if the dashboard default is 'collapsed'?
I would prefer it if the report followed the dashboard default, not simply automatically expand everything.

@IzakMarais
Copy link
Owner

@chelliwell thanks for the comment, I had not even thought of that. O bother! @amirmalka any ideas?

@chelliwell
Copy link

I recognise that you are constrained quite a lot by what the Grafana API makes possible. (e.g. Annotations in the pdf would be fantastic, but I've no idea how you would get them!)
Given those constraints, I think there is some case for not blindly over-riding what Grafana presents - if you don't have the ability to control what it generates then I think it fair if the 'problem' (timezone, collapsed panels etc) are treated as being due to Grafana and/or the dashboard, not your code. You're essentially using their API - if that is missing some features then it's not your fault! ;)

@amirmalka
Copy link

@chelliwell I understand this need, I thought about it too.
Maybe we can leave the default as it is and give an option/flag to generate the 'full' dashboard? What do you think?

@chelliwell
Copy link

@chelliwell I understand this need, I thought about it too.
Maybe we can leave the default as it is and give an option/flag to generate the 'full' dashboard? What do you think?

I haven't looked at what controls Reporter has over requesting collapsed vs. expanded.
My own uses will be two types: from the Grafana web UI, where I'd definitely prefer Reporter to capture how I have the web page showing at that time. But also from command line - if that is the dashboard defaults then I think that is justified; if there's an over-ride option available to 'expand all' then fair enough, I can see that being useful.
Of course someone will then want to be able to specify which to expand..... :S ;)

@IzakMarais IzakMarais changed the title Collapsed panels not captured in pdf Add option to expand Collapsed panels in pdf Sep 22, 2020
@IzakMarais
Copy link
Owner

IzakMarais commented Sep 22, 2020

Sorry for the long time between replies.

Maybe we can leave the default as it is and give an option/flag to generate the 'full' dashboard? What do you think?

This sounds like a good plan to me. @amirmalka If you include it in the PR that would be good.

Of course someone will then want to be able to specify which to expand..... :S ;)

Lets not go there, that seems too complex.

FaksBoi added a commit to FaksBoi/reporter-jarvis that referenced this issue May 29, 2021
Popravek nepravilnega renderiranja. 
Napaka:IzakMarais#124
Rešitev: IzakMarais#220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants