diff --git a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoDevUIProcessor.java b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoDevUIProcessor.java index 8c1e87051ea77..c33392ff490a1 100644 --- a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoDevUIProcessor.java +++ b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoDevUIProcessor.java @@ -1,10 +1,13 @@ package io.quarkus.info.deployment; import io.quarkus.deployment.IsDevelopment; +import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.LaunchModeBuildItem; +import io.quarkus.devui.spi.page.CardPageBuildItem; import io.quarkus.devui.spi.page.MenuPageBuildItem; import io.quarkus.devui.spi.page.Page; +import io.quarkus.devui.spi.page.WebComponentPageBuilder; import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem; import io.quarkus.vertx.http.runtime.management.ManagementInterfaceBuildTimeConfig; @@ -14,27 +17,36 @@ public class InfoDevUIProcessor { @BuildStep(onlyIf = IsDevelopment.class) - MenuPageBuildItem create(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem, + void create(BuildProducer menuPageProducer, + BuildProducer cardPageProducer, + NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem, InfoBuildTimeConfig config, ManagementInterfaceBuildTimeConfig managementInterfaceBuildTimeConfig, LaunchModeBuildItem launchModeBuildItem) { - MenuPageBuildItem pageBuildItem = new MenuPageBuildItem(); var path = nonApplicationRootPathBuildItem.resolveManagementPath(config.path(), managementInterfaceBuildTimeConfig, launchModeBuildItem); - pageBuildItem.addBuildTimeData("infoUrl", path); + MenuPageBuildItem menuBuildItem = new MenuPageBuildItem(); - pageBuildItem.addPage(Page.webComponentPageBuilder() + menuBuildItem.addBuildTimeData("infoUrl", path); + + WebComponentPageBuilder infoPage = Page.webComponentPageBuilder() .title("Information") .icon("font-awesome-solid:circle-info") - .componentLink("qwc-info.js")); - pageBuildItem.addPage(Page.externalPageBuilder("Raw") + .componentLink("qwc-info.js"); + + menuBuildItem.addPage(infoPage); + menuBuildItem.addPage(Page.externalPageBuilder("Raw") .url(path) .icon("font-awesome-solid:circle-info") .isJsonContent()); - return pageBuildItem; + menuPageProducer.produce(menuBuildItem); + + CardPageBuildItem cardBuildItem = new CardPageBuildItem(); + cardBuildItem.addPage(infoPage); + cardPageProducer.produce(cardBuildItem); } }