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

Added ability to configure width of evidence images #597

Merged

Conversation

reesercollins
Copy link
Contributor

@reesercollins reesercollins commented Mar 6, 2025

Issue

#596

Description of the Change

All current evidence inserting into report documents are 6.5 inches wide, however certain templates may not be suited to 6.5 inch wide images. The current recommendation is "you can change the size after the report is generated". This change allows users to configure report templates to set the size of inserted evidence.

Alternate Designs

An alternative solution would be to add a global report configuration option to set the width of inserted images, however this is not ideal when different templates may look best with different width images.

Possible Drawbacks

None I can foresee

Verification Process

I tested the change by exporting reports before and after changing the "evidence image width" value. The reports that were downloaded shows the images are being correctly set to the desired width.

Release Notes

Added per-template configurable width for embedded evidence images

@chrismaddalena
Copy link
Collaborator

Thanks for submitting this! The code changes and approach look good to me. I like the idea. I'll test it out today.

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.07%. Comparing base (b730ba9) to head (be2e89a).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
ghostwriter/reporting/models.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #597   +/-   ##
=======================================
  Coverage   92.07%   92.07%           
=======================================
  Files         324      325    +1     
  Lines       19061    19069    +8     
=======================================
+ Hits        17550    17558    +8     
  Misses       1511     1511           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrismaddalena chrismaddalena merged commit e53b2bb into GhostManager:master Mar 16, 2025
6 of 8 checks passed
@reesercollins reesercollins deleted the add-template-evidence-width branch March 23, 2025 19:34
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