-
Notifications
You must be signed in to change notification settings - Fork 328
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 the outdated HTML report generation #192 #287
Conversation
…shall be content of the resources.
…eation of OverviewReport
… list of Metrics, implemnted Metric creation from JPlagResult in ReportObjectFactory
…ison reports generator function
…ort as json strings, implemented the function in ReportImplementation, Json strings from JPlagResult can now be generated
…check and returning index or line depending on it
… overview page implementation
…namically update top comparisons list in frontend
Added simple deployment script for report viewer to GH Pages.
More comments.
…ks to matches, sidebar can be hidden now
… match list, set cursor to pointer for clickable areas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what i found from having another look at the vue code. Overall, pretty solid and well modularized.
…ist dialog, fixed index.ts
@cholakov11 Thank you for implementing the change requests. In my opinion, there are only three things left:
Then, I'll be happy to merge this pull request! 🚀 |
… to override, fixed compariosnview ids
# Conflicts: # jplag/pom.xml # jplag/src/main/java/de/jplag/CLI.java
@sebinside Conflicts are fixed, ready to merge. |
Until now the JPlag report functionality was creating report html files by generating "hard coded" html code. In this pull request changes to the report generation as well as report presentation were introduced.
Report generation
The report generation was moved from generating "hard coded" html to generating JSON files which represent the report. An overview.json file is generated which contains the overall information of a JPlagResult as well as a .json file for each comparison done in the JPlag comparison process.
DTO classes (de.jplag.reportingV2.reportobject.model) are introduced which are used to model the JSON files. ReportObjectFactory is a factory class which takes a JPlagResult object and converts it to a JPlagReport consisting of an OverviewReport and a list of ComparisonReport objects.
The Jackson library is then used to generate json strings from the given JPlagReport. The generated strings are then saved as files on the hard drive.
The .json files can be used by any program which can display .json files or a JPlag report.
Report presentation
A new JPlag report viewer application is introduced in the form of a Vue + Typescript application. The application can be started on local host from its folder report-viewer and accepts .zip files containing overveiw and comparison json files, single json files or searches for report files in its local files folder.
When receiving the .json files the application convets them to Typescript objects (Overview.ts, Comparison.ts) and gives these object to the Vue components to be displayed.
The report viewer consists of three types of pages - a FileUpload page which the entry point to the application and where files to display are specified, an Overview page which display the overall information of a report and a Comparison page for each comparison.
The report viewer supports: