[SPARK-59085][CORE] Render the web UI's inline (kill), (hold), and (resume) links as buttons - #58387
Closed
dongjoon-hyun wants to merge 1 commit into
Closed
[SPARK-59085][CORE] Render the web UI's inline (kill), (hold), and (resume) links as buttons#58387dongjoon-hyun wants to merge 1 commit into
(kill), (hold), and (resume) links as buttons#58387dongjoon-hyun wants to merge 1 commit into
Conversation
…d `(resume)` links as buttons
Member
Author
|
Could you review this PR too, @peter-toth ? |
peter-toth
approved these changes
Aug 28, 2026
Member
Author
|
Thank you always, @peter-toth ! |
dongjoon-hyun
added a commit
that referenced
this pull request
Aug 28, 2026
…d `(resume)` links as buttons ### What changes were proposed in this pull request? This PR renders the web UI's inline `(kill)`, `(hold)`, and `(resume)` text links as buttons, using the `btn btn-sm btn-outline-*` style already used elsewhere in the UI. **BEFORE (Apache Spark 5.0.0-SNAPSHOT)** <img width="410" height="115" alt="Screenshot 2026-08-28 at 09 48 51" src="https://github.com/user-attachments/assets/b0516f14-e7a8-45a7-a0ff-e5b1e71fe1c2" /> **AFTER (This PR)** <img width="421" height="128" alt="Screenshot 2026-08-28 at 09 47 20" src="https://github.com/user-attachments/assets/3383ca74-87db-4b40-8d30-454d26a04327" /> - Master UI application and driver tables: these controls are already wrapped in `POST` forms, so their anchors become `<button type="submit">`. - Stage and job tables, and the jobs page summary: these must stay `GET` links (SPARK-6846: the YARN AM proxy does not forward `POST`), so they remain anchors and gain `role="button"`. - `kill` uses `btn-outline-danger` and `hold`/`resume` use `btn-outline-secondary`, separating the destructive control from the reversible one. - Labels drop the parentheses that marked them as links: `(kill)` -> `Kill`, `(hold)` -> `Hold`, `(resume)` -> `Resume`. - Because a submit button posts its own form, `webui.js` no longer has to submit the form on the anchor's behalf. The two otherwise identical confirmation handlers collapse into one that works for both links and buttons (22 lines -> 8). - `kill-link` and `confirm-link` remain as JS and test hooks but no longer carry colors; the Bootstrap button variant owns those now. - `docs/web-ui.md` and `docs/spark-standalone.md` are updated to match the new labels. ### Why are the changes needed? These controls perform actions -- killing an application, stage, or job, and holding or resuming an application -- but render as small parenthesized secondary-colored text, which reads as body copy rather than as something clickable, and gives a hit target only as wide as the word. This also aligns them with the button style the UI has been converging on. SPARK-59066 and SPARK-59067 recently moved the History Server's `Download` control and the SQL execution page's `Download` control to `btn btn-sm btn-outline-secondary`; this PR applies the same style to the remaining inline controls. Converting the Master UI's `POST` controls to real submit buttons also makes them reachable by keyboard, which `<a href="#">` was not, and removes the JS workaround that submitted the form for them. ### Does this PR introduce _any_ user-facing change? Yes, this is a visual change to the web UI. The controls listed above now render as buttons and their labels lose the surrounding parentheses. One behavior change is worth calling out: the Master UI's kill, hold, and resume controls are now native submit buttons, so if `webui.js` fails to load, clicking one posts the form without showing the confirmation prompt. Previously the `<a href="#">` did nothing at all without JS. This matches the driver UI's kill and hold controls, which are `GET` links and have always navigated without a prompt when JS is unavailable. ### How was this patch tested? - Existing coverage is unaffected: `UISeleniumSuite` locates these controls by the `kill-link` and `confirm-link` class names, which are preserved, and `MasterWebUISuite` asserts on the rendered `app/kill/`, `app/hold/`, and `app/resume/` form actions, which are unchanged. - `core/compile`, `core/scalastyle`, and `dev/lint-js` pass. - Verified manually ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5 Closes #58387 from dongjoon-hyun/SPARK-59085. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 598ca22) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR renders the web UI's inline
(kill),(hold), and(resume)text links as buttons, using thebtn btn-sm btn-outline-*style already used elsewhere in the UI.BEFORE (Apache Spark 5.0.0-SNAPSHOT)
AFTER (This PR)
POSTforms, so their anchors become<button type="submit">.GETlinks (SPARK-6846: the YARN AM proxy does not forwardPOST), so they remain anchors and gainrole="button".killusesbtn-outline-dangerandhold/resumeusebtn-outline-secondary, separating the destructive control from the reversible one.(kill)->Kill,(hold)->Hold,(resume)->Resume.webui.jsno longer has to submit the form on the anchor's behalf. The two otherwise identical confirmation handlers collapse into one that works for both links and buttons (22 lines -> 8).kill-linkandconfirm-linkremain as JS and test hooks but no longer carry colors; the Bootstrap button variant owns those now.docs/web-ui.mdanddocs/spark-standalone.mdare updated to match the new labels.Why are the changes needed?
These controls perform actions -- killing an application, stage, or job, and holding or resuming an application -- but render as small parenthesized secondary-colored text, which reads as body copy rather than as something clickable, and gives a hit target only as wide as the word.
This also aligns them with the button style the UI has been converging on. SPARK-59066 and SPARK-59067 recently moved the History Server's
Downloadcontrol and the SQL execution page'sDownloadcontrol tobtn btn-sm btn-outline-secondary; this PR applies the same style to the remaining inline controls.Converting the Master UI's
POSTcontrols to real submit buttons also makes them reachable by keyboard, which<a href="#">was not, and removes the JS workaround that submitted the form for them.Does this PR introduce any user-facing change?
Yes, this is a visual change to the web UI. The controls listed above now render as buttons and their labels lose the surrounding parentheses.
One behavior change is worth calling out: the Master UI's kill, hold, and resume controls are now native submit buttons, so if
webui.jsfails to load, clicking one posts the form without showing the confirmation prompt. Previously the<a href="#">did nothing at all without JS. This matches the driver UI's kill and hold controls, which areGETlinks and have always navigated without a prompt when JS is unavailable.How was this patch tested?
UISeleniumSuitelocates these controls by thekill-linkandconfirm-linkclass names, which are preserved, andMasterWebUISuiteasserts on the renderedapp/kill/,app/hold/, andapp/resume/form actions, which are unchanged.core/compile,core/scalastyle, anddev/lint-jspass.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5