You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/15 15:34:27 UTC

[GitHub] [spark] sarutak commented on a change in pull request #29757: [SPARK-32886][WEBUI] fix 'undefined' link in event timeline view

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org