fixed copy and download button in wave reports - #969
Merged
Conversation
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Member
Author
|
tested in dev Screen.Recording.2026-01-20.at.08.12.20.mov |
munishchouhan
requested review from
alvaromartmart,
cristianrcv and
pditommaso
January 20, 2026 07:16
Replace multiple querySelectorAll loops with a single click event listener using event delegation pattern. This simplifies the code and removes the need for DOMContentLoaded. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
|
Well done. I've trimmed down the JS to a more compact solution replacing multiple querySelectorAll loops with a single click event listener using event delegation pattern. This simplifies the code and removes the need for DOMContentLoaded. Please give it a try |
Member
Author
yes its working |
Member
Author
Screen.Recording.2026-01-20.at.11.09.53.mov |
pditommaso
reviewed
Jan 20, 2026
pditommaso
approved these changes
Jan 20, 2026
Member
Author
|
@pditommaso I cannot merge it because it contains unverified commits |
Collaborator
|
Opps |
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
Fixed Content Security Policy (CSP) violations preventing copy and download functionality in Wave UI by replacing all inline event handlers with data attributes and external JavaScript event listeners.
Problem
Users encountered CSP violations when clicking copy and download buttons:
This error blocked all copy and download functionality across Wave view pages (builds, scans, containers, mirrors, inspect).
Root Cause
The application has a strict CSP policy configured in
src/main/resources/application.yml:63:This policy blocks all inline JavaScript execution, including inline event handlers like
onclick="...". All HBS template files were using inline event handlers, which violated this security policy.Solution
Replaced all inline event handlers with data attributes and attached event listeners via external JavaScript.
Before (Insecure - CSP Violation)
After (Secure - CSP Compliant)
Changes
JavaScript Changes
File:
src/main/resources/io/seqera/wave/assets/copy.jsAdded Event Listener Initialization
Fixed evictFromCache Function
<script>incontainer-view.hbstocopy.jsChecklist
onclickhandlers removed from HBS filescopy.js