Skip to content

Commit

Permalink
quarkus.application.name and quarkus.application.version are not alwa…
Browse files Browse the repository at this point in the history
…ys set

Especially when running tests.
  • Loading branch information
gsmet committed Jan 12, 2021
1 parent 17283c9 commit 08cb956
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ public class DevConsole implements Handler<RoutingContext> {
this.globalData.put("httpRootPath", httpRootPath);
this.globalData.put("frameworkRootPath", frameworkRootPath);
this.globalData.put("quarkusVersion", Version.getVersion());
this.globalData.put("applicationName", config.getValue("quarkus.application.name", String.class));
this.globalData.put("applicationVersion", config.getValue("quarkus.application.version", String.class));
this.globalData.put("applicationName", config.getOptionalValue("quarkus.application.name", String.class).orElse(""));
this.globalData.put("applicationVersion",
config.getOptionalValue("quarkus.application.version", String.class).orElse(""));

try {
Enumeration<URL> extensionDescriptors = getClass().getClassLoader()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
{#if currentExtensionName && currentExtensionName != 'Eclipse Vert.x - HTTP'}
{currentExtensionName} /
{/if}
{#insert title/} |
{applicationName} {applicationVersion}
{#insert title/}
{#if applicationName and applicationVersion} | {applicationName} {applicationVersion}{/if}
</title>
</head>
<body>
Expand All @@ -31,7 +31,7 @@
<span id="navbar_title" class="align-middle">Dev Console</span>
</a>
<span class="navbar-text">
{applicationName} {applicationVersion} (powered by Quarkus {quarkusVersion})
{#if applicationName and applicationVersion}{applicationName} {applicationVersion} (powered by Quarkus {quarkusVersion}){/if}
</span>
</nav>

Expand Down

0 comments on commit 08cb956

Please sign in to comment.