Skip to content
Snippets Groups Projects
Commit d7da2b94 authored by fjh100456's avatar fjh100456 Committed by Sean Owen
Browse files

[SPARK-21135][WEB UI] On history server page,duration of incompleted...

[SPARK-21135][WEB UI] On history server page,duration of incompleted applications should be hidden instead of showing up as 0

## What changes were proposed in this pull request?

Hide duration of incompleted applications.

## How was this patch tested?

manual tests

Author: fjh100456 <fu.jinhua6@zte.com.cn>

Closes #18351 from fjh100456/master.
parent d106a74c
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
Completed Completed
</span> </span>
</th> </th>
<th> <th class="durationColumn">
<span data-toggle="tooltip" data-placement="top" title="The duration time of this application."> <span data-toggle="tooltip" data-placement="top" title="The duration time of this application.">
Duration Duration
</span> </span>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<td class="attemptIDSpan"><a href="{{uiroot}}/history/{{id}}/{{attemptId}}/jobs/">{{attemptId}}</a></td> <td class="attemptIDSpan"><a href="{{uiroot}}/history/{{id}}/{{attemptId}}/jobs/">{{attemptId}}</a></td>
<td>{{startTime}}</td> <td>{{startTime}}</td>
<td class="completedColumn">{{endTime}}</td> <td class="completedColumn">{{endTime}}</td>
<td><span title="{{duration}}" class="durationClass">{{duration}}</span></td> <td class="durationColumn"><span title="{{duration}}" class="durationClass">{{duration}}</span></td>
<td>{{sparkUser}}</td> <td>{{sparkUser}}</td>
<td>{{lastUpdated}}</td> <td>{{lastUpdated}}</td>
<td><a href="{{log}}" class="btn btn-info btn-mini">Download</a></td> <td><a href="{{log}}" class="btn btn-info btn-mini">Download</a></td>
......
...@@ -182,12 +182,17 @@ $(document).ready(function() { ...@@ -182,12 +182,17 @@ $(document).ready(function() {
for (i = 0; i < completedCells.length; i++) { for (i = 0; i < completedCells.length; i++) {
completedCells[i].style.display='none'; completedCells[i].style.display='none';
} }
}
var durationCells = document.getElementsByClassName("durationClass"); var durationCells = document.getElementsByClassName("durationColumn");
for (i = 0; i < durationCells.length; i++) { for (i = 0; i < durationCells.length; i++) {
var timeInMilliseconds = parseInt(durationCells[i].title); durationCells[i].style.display='none';
durationCells[i].innerHTML = formatDuration(timeInMilliseconds); }
} else {
var durationCells = document.getElementsByClassName("durationClass");
for (i = 0; i < durationCells.length; i++) {
var timeInMilliseconds = parseInt(durationCells[i].title);
durationCells[i].innerHTML = formatDuration(timeInMilliseconds);
}
} }
if ($(selector.concat(" tr")).length < 20) { if ($(selector.concat(" tr")).length < 20) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment