Skip to content

Commit 5bef4fe

Browse files
seancxmaosrowen
authored andcommitted
[SPARK-26444][WEBUI] Stage color doesn't change with it's status
## What changes were proposed in this pull request? On job page, in event timeline section, stage color doesn't change according to its status. Below are some screenshots. ACTIVE: <img width="550" alt="active" src="https://user-images.githubusercontent.com/12194089/50438844-c763e580-092a-11e9-84f6-6fc30e08d69b.png"> COMPLETE: <img width="516" alt="complete" src="https://user-images.githubusercontent.com/12194089/50438847-ca5ed600-092a-11e9-9d2e-5d79807bc1ce.png"> FAILED: <img width="325" alt="failed" src="https://user-images.githubusercontent.com/12194089/50438852-ccc13000-092a-11e9-9b6b-782b96b283b1.png"> This PR lets stage color change with it's status. The main idea is to make css style class name match the corresponding stage status. ## How was this patch tested? Manually tested locally. ``` // active/complete stage sc.parallelize(1 to 3, 3).map { n => Thread.sleep(10* 1000); n }.count // failed stage sc.parallelize(1 to 3, 3).map { n => Thread.sleep(10* 1000); throw new Exception() }.count ``` Note we need to clear browser cache to let new `timeline-view.css` take effect. Below are screenshots after this PR. ACTIVE: <img width="569" alt="active-after" src="https://user-images.githubusercontent.com/12194089/50439986-08f68f80-092f-11e9-85d9-be1c31aed13b.png"> COMPLETE: <img width="567" alt="complete-after" src="https://user-images.githubusercontent.com/12194089/50439990-0bf18000-092f-11e9-8624-723958906e90.png"> FAILED: <img width="352" alt="failed-after" src="https://user-images.githubusercontent.com/12194089/50439993-101d9d80-092f-11e9-8dfd-3e20536f2fa5.png"> Closes #23385 from seancxmao/timeline-stage-color. Authored-by: seancxmao <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent f2adb61 commit 5bef4fe

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/src/main/resources/org/apache/spark/ui/static/timeline-view.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ rect.getting-result-time-proportion {
9898
cursor: pointer;
9999
}
100100

101-
.vis-timeline .vis-item.stage.succeeded {
101+
.vis-timeline .vis-item.stage.complete {
102102
background-color: #A0DFFF;
103103
border-color: #3EC0FF;
104104
}
105105

106-
.vis-timeline .vis-item.stage.succeeded.vis-selected {
106+
.vis-timeline .vis-item.stage.complete.vis-selected {
107107
background-color: #A0DFFF;
108108
border-color: #3EC0FF;
109109
z-index: auto;
@@ -130,12 +130,12 @@ rect.getting-result-time-proportion {
130130
stroke: #FF4D6D;
131131
}
132132

133-
.vis-timeline .vis-item.stage.running {
133+
.vis-timeline .vis-item.stage.active {
134134
background-color: #A2FCC0;
135135
border-color: #36F572;
136136
}
137137

138-
.vis-timeline .vis-item.stage.running.vis-selected {
138+
.vis-timeline .vis-item.stage.active.vis-selected {
139139
background-color: #A2FCC0;
140140
border-color: #36F572;
141141
z-index: auto;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private[ui] class JobPage(parent: JobsTab, store: AppStatusStore) extends WebUIP
6262
val stageId = stage.stageId
6363
val attemptId = stage.attemptId
6464
val name = stage.name
65-
val status = stage.status.toString
65+
val status = stage.status.toString.toLowerCase(Locale.ROOT)
6666
val submissionTime = stage.submissionTime.get.getTime()
6767
val completionTime = stage.completionTime.map(_.getTime())
6868
.getOrElse(System.currentTimeMillis())

0 commit comments

Comments
 (0)