Skip to content

Commit f130a36

Browse files
committed
[SPARK-23644][CORE][UI] Use absolute path for REST call in SHS
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. 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 <marcogaido91@gmail.com> Closes #20794 from mgaido91/SPARK-23644.
1 parent 285b841 commit f130a36

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
@@ -108,7 +108,7 @@ $(document).ready(function() {
108108
requestedIncomplete = getParameterByName("showIncomplete", searchString);
109109
requestedIncomplete = (requestedIncomplete == "true" ? true : false);
110110

111-
$.getJSON("api/v1/applications?limit=" + appLimit, function(response,status,jqXHR) {
111+
$.getJSON(uiRoot + "/api/v1/applications?limit=" + appLimit, function(response,status,jqXHR) {
112112
var array = [];
113113
var hasMultipleAttempts = false;
114114
for (i in response) {
@@ -146,7 +146,7 @@ $(document).ready(function() {
146146
"showCompletedColumns": !requestedIncomplete,
147147
}
148148

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

0 commit comments

Comments
 (0)