Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update StageTable.scala
updated
  • Loading branch information
scwf committed Mar 21, 2014
commit 2d6f4849a37015d06b112b4f8538b9bac1c2be43
6 changes: 4 additions & 2 deletions core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ private[ui] class StageTable(stages: Seq[StageInfo], parent: JobProgressUI) {

private def makeProgressBar(started: Int, completed: Int, failed: String, total: Int): Seq[Node] =
{
val completeWidth = "width: %s%%; position: absolute;".format((completed.toDouble/total)*100)
val startWidth = "width: %s%%; left: %s%%; position: absolute;".format((started.toDouble/total)*100)
val startPct = (started.toDouble/total)*100
val completePct = (completed.toDouble/total)*100
val completeWidth = "width: %s%%; position: absolute;".format(completePct)
val startWidth = "width: %s%%; left: %s%%; position: absolute;".format(startPct,completePct)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startPct, completePct (small style thing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(started.toDouble/total)_100 --> started.toDouble/total_100 . this error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's just, put a space between these:

val startWidth = "width: %s%%; left: %s%%; position: absolute;".format(startPct, completePct)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


<div class="progress">
<span style="text-align:center; position:absolute; width:100%; z-index: 1;">
Expand Down