From 6a6705d0f29d2dc16089ede0f48ec5f39b207f88 Mon Sep 17 00:00:00 2001 From: Matei Zaharia Date: Tue, 5 May 2015 23:55:55 -0400 Subject: [PATCH] More fixes --- .../apache/spark/ui/static/timeline-view.css | 34 ++++++++++++++---- .../org/apache/spark/ui/static/webui.css | 36 ++++++++++++++----- .../scala/org/apache/spark/ui/UIUtils.scala | 14 +++++--- .../apache/spark/ui/jobs/AllJobsPage.scala | 15 ++++---- .../org/apache/spark/ui/jobs/JobPage.scala | 15 ++++---- .../org/apache/spark/ui/jobs/StagePage.scala | 4 +-- 6 files changed, 84 insertions(+), 34 deletions(-) diff --git a/core/src/main/resources/org/apache/spark/ui/static/timeline-view.css b/core/src/main/resources/org/apache/spark/ui/static/timeline-view.css index dba5a43eb8829..da1e27fd4c2ab 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/timeline-view.css +++ b/core/src/main/resources/org/apache/spark/ui/static/timeline-view.css @@ -68,18 +68,18 @@ div#application-timeline, div#job-timeline { } .vis.timeline .item.stage.running { - background-color: #a3ffc2; + background-color: #a2fcc0; border-color: #36f572; } .vis.timeline .item.stage.running.selected { - background-color: #a3ffc2; + background-color: #a2fcc0; border-color: #36f572; z-index: auto; } .legend-area rect.active-stage-legend { - fill: #a3ffc2; + fill: #a2fcc0; stroke: #36f572; } @@ -89,6 +89,7 @@ div#application-timeline, div#job-timeline { .vis.timeline .item.job.succeeded { background-color: #A0DFFF; + border-color: #3EC0FF; } .vis.timeline .item.job.succeeded.selected { @@ -119,23 +120,24 @@ div#application-timeline, div#job-timeline { } .vis.timeline .item.job.running { - background-color: #a3ffc2; + background-color: #a2fcc0; border-color: #36f572; } .vis.timeline .item.job.running.selected { - background-color: #a3ffc2; + background-color: #a2fcc0; border-color: #36f572; z-index: auto; } .legend-area rect.running-job-legend { - fill: #a3ffc2; + fill: #a2fcc0; stroke: #36f572; } .vis.timeline .item.executor.added { background-color: #A0DFFF; + border-color: #3EC0FF; } .legend-area rect.executor-added-legend { @@ -154,7 +156,7 @@ div#application-timeline, div#job-timeline { } .vis.timeline .item.executor.selected { - background-color: #a3ffc2; + background-color: #a2fcc0; border-color: #36f572; z-index: 2; } @@ -175,6 +177,10 @@ tr.corresponding-item-hover > td, tr.corresponding-item-hover > th { margin-bottom: 5px; } +.control-panel input[type="checkbox"] { + margin: 0; +} + span.expand-application-timeline, span.expand-job-timeline { cursor: pointer; } @@ -190,3 +196,17 @@ span.expand-application-timeline, span.expand-job-timeline { .vis.timeline .item .tooltip-inner { max-width: unset !important; } + +.vispanel.center { + font-size: 12px; + line-height: 12px; +} + +.legend-area text { + fill: #4d4d4d; +} + +.additional-metrics ul { + list-style: none; + margin-left: 15px; +} diff --git a/core/src/main/resources/org/apache/spark/ui/static/webui.css b/core/src/main/resources/org/apache/spark/ui/static/webui.css index 669ad48937c05..e7c1d475d4e52 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/webui.css +++ b/core/src/main/resources/org/apache/spark/ui/static/webui.css @@ -106,14 +106,18 @@ span.rest-uri { } pre { - font-size: 0.8em; + font-size: 12px; + line-height: 18px; + padding: 6px; + margin: 0; + border-radius: 3px; } .stage-details { max-height: 100px; overflow-y: auto; margin: 0; - transition: max-height 0.5s ease-out, padding 0.5s ease-out; + transition: max-height 0.25s ease-out, padding 0.25s ease-out; } .stage-details.collapsed { @@ -135,7 +139,7 @@ pre { max-height: 300px; overflow-y: auto; margin: 0; - transition: max-height 0.5s ease-out, padding 0.5s ease-out; + transition: max-height 0.25s ease-out, padding 0.25s ease-out; } .stacktrace-details.collapsed { @@ -158,7 +162,7 @@ span.additional-metric-title { } .tooltip { - font-weight: normal; + font-weight: normal; } .arrow-open { @@ -166,9 +170,9 @@ span.additional-metric-title { height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; - border-top: 5px solid black; - float: left; - margin-top: 6px; + border-top: 5px solid #08c; + display: inline-block; + margin-bottom: 2px; } .arrow-closed { @@ -176,8 +180,10 @@ span.additional-metric-title { height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; - border-left: 5px solid black; + border-left: 5px solid #08c; display: inline-block; + margin-left: 2px; + margin-right: 3px; } .version { @@ -196,3 +202,17 @@ span.additional-metric-title { .serialization_time, .getting_result_time { display: none; } + +.accordion-inner { + background: #f5f5f5; +} + +.accordion-inner pre { + border: 0; + padding: 0; + background: none; +} + +a.expandbutton { + cursor: pointer; +} diff --git a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala index 5610f01fcdc82..9668194261182 100644 --- a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala +++ b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala @@ -156,10 +156,14 @@ private[spark] object UIUtils extends Logging { def commonHeaderNodes: Seq[Node] = { - - - - + + + + @@ -350,7 +354,7 @@ private[spark] object UIUtils extends Logging {
- DAG Visualization + DAG Visualization
diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala b/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala index bff7e22f31172..3ef04a0178553 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala @@ -18,7 +18,7 @@ package org.apache.spark.ui.jobs import scala.collection.mutable.{HashMap, ListBuffer} -import scala.xml.{Node, NodeSeq, Unparsed} +import scala.xml.{Node, NodeSeq, Unparsed, Utility} import java.util.Date import javax.servlet.http.HttpServletRequest @@ -81,6 +81,9 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") { case JobExecutionStatus.RUNNING => "running" } + // The timeline library treats contents as HTML, so we have to escape them; for the + // data-title attribute string we have to escape them twice since that's in a string. + val escapedDesc = Utility.escape(displayJobDescription) val jobEventJsonAsStr = s""" |{ @@ -90,7 +93,8 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") { | 'end': new Date(${completionTime}), | 'content': '
' + + | 'Status: ${status}
' + | 'Submitted: ${UIUtils.formatDate(new Date(submissionTime))}' + | '${ if (status != JobExecutionStatus.RUNNING) { @@ -99,7 +103,7 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") { "" } }">' + - | '${displayJobDescription} (Job ${jobId})
' + | '${escapedDesc} (Job ${jobId})
' |} """.stripMargin jobEventJsonAsStr @@ -179,7 +183,7 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") { - Event Timeline + Event Timeline ++