Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14617#discussion_r106930720
  
    --- Diff: 
core/src/main/resources/org/apache/spark/ui/static/executorspage.js ---
    @@ -172,6 +172,15 @@ function totalDurationColor(totalGCTime, 
totalDuration) {
         return (totalGCTime > GCTimePercent * totalDuration) ? "white" : 
"black";
     }
     
    +function memoryUsageTooltip(onHeap, maxOnHeap, offHeap, maxOffHeap, 
onHeapSum, offHeapSum, type) {
    +    return ("<span data-toggle='tooltip' title='" +
    +        "On Heap Memory (" + formatBytes(onHeap, type) +
    +        " / " + formatBytes(maxOnHeap, type) + ") " +
    +        "Off Heap Memory (" + formatBytes(offHeap, type) +
    +        " / " + formatBytes(maxOffHeap, type) + ")'>" +
    +        formatBytes(onHeapSum, type) + " / " + formatBytes(offHeapSum, 
type) + "</span>");
    --- End diff --
    
    this is pretty hard to read (at least for me, though I don't really know js 
...).  Maybe refactor so you prepare two tmp variables, one with the tooltip 
text, and another one w/ the normal text, and then return the fully assembled 
string?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to