etf-validator / governance

ETF Steering Group and the Technical Committee documents
1 stars 2 forks source link

Test reports: Support printable version #31

Open michellutz opened 6 years ago

michellutz commented 6 years ago

Background and Motivation

Currently the only format in which you can download the reports is .html. Which is not a printer-friendly format.

This issue is related to etf-validator/etf-webapp#139

Proposed change

Add the option to download in pdf.

Alternatives

Funding

TBD

jenriquesoriano commented 6 years ago

For the report view there will be two options to download it:

jenriquesoriano commented 6 years ago

The pop-up window will show the level of details as follows: imagen

cportele commented 6 years ago

Such a dialog is only relevant for PDF. The HTML will have all the details and the user can switch between the views.

jenriquesoriano commented 6 years ago

The download buttons for html and pdf will be shown in:

michellutz commented 6 years ago

Such a dialog is only relevant for PDF. The HTML will have all the details and the user can switch between the views.

Yes. It was meant only for the PDF download.

jenriquesoriano commented 6 years ago

To do:

carlospzurita commented 5 years ago

Some libraries that could be used for generating the PDF from HTML

MarcoMinghini commented 5 years ago

Check with the INSPIRE community wheter the pdf download is useful or not and clarify the extent of the pdf report (summary, full detail, select options...)

Following discussion with the members of MIWP Action 2017.4 (see here), it was agreed that support for PDF printable version of test reports is a useful and a high-priority improvement. The user should have the possibility to download the test report in all possible levels of detail: the default will be a summary document, but the user will be able to ask for higher levels of detail.

The button to download the pdf report should be visually close to the test result graphics (https://github.com/etf-validator/governance/issues/60).

MarcoMinghini commented 5 years ago

printable1 printable2

MarcoMinghini commented 5 years ago

Following the discussion during SG meeting 9, it was agreed not to include the "print" elements inside the HTML page of test results, for two reasons:

It was also agreed not to enable the option to print the results only for some conformance classes.

Instaed, it was decided to extend the "Download report" button in the Test Reports page so that users can download the report in any available format (e.g. PDF, HTML, XML, JSON, CSV) and maybe also as a Zip archive with the report in all these formats. When the "Download Report" button is clicked, the user will be able to make the choice.

jonherrmann commented 5 years ago

No objections to the requirement.

Technical details would be interesting:

carlospzurita commented 5 years ago

The report transformers could be added on the etf-bsxds component, to generate the files directly from the BaseX database, using the XSLTOutputTransformer. Stylesheet files could be defined for CSV and PDF, in the same way as HTML and JSON are already presente in this component. Then, REST interfaces could be added on the API to request Test Reports on the desired format. The UI modifications to reflect the availability of these could be added statically on the reports view.

carlospzurita commented 5 years ago

Following the suggestions to adhere to the 4+1 model view, here is as a summary of the needed changes. From the logical view, the functionality should let the user choose the print format, either by a selection dialog or a group of buttons on the test report view. From a process point of view, it would be needed to communicate the API with the database component to process the request of printing, and return it as a response to the user. Then, from a development perspective, the changes would need to be applied in the webapp frontend, the API, and in the BaseX component.

jonherrmann commented 5 years ago

it would be needed to communicate the API with the database component to process the request of printing,

It would be nice to get a view on the process for instance with an UML interaction diagram or something simpler that shows the object/library collaboration through the layers.

carlospzurita commented 5 years ago

Here we produced a simple diagram to illustrate our approach. Basically, it would replicate the current process of generating the HTML Test Reports, using the DTOs data model and the XSLT transformer to generate the desired output passed through an API call. print-etf

jonherrmann commented 5 years ago

Thanks, LGTM

carlospzurita commented 5 years ago

To offer an update on the development of this EIP, we have succesfully altered the workflow to generate a report using an alternate XSLT template. We are now integrating the library Apache FOP as a dependency on the ETF. This library uses the markup file format XSL-FO as an input to generate PDF files. So the roadmap is to transform the TestRun XML file to XSL-FO using a newly developed XSLT template file, and the use it as an input to create the PDF file to serve as response on the API.

carlospzurita commented 5 years ago

We have some doubts about the integration of Apache FOP on the ETF. Should we put it on the gradle dependencies, and upload this dependency to the repository along with the rest of the pull request?

jonherrmann commented 5 years ago

Should we put it on the gradle dependencies

yes

and upload this dependency to the repository along with the rest of the pull request?

No need to upload the dependency. The external lib will be automatically cached, once our CI builds your PR.