This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new 409930d [SPARK-32028][WEBUI][2.4] fix app id link for multi attempts
app in history summary page
409930d is described below
commit 409930d8dee91def524fa94e1d8ab7a96e6289d9
Author: Zhen Li <[email protected]>
AuthorDate: Tue Jun 30 23:10:13 2020 -0700
[SPARK-32028][WEBUI][2.4] fix app id link for multi attempts app in history
summary page
This is simply a backport of https://github.com/apache/spark/pull/28867 to
branch-2.4
Closes #28949 from srowen/SPARK-32028.2.
Authored-by: Zhen Li <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../resources/org/apache/spark/ui/static/historypage-template.html | 6 +++---
core/src/main/resources/org/apache/spark/ui/static/historypage.js | 5 +++--
2 files changed, 6 insertions(+), 5 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 18d921a..c0a414b 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
@@ -72,11 +72,11 @@
<tbody>
{{#applications}}
<tr>
- <td
{{#hasMultipleAttempts}}style="background-color:#fff"{{/hasMultipleAttempts}}><span
title="{{id}}"><a
href="{{uiroot}}/history/{{id}}/{{num}}/jobs/">{{id}}</a></span></td>
- <td
{{#hasMultipleAttempts}}style="background-color:#fff"{{/hasMultipleAttempts}}>{{name}}</td>
{{#attempts}}
+ <td
{{#hasMultipleAttempts}}style="background-color:#fff"{{/hasMultipleAttempts}}><span
title="{{id}}"><a
href="{{uiroot}}/history/{{id}}{{#hasAttemptId}}/{{attemptId}}{{/hasAttemptId}}/jobs/">{{id}}</a></span></td>
+ <td
{{#hasMultipleAttempts}}style="background-color:#fff"{{/hasMultipleAttempts}}>{{name}}</td>
{{#hasMultipleAttempts}}
- <td><a
href="{{uiroot}}/history/{{id}}/{{attemptId}}/jobs/">{{attemptId}}</a></td>
+ <td><a
href="{{uiroot}}/history/{{id}}{{#hasAttemptId}}/{{attemptId}}{{/hasAttemptId}}/jobs/">{{attemptId}}</a></td>
{{/hasMultipleAttempts}}
<td>{{startTime}}</td>
{{#showCompletedColumns}}
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 abc2ec0..3a2d4a8 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
@@ -126,7 +126,7 @@ $(document).ready(function() {
if (app["attempts"].length > 1) {
hasMultipleAttempts = true;
}
- var num = app["attempts"].length;
+
for (j in app["attempts"]) {
var attempt = app["attempts"][j];
attempt["startTime"] = formatTimeMillis(attempt["startTimeEpoch"]);
@@ -136,7 +136,8 @@ $(document).ready(function() {
(attempt.hasOwnProperty("attemptId") ? attempt["attemptId"] + "/"
: "") + "logs";
attempt["durationMillisec"] = attempt["duration"];
attempt["duration"] = formatDuration(attempt["duration"]);
- var app_clone = {"id" : id, "name" : name, "num" : num, "attempts" :
[attempt]};
+ var hasAttemptId = attempt.hasOwnProperty("attemptId");
+ var app_clone = {"id" : id, "name" : name, "hasAttemptId" :
hasAttemptId, "attempts" : [attempt]};
array.push(app_clone);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]