Render Tables natively (`pdfTables` feature toggle at Grafana)
jkroepke opened this issue · 7 comments
Tables through the grafana-image-render are always cropped.
Instead asking table renderer to render a image, the data should be scraped from table panel and rendered in HTML.
As I know, it's possible to export the table planel data as CSV, including all panal transforations. As I know, the CSV export is pure javascript on client.
ref:
It seems that the grafana image renderer support exporting CSV (grafana/grafana-image-renderer#217), guessing that feature is used, if the pdfTables feature toggle is enabled in Grafana.
However, this feature is not exposed by Grafana API (grafana/grafana-image-renderer#319), the grafana-image-renderer may need called directly.
I am not quite sure if it will be really useful. If a table has 10000 rows, do we render all those rows? The panels does pagination and shows only "top" rows. Moreoever user can sort these rows on client side and we do not have any info on the sorting preferences. If the table is too wide, even a HTML table will have issues rendering it.
Do you have a use case for this?
Users can download the CSV directly and do whatever they want with data. CSV is way more useful than a HTML table in a sense that users can sort, manipulate, filter and do a lot.
If a table has 10000 rows, do we render all those rows?
Over multiple pages. You could see an example here: https://www.youtube.com/watch?v=1fzQQI8O838
Do you have a use case for this?
We have to provide reports for our customers. And the Report should work with 10 VMs or 500 VMs. The amount of data should not matter.
If customers has 10000 VMs, the gets 100 pages of PDF.
Users can download the CSV directly and do whatever they want with data.
User can do this, but roboter/automated workflows can't do this. If 4 Tables of data, users have to download csv 4 times and convert them to PDF. Thats not efficient.
User can do this, but roboter/automated workflows can't do this. If 4 Tables of data, users have to download csv 4 times and convert them to PDF. Thats not efficient.
My point is why would end users want to have data in PDFs. If you send your customers PDF reports of dashboards along with CSV files of tables (presuambly with VM usage data), it would be easier for the end users to look into data of the tables. Cloud providers can have automated workflows to generate reports, download table data for each panel in the dashboard for each customer and then send them to customers.
Over multiple pages. You could see an example here: https://www.youtube.com/watch?v=1fzQQI8O838
I agree having HTML tables at the end of the report is more elegant. But I am quite pragmatic in this sort of stuff. How much of "real" value it adds? But again, I dont work in customer centric business, so my point of view is not complete.
If you are willing to contribute this feature, I would be happy to work with you as long as it does not add more external dependencies.
My point is why would end users want to have data in PDFs.
Part of managed users contracts. Every managed service offerings has to create reports, because written down on contracts. At least in germany, it's standard produce.
it would be easier for the end users to look into data of the tables.
We offer end users to login into Grafana and play with the data interactively. On PDF, they just want a snapshot of all data.
Cloud providers can have automated workflows to generate reports
In theory, but in practice the doesn't fit. If also have multiple other KPIs, like ticket system, Security Information and Event Management (SIEM), etc.
We are using infinity datasource to scrape the data from various endpoints and using Grafana as aggregated service view. Based on aggregated service view, I would like to create a PDF with all the data included.
How much of "real" value it adds?
Thats a good question, but no one ask for it.
Contracts exists for reasons. Some larger companies brings own contracts we have to fulfill them. Managed Service reports are one of non-discussable standard clauses. Each customer get tons of PDF paper work, no one will look through them.
Currently, our service manager has to create the reports end of month. My goal is to help them. For example, I would like to create reporting dashboards where customers can walk through the data interactively and end of month, they get a snapshot as from the Dashboard. But the PDF must contain all data, not just a subset. Having a screenshot of a table which displays 30 of 100 records does help here.
If you are willing to contribute this feature, I would be happy to work with you as long as it does not add more external dependencies.
I looked closer to the grafana-image-render and It wont work for the use-case here. My idea is to use the chrome browser and trigger the CSV download through javascript. Go has an csv parser on stdlib.
Part of managed users contracts. Every managed service offerings has to create reports, because written down on contracts. At least in germany, it's standard produce.
I never worked in the commercial setting but I agree with you. SLAs can oblige companies to provide these sort of services.
My idea is to use the chrome browser and trigger the CSV download through javascript. Go has an csv parser on stdlib.
That is the way I see it as well. The only downside is that we should depend on frontend code which is a pain. As you see here things have changed between v10 and v11 regarding the JS that is used to uncollapse dashboards.
hi,
Reports with tables are asked by end users for sending to various parties like customers, auditors, quality check etc. usually hourly, daily reports, monthly reports are required. If possible limit the no. of pages in pdf to 5 or 10.