Repository: spark
Updated Branches:
  refs/heads/branch-2.3 5c1c03d08 -> 2f82c037d


[SPARK-23644][CORE][UI][BACKPORT-2.3] Use absolute path for REST call in SHS

## What changes were proposed in this pull request?

SHS is using a relative path for the REST API call to get the list of the 
application is a relative path call. In case of the SHS being consumed through 
a proxy, it can be an issue if the path doesn't end with a "/".

Therefore, we should use an absolute path for the REST call as it is done for 
all the other resources.

## How was this patch tested?

manual tests
Before the change:
![screen shot 2018-03-10 at 4 22 02 
pm](https://user-images.githubusercontent.com/8821783/37244190-8ccf9d40-2485-11e8-8fa9-345bc81472fc.png)

After the change:
![screen shot 2018-03-10 at 4 36 34 pm 
1](https://user-images.githubusercontent.com/8821783/37244201-a1922810-2485-11e8-8856-eeab2bf5e180.png)

Author: Marco Gaido <marcogaid...@gmail.com>

Closes #20847 from mgaido91/SPARK-23644_2.3.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2f82c037
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2f82c037
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2f82c037

Branch: refs/heads/branch-2.3
Commit: 2f82c037d90114705c0d0bd0bd7f82215aecfe3b
Parents: 5c1c03d
Author: Marco Gaido <marcogaid...@gmail.com>
Authored: Tue Mar 20 10:07:27 2018 +0800
Committer: jerryshao <ss...@hortonworks.com>
Committed: Tue Mar 20 10:07:27 2018 +0800

----------------------------------------------------------------------
 .../src/main/resources/org/apache/spark/ui/static/historypage.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/2f82c037/core/src/main/resources/org/apache/spark/ui/static/historypage.js
----------------------------------------------------------------------
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 2cde66b..16d59be 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
@@ -108,7 +108,7 @@ $(document).ready(function() {
     requestedIncomplete = getParameterByName("showIncomplete", searchString);
     requestedIncomplete = (requestedIncomplete == "true" ? true : false);
 
-    $.getJSON("api/v1/applications?limit=" + appLimit, 
function(response,status,jqXHR) {
+    $.getJSON(uiRoot + "/api/v1/applications?limit=" + appLimit, 
function(response,status,jqXHR) {
       var array = [];
       var hasMultipleAttempts = false;
       for (i in response) {
@@ -146,7 +146,7 @@ $(document).ready(function() {
         "showCompletedColumns": !requestedIncomplete,
       }
 
-      $.get("static/historypage-template.html", function(template) {
+      $.get(uiRoot + "/static/historypage-template.html", function(template) {
         var sibling = historySummary.prev();
         historySummary.detach();
         var apps = 
$(Mustache.render($(template).filter("#history-summary-template").html(),data));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to