sarutak commented on a change in pull request #29757:
URL: https://github.com/apache/spark/pull/29757#discussion_r488763955
##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray,
startTime, offset) {
return "#job-" + jobId;
};
+ var getPathForJobEntry = function(baseElem) {
+ var jobIdText =
$($(baseElem).find(".application-timeline-content")[0]).text();
+ var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+ return "job/?id=" + jobId;
Review comment:
Did you confirm this change works with HistoryServer?
The base path for `AllJobsPage` is not `/` for HistoryServer so I'm afraid
this code doesn't work with HistoryServer.
##########
File path: core/src/main/resources/org/apache/spark/ui/static/timeline-view.js
##########
@@ -50,9 +50,18 @@ function drawApplicationTimeline(groupArray, eventObjArray,
startTime, offset) {
return "#job-" + jobId;
};
+ var getPathForJobEntry = function(baseElem) {
+ var jobIdText =
$($(baseElem).find(".application-timeline-content")[0]).text();
+ var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
+ return "job/?id=" + jobId;
+ };
+
$(this).click(function() {
var jobPagePath =
$(getSelectorForJobEntry(this)).find("a.name-link").attr("href");
- window.location.href = jobPagePath
+ if (jobPagePath == undefined) {
Review comment:
Do we need this `if` branch?
If we can unify the two pieces of code for `jobPagePath` with the new logic,
can we remove away this `if` branch?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]