Github user CodingCat commented on a diff in the pull request:
https://github.com/apache/spark/pull/7910#discussion_r43707691
--- Diff: core/src/main/resources/org/apache/spark/ui/static/table.js ---
@@ -30,3 +30,75 @@ function stripeSummaryTable() {
}
});
}
+
+function toggleThreadStackTrace(threadId, forceAdd) {
+ var stackTrace = $("#" + threadId + "_stacktrace")
+ if (stackTrace.length == 0) {
+ var stackTraceText = $('#' + threadId + "_td_stacktrace").html()
+ var threadCell = $("#thread_" + threadId + "_tr")
+ threadCell.after("<tr id=\"" + threadId +"_stacktrace\"
class=\"accordion-body\"><td colspan=\"3\"><pre>" +
+ stackTraceText + "</pre></td></tr>")
+ } else {
+ if (!forceAdd) {
+ stackTrace.remove()
+ }
+ }
+}
+
+function expandAllThreadStackTrace(toggleButton) {
+ $('.accordion-heading').each(function() {
+ //get thread ID
+ if (!$(this).hasClass("hidden")) {
+ var trId = $(this).attr('id').match(/thread_([0-9]+)_tr/m)[1]
+ toggleThreadStackTrace(trId, true)
+ }
+ })
+ if (toggleButton) {
+ $('.expandbutton').toggleClass('hidden')
+ }
+}
+
+function collapseAllThreadStackTrace(toggleButton) {
+ $('.accordion-body').each(function() {
+ $(this).remove()
+ })
+ if (toggleButton) {
+ $('.expandbutton').toggleClass('hidden');
+ }
+}
+
+
+// inOrOut - true: over, false: out
+function onMouseOverAndOut(threadId) {
+ $("#" + threadId + "_td_id").toggleClass("threaddump-td-mouseover");
+ $("#" + threadId + "_td_name").toggleClass("threaddump-td-mouseover");
+ $("#" + threadId + "_td_state").toggleClass("threaddump-td-mouseover");
+}
+
+function onSearchStringChange() {
+ var searchString = $('#search').val().toLowerCase();
+ //remove the stacktrace
+ collapseAllThreadStackTrace(false, false)
--- End diff --
oops, my bad
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]