gengliangwang commented on code in PR #36174:
URL: https://github.com/apache/spark/pull/36174#discussion_r849146039
##########
core/src/main/resources/org/apache/spark/ui/static/utils.js:
##########
@@ -184,14 +183,7 @@ function formatDate(date) {
function createRESTEndPointForExecutorsPage(appId) {
var words = getBaseURI().split('/');
- var ind = words.indexOf("proxy");
- var newBaseURI;
- if (ind > 0) {
- appId = words[ind + 1];
- newBaseURI = words.slice(0, ind + 2).join('/');
- return newBaseURI + "/api/v1/applications/" + appId + "/allexecutors";
- }
- ind = words.indexOf("history");
+ ind = words.lastIndexOf("history");
Review Comment:
If the reverse proxy URL contains "history", there is still bug.
##########
core/src/main/resources/org/apache/spark/ui/static/utils.js:
##########
@@ -149,13 +154,7 @@ function ConvertDurationString(data) {
function createTemplateURI(appId, templateName) {
var words = getBaseURI().split('/');
- var ind = words.indexOf("proxy");
- var baseURI;
- if (ind > 0) {
- baseURI = words.slice(0, ind + 1).join('/') + '/' + appId + '/static/' +
templateName + '-template.html';
- return baseURI;
- }
- ind = words.indexOf("history");
+ ind = words.lastIndexOf("history");
Review Comment:
If the reverse proxy URL contains "history", there is still bug.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]