Kent Yao created SPARK-55777:
--------------------------------

             Summary: Add JS helper function for dynamic tooltip initialization 
in stagepage.js
                 Key: SPARK-55777
                 URL: https://issues.apache.org/jira/browse/SPARK-55777
             Project: Spark
          Issue Type: Sub-task
          Components: Web UI
    Affects Versions: 4.2.0
            Reporter: Kent Yao


stagepage.js has 12 repetitive `.attr()` chains to add tooltip attributes 
dynamically:\n\n```javascript\n$('#scheduler_delay').attr('data-bs-toggle', 
'tooltip')\n  .attr('data-bs-placement', 'top')\n  .attr('title', 
'...');\n```\n\nThis repeats for 12 elements (scheduler_delay, 
task_deserialization_time, shuffle_read_fetch_wait_time, etc.). Introduce a 
helper function:\n\n```javascript\nfunction addTooltip(selector, title) {\n  
$(selector).attr('data-bs-toggle', 'tooltip').attr('title', 
title);\n}\n```\n\nThis would reduce ~36 lines of repetitive code to ~12 
concise calls.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to