Skip to content

Commit c2babc0

Browse files
tsudukimrxin
authored andcommitted
SPARK-2115: Stage kill link is too close to stage details link
Moved (kill) link to the right side. Add confirmation dialog when (kill) link is clicked. Author: Masayoshi TSUZUKI <[email protected]> Closes apache#1350 from tsudukim/feature/SPARK-2115 and squashes the following commits: e2263b0 [Masayoshi TSUZUKI] Moved (kill) link to the right side. Add confirmation dialog when (kill) link is clicked.
1 parent 2b18ea9 commit c2babc0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/src/main/resources/org/apache/spark/ui/static/webui.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ table.sortable thead {
8181

8282
span.kill-link {
8383
margin-right: 2px;
84+
margin-left: 20px;
8485
color: gray;
86+
float: right;
8587
}
8688

8789
span.kill-link a {

core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ private[ui] class StageTableBase(
8989
// scalastyle:off
9090
val killLink = if (killEnabled) {
9191
<span class="kill-link">
92-
(<a href={"%s/stages/stage/kill?id=%s&terminate=true".format(UIUtils.prependBaseUri(basePath), s.stageId)}>kill</a>)
92+
(<a href={"%s/stages/stage/kill?id=%s&terminate=true".format(UIUtils.prependBaseUri(basePath), s.stageId)}
93+
onclick={"return window.confirm('Are you sure you want to kill stage %s ?');".format(s.stageId)}>kill</a>)
9394
</span>
9495
}
9596
// scalastyle:on
@@ -109,7 +110,7 @@ private[ui] class StageTableBase(
109110

110111
listener.stageIdToDescription.get(s.stageId)
111112
.map(d => <div><em>{d}</em></div><div>{nameLink} {killLink}</div>)
112-
.getOrElse(<div>{killLink} {nameLink} {details}</div>)
113+
.getOrElse(<div>{nameLink} {killLink} {details}</div>)
113114
}
114115

115116
protected def stageRow(s: StageInfo): Seq[Node] = {

0 commit comments

Comments
 (0)