Skip to content

Commit 5aa3850

Browse files
mgaido91mstewart141
authored andcommitted
[SPARK-23644][CORE][UI] 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 <[email protected]> Closes apache#20794 from mgaido91/SPARK-23644.
1 parent 52e4e7e commit 5aa3850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/resources/org/apache/spark/ui/static/historypage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ $(document).ready(function() {
113113
status: (requestedIncomplete ? "running" : "completed")
114114
};
115115

116-
$.getJSON("api/v1/applications", appParams, function(response,status,jqXHR) {
116+
$.getJSON(uiRoot + "/api/v1/applications", appParams, function(response,status,jqXHR) {
117117
var array = [];
118118
var hasMultipleAttempts = false;
119119
for (i in response) {
@@ -151,7 +151,7 @@ $(document).ready(function() {
151151
"showCompletedColumns": !requestedIncomplete,
152152
}
153153

154-
$.get("static/historypage-template.html", function(template) {
154+
$.get(uiRoot + "/static/historypage-template.html", function(template) {
155155
var sibling = historySummary.prev();
156156
historySummary.detach();
157157
var apps = $(Mustache.render($(template).filter("#history-summary-template").html(),data));

0 commit comments

Comments
 (0)