Skip to content

Commit 67629f5

Browse files
committed
Various small tweaks
1 parent cd1d411 commit 67629f5

File tree

7 files changed

+78
-81
lines changed

7 files changed

+78
-81
lines changed

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

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ div#application-timeline, div#job-timeline {
2323
margin-top: 5px;
2424
}
2525

26+
.vis.timeline {
27+
line-height: 14px;
28+
}
29+
2630
.vis.timeline div.content {
2731
width: 100%;
2832
}
@@ -32,125 +36,131 @@ div#application-timeline, div#job-timeline {
3236
}
3337

3438
.vis.timeline .item.stage.succeeded {
35-
background-color: #D5DDF6;
39+
background-color: #A0DFFF;
40+
border-color: #3EC0FF;
3641
}
3742

3843
.vis.timeline .item.stage.succeeded.selected {
39-
background-color: #D5DDF6;
40-
border-color: #97B0F8;
41-
z-index: auto;
44+
background-color: #A0DFFF;
45+
border-color: #3EC0FF;
46+
z-index: auto;
4247
}
4348

4449
.legend-area rect.completed-stage-legend {
45-
fill: #D5DDF6;
46-
stroke: #97B0F8;
50+
fill: #A0DFFF;
51+
stroke: #3EC0FF;
4752
}
4853

4954
.vis.timeline .item.stage.failed {
50-
background-color: #FF5475;
55+
background-color: #ffa1b0;
56+
border-color: #ff4d6d;
5157
}
5258

5359
.vis.timeline .item.stage.failed.selected {
54-
background-color: #FF5475;
55-
border-color: #97B0F8;
56-
z-index: auto;
60+
background-color: #ffa1b0;
61+
border-color: #ff4d6d;
62+
z-index: auto;
5763
}
5864

5965
.legend-area rect.failed-stage-legend {
60-
fill: #FF5475;
61-
stroke: #97B0F8;
66+
fill: #ffa1b0;
67+
stroke: #ff4d6d;
6268
}
6369

6470
.vis.timeline .item.stage.running {
65-
background-color: #FDFFCA;
71+
background-color: #a3ffc2;
72+
border-color: #36f572;
6673
}
6774

6875
.vis.timeline .item.stage.running.selected {
69-
background-color: #FDFFCA;
70-
border-color: #97B0F8;
71-
z-index: auto;
76+
background-color: #a3ffc2;
77+
border-color: #36f572;
78+
z-index: auto;
7279
}
7380

7481
.legend-area rect.active-stage-legend {
75-
fill: #FDFFCA;
76-
stroke: #97B0F8;
82+
fill: #a3ffc2;
83+
stroke: #36f572;
7784
}
7885

7986
.vis.timeline .item.job {
8087
cursor: pointer;
8188
}
8289

8390
.vis.timeline .item.job.succeeded {
84-
background-color: #D5DDF6;
91+
background-color: #A0DFFF;
8592
}
8693

8794
.vis.timeline .item.job.succeeded.selected {
88-
background-color: #D5DDF6;
89-
border-color: #97B0F8;
90-
z-index: auto;
95+
background-color: #A0DFFF;
96+
border-color: #3EC0FF;
97+
z-index: auto;
9198
}
9299

93100
.legend-area rect.succeeded-job-legend {
94-
fill: #D5DDF6;
95-
stroke: #97B0F8;
101+
fill: #A0DFFF;
102+
stroke: #3EC0FF;
96103
}
97104

98105
.vis.timeline .item.job.failed {
99-
background-color: #FF5475;
106+
background-color: #ffa1b0;
107+
border-color: #ff4d6d;
100108
}
101109

102110
.vis.timeline .item.job.failed.selected {
103-
background-color: #FF5475;
104-
border-color: #97B0F8;
105-
z-index: auto;
111+
background-color: #ffa1b0;
112+
border-color: #ff4d6d;
113+
z-index: auto;
106114
}
107115

108116
.legend-area rect.failed-job-legend {
109-
fill: #FF5475;
110-
stroke: #97B0F8;
117+
fill: #ffa1b0;
118+
stroke: #ff4d6d;
111119
}
112120

113121
.vis.timeline .item.job.running {
114-
background-color: #FDFFCA;
122+
background-color: #a3ffc2;
123+
border-color: #36f572;
115124
}
116125

117126
.vis.timeline .item.job.running.selected {
118-
background-color: #FDFFCA;
119-
border-color: #97B0F8;
120-
z-index: auto;
127+
background-color: #a3ffc2;
128+
border-color: #36f572;
129+
z-index: auto;
121130
}
122131

123132
.legend-area rect.running-job-legend {
124-
fill: #FDFFCA;
125-
stroke: #97B0F8;
133+
fill: #a3ffc2;
134+
stroke: #36f572;
126135
}
127136

128137
.vis.timeline .item.executor.added {
129-
background-color: #D5DDF6;
138+
background-color: #A0DFFF;
130139
}
131140

132141
.legend-area rect.executor-added-legend {
133-
fill: #D5DDF6;
134-
stroke: #97B0F8;
142+
fill: #A0DFFF;
143+
stroke: #3EC0FF;
135144
}
136145

137146
.vis.timeline .item.executor.removed {
138-
background-color: #EBCA59;
147+
background-color: #ffa1b0;
148+
border-color: #ff4d6d;
139149
}
140150

141151
.legend-area rect.executor-removed-legend {
142-
fill: #EBCA59;
143-
stroke: #97B0F8;
152+
fill: #ffa1b0;
153+
stroke: #ff4d6d;
144154
}
145155

146156
.vis.timeline .item.executor.selected {
147-
border-color: #FFC200;
148-
background-color: #FFF785;
157+
background-color: #a3ffc2;
158+
border-color: #36f572;
149159
z-index: 2;
150160
}
151161

152-
tr.corresponding-item-hover>td, tr.corresponding-item-hover>th {
153-
background-color: #FFE1FA !important;
162+
tr.corresponding-item-hover > td, tr.corresponding-item-hover > th {
163+
background-color: #d6ffe4 !important;
154164
}
155165

156166
#application-timeline.collapsed {
@@ -169,7 +179,7 @@ span.expand-application-timeline, span.expand-job-timeline {
169179
cursor: pointer;
170180
}
171181

172-
.control-panel input+span {
182+
.control-panel input + span {
173183
cursor: pointer;
174184
}
175185

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ function setupExecutorEventAction() {
156156
function setupZoomable(id, timeline) {
157157
$(id + '>input[type="checkbox"]').click(function() {
158158
if (this.checked) {
159-
timeline.setOptions({zoomable: false});
160-
} else {
161159
timeline.setOptions({zoomable: true});
160+
} else {
161+
timeline.setOptions({zoomable: false});
162162
}
163163
});
164164

core/src/main/scala/org/apache/spark/ui/UIUtils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private[spark] object UIUtils extends Logging {
250250
<h3 style="vertical-align: middle; display: inline-block;">
251251
<a style="text-decoration: none" href={prependBaseUri("/")}>
252252
<img src={prependBaseUri("/static/spark-logo-77x50px-hd.png")} />
253-
<span class="version"
253+
<span class="version"
254254
style="margin-right: 15px;">{org.apache.spark.SPARK_VERSION}</span>
255255
</a>
256256
{title}
@@ -350,7 +350,7 @@ private[spark] object UIUtils extends Logging {
350350
<div>
351351
<span class="expand-dag-viz" onclick={s"toggleDagViz($forJob);"}>
352352
<span class="expand-dag-viz-arrow arrow-closed"></span>
353-
<strong>DAG visualization</strong>
353+
<strong>DAG Visualization</strong>
354354
</span>
355355
<div id="dag-viz-graph"></div>
356356
<div id="dag-viz-metadata">

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
9191
| 'content': '<div class="application-timeline-content"' +
9292
| 'data-html="true" data-placement="top" data-toggle="tooltip"' +
9393
| 'data-title="${displayJobDescription} (Job ${jobId})<br>Status: ${status}<br>' +
94-
| 'Submission Time: ${UIUtils.formatDate(new Date(submissionTime))}' +
94+
| 'Submitted: ${UIUtils.formatDate(new Date(submissionTime))}' +
9595
| '${
9696
if (status != JobExecutionStatus.RUNNING) {
97-
s"""<br>Completion Time: ${UIUtils.formatDate(new Date(completionTime))}"""
97+
s"""<br>Completed: ${UIUtils.formatDate(new Date(completionTime))}"""
9898
} else {
9999
""
100100
}
@@ -179,13 +179,13 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
179179

180180
<span class="expand-application-timeline">
181181
<span class="expand-application-timeline-arrow arrow-closed"></span>
182-
<strong>Event timeline</strong>
182+
<strong>Event Timeline</strong>
183183
</span> ++
184184
<div id="application-timeline" class="collapsed">
185185
<div class="control-panel">
186186
<div id="application-timeline-zoom-lock">
187-
<input type="checkbox" checked="checked"></input>
188-
<span>Zoom Lock</span>
187+
<input type="checkbox"></input>
188+
<span>Enable zooming</span>
189189
</div>
190190
</div>
191191
</div> ++
@@ -277,7 +277,7 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
277277
{if (parent.sc.isDefined) {
278278
// Total duration is not meaningful unless the UI is live
279279
<li>
280-
<strong>Total Duration: </strong>
280+
<strong>Total Uptime: </strong>
281281
{UIUtils.formatDuration(System.currentTimeMillis() - startTime)}
282282
</li>
283283
}}

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,6 @@ private[ui] class AllStagesPage(parent: StagesTab) extends WebUIPage("") {
6767
val summary: NodeSeq =
6868
<div>
6969
<ul class="unstyled">
70-
{
71-
if (sc.isDefined) {
72-
// Total duration is not meaningful unless the UI is live
73-
<li>
74-
<strong>Total Duration: </strong>
75-
{UIUtils.formatDuration(now - sc.get.startTime)}
76-
</li>
77-
}
78-
}
79-
<li>
80-
<strong>Scheduling Mode: </strong>
81-
{listener.schedulingMode.map(_.toString).getOrElse("Unknown")}
82-
</li>
8370
{
8471
if (shouldShowActiveStages) {
8572
<li>
@@ -139,7 +126,7 @@ private[ui] class AllStagesPage(parent: StagesTab) extends WebUIPage("") {
139126
content ++= <h4 id ="failed">Failed Stages ({numFailedStages})</h4> ++
140127
failedStagesTable.toNodeSeq
141128
}
142-
UIUtils.headerSparkPage("Spark Stages (for all jobs)", content, parent)
129+
UIUtils.headerSparkPage("Stages for All Jobs", content, parent)
143130
}
144131
}
145132
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ private[ui] class JobPage(parent: JobsTab) extends WebUIPage("job") {
161161

162162
<span class="expand-job-timeline">
163163
<span class="expand-job-timeline-arrow arrow-closed"></span>
164-
<strong>Event timeline</strong>
164+
<strong>Event Timeline</strong>
165165
</span> ++
166166
<div id="job-timeline" class="collapsed">
167167
<div class="control-panel">
168168
<div id="job-timeline-zoom-lock">
169-
<input type="checkbox" checked="checked"></input>
170-
<span>Zoom Lock</span>
169+
<input type="checkbox"></input>
170+
<span>Enable zooming</span>
171171
</div>
172172
</div>
173173
</div> ++

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
7373
<div>
7474
<ul class="unstyled">
7575
<li>
76-
<strong>Total task time across all tasks: </strong>
76+
<strong>Total Time Across All Tasks: </strong>
7777
{UIUtils.formatDuration(stageData.executorRunTime)}
7878
</li>
7979
{if (stageData.hasInput) {
@@ -90,25 +90,25 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
9090
}}
9191
{if (stageData.hasShuffleRead) {
9292
<li>
93-
<strong>Shuffle read: </strong>
93+
<strong>Shuffle Read: </strong>
9494
{s"${Utils.bytesToString(stageData.shuffleReadTotalBytes)} / " +
9595
s"${stageData.shuffleReadRecords}"}
9696
</li>
9797
}}
9898
{if (stageData.hasShuffleWrite) {
9999
<li>
100-
<strong>Shuffle write: </strong>
100+
<strong>Shuffle Write: </strong>
101101
{s"${Utils.bytesToString(stageData.shuffleWriteBytes)} / " +
102102
s"${stageData.shuffleWriteRecords}"}
103103
</li>
104104
}}
105105
{if (stageData.hasBytesSpilled) {
106106
<li>
107-
<strong>Shuffle spill (memory): </strong>
107+
<strong>Shuffle Spill (Memory): </strong>
108108
{Utils.bytesToString(stageData.memoryBytesSpilled)}
109109
</li>
110110
<li>
111-
<strong>Shuffle spill (disk): </strong>
111+
<strong>Shuffle Spill (Disk): </strong>
112112
{Utils.bytesToString(stageData.diskBytesSpilled)}
113113
</li>
114114
}}
@@ -119,7 +119,7 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
119119
<div>
120120
<span class="expand-additional-metrics">
121121
<span class="expand-additional-metrics-arrow arrow-closed"></span>
122-
<strong>Show additional metrics</strong>
122+
<strong>Show Additional Metrics</strong>
123123
</span>
124124
<div class="additional-metrics collapsed">
125125
<ul style="list-style-type:none">
@@ -449,9 +449,9 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
449449

450450
val content =
451451
summary ++
452-
showAdditionalMetrics ++
453452
dagViz ++
454453
maybeExpandDagViz ++
454+
showAdditionalMetrics ++
455455
<h4>Summary Metrics for {numCompleted} Completed Tasks</h4> ++
456456
<div>{summaryTable.getOrElse("No tasks have reported metrics yet.")}</div> ++
457457
<h4>Aggregated Metrics by Executor</h4> ++ executorTable.toNodeSeq ++

0 commit comments

Comments
 (0)