diff --git a/core/src/main/resources/org/apache/spark/ui/static/table.js b/core/src/main/resources/org/apache/spark/ui/static/table.js index b3aa85f64c5d3..1e99b13f7ccb9 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/table.js +++ b/core/src/main/resources/org/apache/spark/ui/static/table.js @@ -117,3 +117,29 @@ function collapseTableAndButton(thisName, table) { } } /* eslint-enable no-unused-vars */ + +// Event delegation for thread dump page (CSP-compliant) +$(function() { + // toggleThreadStackTrace on row click + $(document).on("click", "tr.accordion-heading[data-thread-id]", function() { + toggleThreadStackTrace($(this).data("thread-id"), false); + }); + + // expandAll / collapseAll + $(document).on("click", "[data-action=expandAllThreadStackTrace]", function() { + expandAllThreadStackTrace(true); + }); + $(document).on("click", "[data-action=collapseAllThreadStackTrace]", function() { + collapseAllThreadStackTrace($(this).data("toggle-button") !== false); + }); + + // onMouseOverAndOut + $(document).on("mouseenter mouseleave", "tr.accordion-heading[data-thread-id]", function() { + onMouseOverAndOut($(this).data("thread-id")); + }); + + // onSearchStringChange + $(document).on("input", "[data-search-input]", function() { + onSearchStringChange(); + }); +}); diff --git a/core/src/main/resources/org/apache/spark/ui/static/utils.js b/core/src/main/resources/org/apache/spark/ui/static/utils.js index 2d4123bc75ab8..ca5fbdc6b80c8 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/utils.js +++ b/core/src/main/resources/org/apache/spark/ui/static/utils.js @@ -237,7 +237,7 @@ function getBaseURI() { function detailsUINode(isMultiline, message) { if (isMultiline) { - const span = ''; + const span = ''; const pre = '
' + message + ''; const div = '