Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cloudsplaining/output/dist/js/chunk-56fa57a3.js
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see these two new chunk files. I haven't looked in a while, but I believe in the template.html we are specifically injecting index.js and chunk-vendors.js. Are these chunk files intended to be injected into the HTML template or should they be part of the chunk-vendors.js?

I want to make sure we aren't breaking anyone. I realize we don't have any Playwright tests to validate the html file works as expected, but you can test this by Installing the package from a different virtual environment.

# Remove those chunk files
# Navigate to a different directory
cd ../different-project
python3 -m venv venv
source venv/bin/activate
pip3 install /path/to/cloudsplaining/dev
# run cloudsplaining commands to generate a report
# view the report and see if there are errors

Can you let me know how that goes?

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cloudsplaining/output/dist/js/chunk-5e001255.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cloudsplaining/output/dist/js/index.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions cloudsplaining/output/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from jinja2 import Environment, FileSystemLoader

from cloudsplaining.bin.version import __version__
from cloudsplaining.shared.template_config import TemplateConfig

app_bundle_path = os.path.join(os.path.dirname(__file__), "dist", "js", "index.js")

Expand All @@ -30,6 +31,7 @@ def __init__(
self.report_generated_time = datetime.datetime.now().strftime("%Y-%m-%d")
self.minimize = minimize
self.results = f"var iam_data = {json.dumps(results, default=str)}"
self.template_config = TemplateConfig()

@property
def app_bundle(self) -> str:
Expand Down Expand Up @@ -73,6 +75,10 @@ def get_html_report(self) -> str:
account_name=self.account_name,
report_generated_time=str(self.report_generated_time),
cloudsplaining_version=__version__,
guidance_content=self.template_config.guidance_content,
appendices_content=self.template_config.appendices_content,
show_guidance_nav=self.template_config.show_guidance_nav,
show_appendices_nav=self.template_config.show_appendices_nav,
)
template_path = os.path.dirname(__file__)
env = Environment(loader=FileSystemLoader(template_path)) # noqa: S701
Expand Down
Loading
Loading