-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32307 from melloware/devui-info
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoDevUiProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.quarkus.info.deployment; | ||
|
||
import io.quarkus.deployment.IsDevelopment; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.annotations.ExecutionTime; | ||
import io.quarkus.deployment.annotations.Record; | ||
import io.quarkus.deployment.builditem.LaunchModeBuildItem; | ||
import io.quarkus.devui.spi.page.CardPageBuildItem; | ||
import io.quarkus.devui.spi.page.Page; | ||
import io.quarkus.info.runtime.InfoRecorder; | ||
import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem; | ||
import io.quarkus.vertx.http.runtime.management.ManagementInterfaceBuildTimeConfig; | ||
|
||
/** | ||
* This processor is responsible for the dev ui widget. | ||
*/ | ||
public class InfoDevUiProcessor { | ||
|
||
@BuildStep(onlyIf = IsDevelopment.class) | ||
@Record(ExecutionTime.STATIC_INIT) | ||
CardPageBuildItem create(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem, | ||
InfoBuildTimeConfig config, | ||
ManagementInterfaceBuildTimeConfig managementInterfaceBuildTimeConfig, | ||
LaunchModeBuildItem launchModeBuildItem, | ||
InfoRecorder unused) { | ||
CardPageBuildItem pageBuildItem = new CardPageBuildItem(); | ||
|
||
var path = nonApplicationRootPathBuildItem.resolveManagementPath(config.path(), | ||
managementInterfaceBuildTimeConfig, launchModeBuildItem); | ||
pageBuildItem.addPage(Page.externalPageBuilder("App Information") | ||
.icon("font-awesome-solid:circle-info") | ||
.url(path) | ||
.isJsonContent()); | ||
|
||
return pageBuildItem; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters