-
Notifications
You must be signed in to change notification settings - Fork 9
fixed copy and download button in wave reports #969
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
Conversation
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
|
tested in dev Screen.Recording.2026-01-20.at.08.12.20.mov |
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>
|
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 |
yes its working |
Screen.Recording.2026-01-20.at.11.09.53.mov |
|
@pditommaso I cannot merge it because it contains unverified commits |
|
Opps |
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