Skip to content

[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
apache:masterfrom
dongjoon-hyun:SPARK-59085
Closed

[SPARK-59085][CORE] Render the web UI's inline (kill), (hold), and (resume) links as buttons#58387
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-59085

Conversation

@dongjoon-hyun

@dongjoon-hyun dongjoon-hyun commented Aug 28, 2026

Copy link
Copy Markdown
Member

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)

Screenshot 2026-08-28 at 09 48 51

AFTER (This PR)

Screenshot 2026-08-28 at 09 47 20
  • 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

@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Could you review this PR too, @peter-toth ?

@dongjoon-hyun

Copy link
Copy Markdown
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>
@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Merge Summary:

Posted by merge_spark_pr.py

@dongjoon-hyun
dongjoon-hyun deleted the SPARK-59085 branch August 28, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants