Copy only the assessed provider's PNG icons into reports - #64
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every report bundled the full icon tree — 2,204 files, 5.5 MB — to display a handful of icons.
copy_assets()now copies only the assessed provider's icon folder, and only PNGs.What changes
copy_assets()takescloud_service_providerand copiesicons/<provider>/plusicons/severity/andicons/misc/. The severity icons are used by the PDF renderer andno_image.pngis the fallback, so both travel with every report.cloud_service_providerwas already a parameter at the call site — nothing new to plumb through.PNG only. No renderer loads an icon SVG; they were dead weight. The
ignorecallable is an allowlist (keep directories, keep.png, drop the rest) rather thanignore_patterns("*.svg"), so a future stray file type can't ride along. Category subfolders are preserved.