mahendrapaipuri / grafana-dashboard-reporter-app

A Grafana plugin app to create PDF reports of dashboards
Apache License 2.0
29 stars 4 forks source link

Modifying the output of generated report #19

Open Alan1810 opened 3 months ago

Alan1810 commented 3 months ago

Hi @mahendrapaipuri,

Is there a way to modify the output ?

For example, the number of page is present at the bottom of each page and in the dashboard title.

Regards

mahendrapaipuri commented 3 months ago

For example, the number of page is present at the bottom of each page and in the dashboard title.

I am not quite sure if I understand you well. Normally the page number and total number of pages are calculated automatically based on the PDF by chromium. What exactly you would like to modify?

For the moment, there is no way to customize the format of the report. Here is the HTML template that is used to generate report. I tried to use the same format that the official plugin in Grafana Enterprise version uses in their reports.

Alan1810 commented 3 months ago

For our need, we only want to have Dashboard title without the number of page in title of generated pdf report. The page number/Total page is already present as the bottom of the generated pdf report

mahendrapaipuri commented 3 months ago

I see. Just out of curiosity, is it a big blocker for you? I agree that page numbers are already present in the page footer and including them in the title is not really necessary. However, having them in title is also more clear and as I said, I tried to adopt the template from enterprise plugin as much as I can and it does generate page numbers in the title.

It would be nice to make the header and footer of the report configurable. But that requires a bit of knowledge of HTML and CSS from the end users. If we make them configurable does it solve your issue? For instance, here is the header and footer that plugin uses. Maybe we can make content-header and content-footer divs configurable.

Alan1810 commented 3 months ago

It is not a big blocker. We use actually grafana reporter (IzakMarais) and the dashboard title is only present on the 1st page and without number of page is better. Making the header, footer and title of the report configurable could be a great enhancement.

You have already made a great works