Skip to content
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

[VIRTS-4674] Resolve Empty PDF Generation Issues #67

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

bleepbop
Copy link
Contributor

@bleepbop bleepbop commented Aug 25, 2023

Description

When running an operation that generates long facts, users were encountering an error when attempting to export the operation to a PDF. The issue was due to an extremely long fact value that caused the table row to span multiple pages, which caused in error in the reportlab.platypus library.

As row heights need to be dynamically generated, I reduced the TABLE_CHAR_LIMIT (the maximum length of a fact value) to something that would restrict the row to one page at the most.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Prior to this update, the bug could be reproduced by the following steps:
1). Start agent and operation. When creating the operation. use the 'Discovery' adversary.
2). When the operation finished, go to Debrief, select the operation you just ran, and click Download PDF Report.
3). Ensure that the facts table is selected, and click download. The resulting PDF would be 0 bytes due to the error.

Now, the fact table will load correctly, and the PDF can be downloaded successfully.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

@sonarcloud
Copy link

sonarcloud bot commented Aug 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bleepbop bleepbop marked this pull request as ready for review August 25, 2023 19:36
@bleepbop bleepbop requested a review from clenk August 25, 2023 19:37
@elegantmoose elegantmoose requested review from elegantmoose and removed request for clenk September 8, 2023 15:23
@elegantmoose elegantmoose merged commit eca3349 into master Sep 8, 2023
2 checks passed
@elegantmoose elegantmoose deleted the bleepbop/VIRTS-4674/fix-debrief-pdf-errors branch September 8, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants