Skip to content

Commit

Permalink
Merge pull request quarkusio#15529 from phillip-kruger/log-manager-pa…
Browse files Browse the repository at this point in the history
…th-fix

Small path fix for the dev ui
  • Loading branch information
geoand authored Mar 8, 2021
2 parents f9bd501 + 0abeb60 commit 0ec090d
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class DevConsole implements Handler<RoutingContext> {
DevConsole(Engine engine, String httpRootPath, String frameworkRootPath) {
this.engine = engine;
this.globalData.put("httpRootPath", httpRootPath);
this.globalData.put("frameworkRootPath", frameworkRootPath);
this.globalData.put("frameworkRootPath", cleanFrameworkRootPath(frameworkRootPath));
this.globalData.put("quarkusVersion", Version.getVersion());
this.globalData.put("applicationName", config.getOptionalValue("quarkus.application.name", String.class).orElse(""));
this.globalData.put("applicationVersion",
Expand Down Expand Up @@ -97,6 +97,19 @@ public void handle(RoutingContext ctx) {
}
}

/**
* This removes the last / from the path
*
* @param p the path
* @return the path without the last /
*/
private String cleanFrameworkRootPath(String p) {
if (p != null && !p.isEmpty() && p.endsWith("/")) {
return p.substring(0, p.length() - 1);
}
return p;
}

private String getExtensionName(String namespace) {
Map<String, Object> map = extensions.get(namespace);
if (map == null)
Expand Down

0 comments on commit 0ec090d

Please sign in to comment.