keith-turner commented on code in PR #5729:
URL: https://github.com/apache/accumulo/pull/5729#discussion_r2195710581
##########
server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java:
##########
@@ -57,7 +57,11 @@ public EmbeddedWebServer(Monitor monitor, int port) {
handler =
new ServletContextHandler(ServletContextHandler.SESSIONS |
ServletContextHandler.SECURITY);
handler.getSessionHandler().getSessionCookieConfig().setHttpOnly(true);
- handler.setContextPath("/");
+ // Remove trailing slash since jetty will warn otherwise
Review Comment:
This used to always set context path to `"/"`. If I am following these new
changes it seems like when the defaults are used for this that it will now set
context path to `""`, does that change in default behavior matter? Not sure
what is done w/ this context path.
##########
server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java:
##########
@@ -93,12 +93,21 @@ private void addExternalResources(Map<String,Object> model)
{
}
private Map<String,Object> getModel() {
+ AccumuloConfiguration conf = monitor.getContext().getConfiguration();
+ String rootContext = conf.get(Property.MONITOR_ROOT_CONTEXT);
+ if (!rootContext.startsWith("/")) {
Review Comment:
I do not understand why these slashes are being added, but I am not familiar
w/ the broader code here (only looking at this diff). Would a comment here
explaing why these slashes need to be added be useful? Or if someone
understood the broader code would it make sense w/o comment? Don't want to
encourage adding uneeded comments.
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -340,21 +340,21 @@ function doLoggedPostCall(call, callback, shouldSanitize)
{
* stores it on a sessionStorage variable
*/
function getManager() {
- return getJSONForTable('/rest/manager', 'manager');
+ return getJSONForTable(contextPath + 'rest/manager', 'manager');
Review Comment:
Where does contextPath get set? I did not see it being defined in this file.
--
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]