Skip to content

[cmd] Restructure static HTML generation#4168

Merged
bruntib merged 1 commit into
Ericsson:masterfrom
bruntib:static_html
Apr 16, 2024
Merged

[cmd] Restructure static HTML generation#4168
bruntib merged 1 commit into
Ericsson:masterfrom
bruntib:static_html

Conversation

@bruntib
Copy link
Copy Markdown
Contributor

@bruntib bruntib commented Feb 19, 2024

"CodeChecker parse <report_dir> -e html -o html" command generates a static HTML page showing all reports in the report directory. If the report dir is too big, then the generated HTML is too big and the browser freezes while loading it.

In this commit the logic of the statis HTML page has been restructured in a way, that the reports are not HTML table elements automatically, but first they are stored in a JS object. Only those reports are inserted to the DOM tree that are currently visible based on the sorting and paging.

@bruntib bruntib added enhancement 🌟 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands labels Feb 19, 2024
@bruntib bruntib added this to the release 6.24.0 milestone Feb 19, 2024
@bruntib bruntib requested a review from vodorok as a code owner February 19, 2024 07:24
@bruntib bruntib force-pushed the static_html branch 2 times, most recently from c5c41a2 to 08dab9c Compare February 19, 2024 10:28
encoding="utf-8",
errors="ignore")
process.communicate()
print(process.communicate())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure it is necessary to print here.

Comment on lines +309 to +315
'checker-name': data['report']['checker']['name'],
'checker-url': data['report']['checker']['url'],
'line': data['report']['line'],
'message': data['report']['message'],
'review-status': data['report']['reviewStatus'],
'severity': data['report']['severity'],
'bug-path-length': len(data['report']['events'])
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the props of data['report'] validating not necessary anymore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The self._get_html_reports() that generates these reports ensures that these members can't be None.

Copy link
Copy Markdown
Contributor

@vodorok vodorok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stand beside my comment about the let <-> var usage that I made on your other pr. Otherwise LGTM (But I am not a js expert). Also validated on a large report folder, and it paginated the reports for me.

@bruntib bruntib force-pushed the static_html branch 2 times, most recently from 980d7dd to 5bbfe2c Compare April 11, 2024 08:09
Copy link
Copy Markdown
Collaborator

@cservakt cservakt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feature! Looks good to me now.

"CodeChecker parse <report_dir> -e html -o html" command generates a
static HTML page showing all reports in the report directory. If the
report dir is too big, then the generated HTML is too big and the
browser freezes while loading it.

In this commit the logic of the statis HTML page has been restructured
in a way, that the reports are not HTML table elements automatically,
but first they are stored in a JS object. Only those reports are
inserted to the DOM tree that are currently visible based on the sorting
and paging.
@bruntib bruntib merged commit 3d46cda into Ericsson:master Apr 16, 2024
@bruntib bruntib deleted the static_html branch April 16, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands enhancement 🌟

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants