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

fix: make JavaScript usable in Snyk Report tab (CLI-268) #209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

schottsfired
Copy link
Collaborator

@schottsfired schottsfired commented Nov 21, 2024

CLI-268

Problem:
After running a build, the Snyk Report tab includes a report with Data Flow and Fix Analysis tabs that do nothing when clicked. The browser console shows the following error message:

snyk-report-tab.html:1 Uncaught ReferenceError: toggleCardView is not defined
    at HTMLSpanElement.onclick (snyk-report-tab.html:1:1)

(toggleCardView is a JS function in the included <script> section of the report)

Solution:
After modifying the HTML template to use an <iframe>, and adjusting the backend logic for filling the iframe, JavaScript is working as expected.

How to Test:
Navigate to this build in dev and compare the two Snyk Report tabs. The one on the left is production, and the one on the right is this PR.

@schottsfired schottsfired requested a review from a team as a code owner November 21, 2024 22:28
@schottsfired schottsfired force-pushed the fix/CLI-268 branch 3 times, most recently from afb2c60 to 3a437cd Compare January 24, 2025 21:24
@schottsfired schottsfired changed the title DO-NOT-MERGE - This is a CI trigger fix: make JavaScript usable in Snyk Report tab (CLI-268) Feb 3, 2025
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.

1 participant