Skip to content

Commit b09d0c5

Browse files
committed
Move stroke and fill attribute of rect elements to css
1 parent d3c63c8 commit b09d0c5

File tree

3 files changed

+62
-22
lines changed

3 files changed

+62
-22
lines changed

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

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ div#application-timeline, div#job-timeline {
2727
width: 100%;
2828
}
2929

30+
.vis.timeline .item.stage {
31+
cursor: pointer;
32+
}
33+
3034
.vis.timeline .item.stage.succeeded {
3135
background-color: #D5DDF6;
3236
}
@@ -37,8 +41,9 @@ div#application-timeline, div#job-timeline {
3741
z-index: auto;
3842
}
3943

40-
.vis.timeline .item.stage {
41-
cursor: pointer;
44+
.legend-area rect.completed-stage-legend {
45+
fill: #D5DDF6;
46+
stroke: #97B0F8;
4247
}
4348

4449
.vis.timeline .item.stage.failed {
@@ -51,6 +56,11 @@ div#application-timeline, div#job-timeline {
5156
z-index: auto;
5257
}
5358

59+
.legend-area rect.failed-stage-legend {
60+
fill: #FF5475;
61+
stroke: #97B0F8;
62+
}
63+
5464
.vis.timeline .item.stage.running {
5565
background-color: #FDFFCA;
5666
}
@@ -61,6 +71,11 @@ div#application-timeline, div#job-timeline {
6171
z-index: auto;
6272
}
6373

74+
.legend-area rect.active-stage-legend {
75+
fill: #FDFFCA;
76+
stroke: #97B0F8;
77+
}
78+
6479
.vis.timeline .item.job {
6580
cursor: pointer;
6681
}
@@ -75,6 +90,11 @@ div#application-timeline, div#job-timeline {
7590
z-index: auto;
7691
}
7792

93+
.legend-area rect.succeeded-job-legend {
94+
fill: #D5DDF6;
95+
stroke: #97B0F8;
96+
}
97+
7898
.vis.timeline .item.job.failed {
7999
background-color: #FF5475;
80100
}
@@ -85,6 +105,11 @@ div#application-timeline, div#job-timeline {
85105
z-index: auto;
86106
}
87107

108+
.legend-area rect.failed-job-legend {
109+
fill: #FF5475;
110+
stroke: #97B0F8;
111+
}
112+
88113
.vis.timeline .item.job.running {
89114
background-color: #FDFFCA;
90115
}
@@ -95,14 +120,29 @@ div#application-timeline, div#job-timeline {
95120
z-index: auto;
96121
}
97122

123+
.legend-area rect.running-job-legend {
124+
fill: #FDFFCA;
125+
stroke: #97B0F8;
126+
}
127+
98128
.vis.timeline .item.executor.added {
99129
background-color: #D5DDF6;
100130
}
101131

132+
.legend-area rect.executor-added-legend {
133+
fill: #D5DDF6;
134+
stroke: #97B0F8;
135+
}
136+
102137
.vis.timeline .item.executor.removed {
103138
background-color: #EBCA59;
104139
}
105140

141+
.legend-area rect.executor-removed-legend {
142+
fill: #EBCA59;
143+
stroke: #97B0F8;
144+
}
145+
106146
.vis.timeline .item.executor.selected {
107147
border-color: #FFC200;
108148
background-color: #FFF785;

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ import org.apache.spark.JobExecutionStatus
3131
private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
3232
private val JOBS_LEGEND =
3333
<div class="legend-area"><svg width="150px" height="85px">
34-
<rect x="5px" y="5px" width="20px" height="15px"
35-
rx="2px" ry="2px" stroke="#97B0F8" fill="#D5DDF6"></rect>
34+
<rect class="succeeded-job-legend"
35+
x="5px" y="5px" width="20px" height="15px" rx="2px" ry="2px"></rect>
3636
<text x="35px" y="17px">Succeeded</text>
37-
<rect x="5px" y="30px" width="20px" height="15px"
38-
rx="2px" ry="2px" stroke="#97B0F8" fill="#FF5475"></rect>
37+
<rect class="failed-job-legend"
38+
x="5px" y="30px" width="20px" height="15px" rx="2px" ry="2px"></rect>
3939
<text x="35px" y="42px">Failed</text>
40-
<rect x="5px" y="55px" width="20px" height="15px"
41-
rx="2px" ry="2px" stroke="#97B0F8" fill="#FDFFCA"></rect>
40+
<rect class="running-job-legend"
41+
x="5px" y="55px" width="20px" height="15px" rx="2px" ry="2px"></rect>
4242
<text x="35px" y="67px">Running</text>
4343
</svg></div>.toString.filter(_ != '\n')
4444

4545
private val EXECUTORS_LEGEND =
4646
<div class="legend-area"><svg width="150px" height="55px">
47-
<rect x="5px" y="5px" width="20px" height="15px"
48-
rx="2px" ry="2px" stroke="#97B0F8" fill="#D5DDF6"></rect>
47+
<rect class="executor-added-legend"
48+
x="5px" y="5px" width="20px" height="15px" rx="2px" ry="2px"></rect>
4949
<text x="35px" y="17px">Added</text>
50-
<rect x="5px" y="30px" width="20px" height="15px"
51-
rx="2px" ry="2px" stroke="#97B0F8" fill="#EBCA59"></rect>
50+
<rect class="executor-removed-legend"
51+
x="5px" y="30px" width="20px" height="15px" rx="2px" ry="2px"></rect>
5252
<text x="35px" y="42px">Removed</text>
5353
</svg></div>.toString.filter(_ != '\n')
5454

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@ import org.apache.spark.ui.jobs.UIData.ExecutorUIData
3333
private[ui] class JobPage(parent: JobsTab) extends WebUIPage("job") {
3434
private val STAGES_LEGEND =
3535
<div class="legend-area"><svg width="150px" height="85px">
36-
<rect x="5px" y="5px" width="20px" height="15px"
37-
rx="2px" ry="2px" stroke="#97B0F8" fill="#D5DDF6"></rect>
36+
<rect class="completed-stage-legend"
37+
x="5px" y="5px" width="20px" height="15px" rx="2px" ry="2px"></rect>
3838
<text x="35px" y="17px">Completed</text>
39-
<rect x="5px" y="30px" width="20px" height="15px"
40-
rx="2px" ry="2px" stroke="#97B0F8" fill="#FF5475"></rect>
39+
<rect class="failed-stage-legend"
40+
x="5px" y="30px" width="20px" height="15px" rx="2px" ry="2px"></rect>
4141
<text x="35px" y="42px">Failed</text>
42-
<rect x="5px" y="55px" width="20px" height="15px"
43-
rx="2px" ry="2px" stroke="#97B0F8" fill="#FDFFCA"></rect>
42+
<rect class="active-stage-legend"
43+
x="5px" y="55px" width="20px" height="15px" rx="2px" ry="2px"></rect>
4444
<text x="35px" y="67px">Active</text>
4545
</svg></div>.toString.filter(_ != '\n')
4646

4747
private val EXECUTORS_LEGEND =
4848
<div class="legend-area"><svg width="150px" height="55px">
49-
<rect x="5px" y="5px" width="20px" height="15px"
50-
rx="2px" ry="2px" stroke="#97B0F8" fill="#D5DDF6"></rect>
49+
<rect class="executor-added-legend"
50+
x="5px" y="5px" width="20px" height="15px" rx="2px" ry="2px"></rect>
5151
<text x="35px" y="17px">Executor Added</text>
52-
<rect x="5px" y="30px" width="20px" height="15px"
53-
rx="2px" ry="2px" stroke="#97B0F8" fill="#EBCA59"></rect>
52+
<rect class="executor-removed-legend"
53+
x="5px" y="30px" width="20px" height="15px" rx="2px" ry="2px"></rect>
5454
<text x="35px" y="42px">Executor Removed</text>
5555
</svg></div>.toString.filter(_ != '\n')
5656

0 commit comments

Comments
 (0)