@@ -28,6 +28,12 @@ final class StageElem(stageId: Int, numTasks: Int, keep: Boolean, name: String,
28
28
allDone0 = true
29
29
}
30
30
31
+ val extraStyle = Seq (
32
+ " word-wrap: normal" ,
33
+ " white-space: nowrap" ,
34
+ " text-align: center"
35
+ )
36
+
31
37
def init (cancelStageCommTargetName : String , sendInitCode : Boolean )(implicit publish : OutputHandler ): Unit = {
32
38
33
39
if (sendInitCode)
@@ -45,15 +51,17 @@ final class StageElem(stageId: Int, numTasks: Int, keep: Boolean, name: String,
45
51
46
52
publish.html(
47
53
s """ <div>
48
- | <span style="float: left;"> $name</span>
49
- | <span style="float: right;"><a href="#" onclick="cancelStage( $stageId);">(kill)</a></span>
54
+ | <span style="float: left; ${extraStyle.mkString( " ; " )} "> $name</span>
55
+ | <span style="float: right; ${extraStyle.mkString( " ; " )} "><a href="#" onclick="cancelStage( $stageId);">(kill)</a></span>
50
56
|</div>
57
+ |<br>
51
58
| """ .stripMargin,
52
59
id = titleDisplayId
53
60
)
61
+ // <br> above seems required put both divs on different lines in nteract
54
62
publish.html(
55
63
s """ <div class="progress">
56
- | <div class="progress-bar bg-success" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
64
+ | <div class="progress-bar bg-success" role="progressbar" style="width: 0%; ${extraStyle.mkString( " ; " )} ; color: white " aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
57
65
| 0 / $numTasks
58
66
| </div>
59
67
|</div>
@@ -86,7 +94,7 @@ final class StageElem(stageId: Int, numTasks: Int, keep: Boolean, name: String,
86
94
87
95
publish.updateHtml(
88
96
s """ <div class="progress">
89
- | <div class="progress-bar" role="progressbar" style="background-color: blue; width: $donePct%" aria-valuenow=" $donePct" aria-valuemin="0" aria-valuemax="100">
97
+ | <div class="progress-bar" role="progressbar" style="background-color: blue; width: $donePct%; ${extraStyle.mkString( " ; " )} ; color: white " aria-valuenow=" $donePct" aria-valuemin="0" aria-valuemax="100">
90
98
| $doneTasks0${if (diff == 0 ) " " else s " + $diff" } / $numTasks
91
99
| </div>
92
100
| <div class="progress-bar" role="progressbar" style="background-color: red; width: $startedPct%" aria-valuenow=" $startedPct" aria-valuemin="0" aria-valuemax="100"></div>
0 commit comments