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 2021/03/19 17:36:17 UTC

[GitHub] [spark] gengliangwang commented on a change in pull request #31774: [SPARK-34659] Fix that Web UI always correctly get appId

gengliangwang commented on a change in pull request #31774:
URL: https://github.com/apache/spark/pull/31774#discussion_r597861796



##########
File path: core/src/main/resources/org/apache/spark/ui/static/utils.js
##########
@@ -90,26 +90,27 @@ function formatLogsCells(execLogs, type) {
 }
 
 function getStandAloneAppId(cb) {
-  var words = document.baseURI.split('/');
-  var ind = words.indexOf("proxy");
-  if (ind > 0) {
-    var appId = words[ind + 1];
-    cb(appId);
-    return;
-  }
-  ind = words.indexOf("history");
-  if (ind > 0) {
-    var appId = words[ind + 1];
-    cb(appId);
-    return;
-  }
   // Looks like Web UI is running in standalone mode
   // Let's get application-id using REST End Point
   $.getJSON(uiRoot + "/api/v1/applications", function(response, status, jqXHR) {
     if (response && response.length > 0) {
       var appId = response[0].id;
       cb(appId);
       return;
+    } else {
+      var words = document.baseURI.split('/');

Review comment:
       BTW, have you tested the code changes for Spark UI behind proxy and Spark UI of History server?




-- 
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