@@ -46,14 +46,22 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
4646 val stageAttemptId = parameterAttempt.toInt
4747 val stageDataOption = listener.stageIdToData.get((stageId, stageAttemptId))
4848
49- if (stageDataOption.isEmpty || stageDataOption.get.taskData.isEmpty) {
49+ val stageHeader = s " Details for Stage $stageId (Attempt $stageAttemptId) "
50+ if (stageDataOption.isEmpty) {
51+ val content =
52+ <div id =" no-info" >
53+ <p >No information to display for Stage {stageId} (Attempt {stageAttemptId})</p >
54+ </div >
55+ return UIUtils .headerSparkPage(stageHeader, content, parent)
56+
57+ }
58+ if (stageDataOption.get.taskData.isEmpty) {
5059 val content =
5160 <div >
5261 <h4 >Summary Metrics </h4 > No tasks have started yet
5362 <h4 >Tasks </h4 > No tasks have started yet
5463 </div >
55- return UIUtils .headerSparkPage(
56- s " Details for Stage $stageId (Attempt $stageAttemptId) " , content, parent)
64+ return UIUtils .headerSparkPage(stageHeader, content, parent)
5765 }
5866
5967 val stageData = stageDataOption.get
@@ -442,7 +450,7 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") {
442450 maybeAccumulableTable ++
443451 <h4 >Tasks </h4 > ++ taskTable
444452
445- UIUtils .headerSparkPage(" Details for Stage %d " .format(stageId) , content, parent)
453+ UIUtils .headerSparkPage(stageHeader , content, parent)
446454 }
447455 }
448456
0 commit comments