diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/resources/org/apache/spark/ui/static/historypage-template.html | 4 | ||||
-rw-r--r-- | core/src/main/resources/org/apache/spark/ui/static/historypage.js | 19 |
2 files changed, 19 insertions, 4 deletions
diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage-template.html b/core/src/main/resources/org/apache/spark/ui/static/historypage-template.html index a2b3826dd3..e5ed5b3072 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/historypage-template.html +++ b/core/src/main/resources/org/apache/spark/ui/static/historypage-template.html @@ -64,10 +64,10 @@ <tbody> {{#applications}} <tr> - <td class="rowGroupColumn"><span title="{{id}}"><a href="/history/{{id}}/{{num}}/jobs/">{{id}}</a></span></td> + <td class="rowGroupColumn"><span title="{{id}}"><a href="{{url}}">{{id}}</a></span></td> <td class="rowGroupColumn">{{name}}</td> {{#attempts}} - <td class="attemptIDSpan"><a href="/history/{{id}}/{{attemptId}}/jobs/">{{attemptId}}</a></td> + <td class="attemptIDSpan"><a href="/history/{{id}}/{{attemptId}}/">{{attemptId}}</a></td> <td>{{startTime}}</td> <td>{{endTime}}</td> <td><span title="{{duration}}" class="durationClass">{{duration}}</span></td> diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage.js b/core/src/main/resources/org/apache/spark/ui/static/historypage.js index 167c802085..4ff083146e 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/historypage.js +++ b/core/src/main/resources/org/apache/spark/ui/static/historypage.js @@ -123,13 +123,28 @@ $(document).ready(function() { if (app["attempts"].length > 1) { hasMultipleAttempts = true; } - var num = app["attempts"].length; + + var maxAttemptId = null for (j in app["attempts"]) { var attempt = app["attempts"][j]; + if (attempt['attemptId'] != null) { + if (maxAttemptId == null || attempt['attemptId'] > maxAttemptId) { + maxAttemptId = attempt['attemptId'] + } + } + attempt["startTime"] = formatDate(attempt["startTime"]); attempt["endTime"] = formatDate(attempt["endTime"]); attempt["lastUpdated"] = formatDate(attempt["lastUpdated"]); - var app_clone = {"id" : id, "name" : name, "num" : num, "attempts" : [attempt]}; + + var url = null + if (maxAttemptId == null) { + url = "/history/" + id + "/" + } else { + url = "/history/" + id + "/" + maxAttemptId + "/" + } + + var app_clone = {"id" : id, "name" : name, "url" : url, "attempts" : [attempt]}; array.push(app_clone); } } |