pefernan commented on code in PR #2167: URL: https://github.com/apache/incubator-kie-tools/pull/2167#discussion_r1534761064
########## packages/sonataflow-quarkus-devui-extension-parent/sonataflow-quarkus-devui-extension-deployment/src/main/resources/dev-templates/embedded.html: ########## @@ -0,0 +1,53 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<a href="{urlbase}/workflowInstances" class="badge badge-light"> Review Comment: Quarkus `3.8` completelly removes the DevUI v1, this isn't needed anymore ########## packages/sonataflow-quarkus-devui-extension-parent/sonataflow-quarkus-devui-extension-deployment/src/main/java/org/kie/sonataflow/swf/tools/deployment/DevConsoleProcessor.java: ########## @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.kie.sonataflow.swf.tools.deployment; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.file.Path; + +import io.quarkus.deployment.IsDevelopment; +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ConfigurationBuildItem; +import io.quarkus.deployment.builditem.LaunchModeBuildItem; +import io.quarkus.deployment.builditem.LiveReloadBuildItem; +import io.quarkus.deployment.builditem.ShutdownContextBuildItem; +import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; +import io.quarkus.deployment.util.WebJarUtil; +import io.quarkus.devui.spi.page.CardPageBuildItem; +import io.quarkus.devui.spi.page.Page; +import io.quarkus.maven.dependency.ResolvedDependency; +import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem; +import io.quarkus.vertx.http.deployment.RouteBuildItem; +import io.quarkus.vertx.http.runtime.devmode.DevConsoleRecorder; +import io.quarkus.vertx.http.runtime.management.ManagementInterfaceBuildTimeConfig; + +public class DevConsoleProcessor { + + private static final String STATIC_RESOURCES_PATH = "dev-static/"; + private static final String BASE_RELATIVE_URL = "/q/dev-v1/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension"; Review Comment: ```suggestion private static final String BASE_RELATIVE_URL = "/q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension"; ``` ########## packages/sonataflow-quarkus-devui-extension-parent/sonataflow-quarkus-devui-extension-deployment/src/main/java/org/kie/sonataflow/swf/tools/deployment/DevConsoleProcessor.java: ########## @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.kie.sonataflow.swf.tools.deployment; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.file.Path; + +import io.quarkus.deployment.IsDevelopment; +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ConfigurationBuildItem; +import io.quarkus.deployment.builditem.LaunchModeBuildItem; +import io.quarkus.deployment.builditem.LiveReloadBuildItem; +import io.quarkus.deployment.builditem.ShutdownContextBuildItem; +import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; +import io.quarkus.deployment.util.WebJarUtil; +import io.quarkus.devui.spi.page.CardPageBuildItem; +import io.quarkus.devui.spi.page.Page; +import io.quarkus.maven.dependency.ResolvedDependency; +import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem; +import io.quarkus.vertx.http.deployment.RouteBuildItem; +import io.quarkus.vertx.http.runtime.devmode.DevConsoleRecorder; +import io.quarkus.vertx.http.runtime.management.ManagementInterfaceBuildTimeConfig; + +public class DevConsoleProcessor { + + private static final String STATIC_RESOURCES_PATH = "dev-static/"; + private static final String BASE_RELATIVE_URL = "/q/dev-v1/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension"; + + @BuildStep(onlyIf = IsDevelopment.class) + public CardPageBuildItem pages(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem, + ManagementInterfaceBuildTimeConfig managementInterfaceBuildTimeConfig, + LaunchModeBuildItem launchModeBuildItem, + ConfigurationBuildItem configurationBuildItem) throws UnsupportedEncodingException { + + String uiPath = nonApplicationRootPathBuildItem.resolveManagementPath(BASE_RELATIVE_URL, + managementInterfaceBuildTimeConfig, launchModeBuildItem, true); + + String devUIUrl = getProperty(configurationBuildItem, "kogito.dev-ui.url"); + String devUIUrlQueryParam = devUIUrl != null ? "&devUIUrl=" + URLEncoder.encode(devUIUrl, "UTF-8") : ""; + + String dataIndexUrl = getProperty(configurationBuildItem, "kogito.data-index.url"); + String dataIndexUrlQueryParam = dataIndexUrl != null ? "&dataIndexUrl=" + URLEncoder.encode(dataIndexUrl, "UTF-8") : ""; + + CardPageBuildItem cardPageBuildItem = new CardPageBuildItem(); + + cardPageBuildItem.addPage(Page.externalPageBuilder("Workflows") + .url(uiPath + "/index.html?page=Workflows" + devUIUrlQueryParam + dataIndexUrlQueryParam, uiPath) + .isHtmlContent() + .icon("font-awesome-solid:diagram-project")); + + cardPageBuildItem.addPage(Page.externalPageBuilder("Monitoring") + .url(uiPath + "/index.html?page=Monitoring" + devUIUrlQueryParam + dataIndexUrlQueryParam, uiPath) + .isHtmlContent() + .icon("font-awesome-solid:gauge-high")); + + return cardPageBuildItem; + } + + @BuildStep(onlyIf = IsDevelopment.class) + @Record(ExecutionTime.RUNTIME_INIT) + public void deployStaticResources(final DevConsoleRecorder recorder, Review Comment: This `DevConsoleRecorder` will be removed in `3.8 LTS` you may need to create one as https://github.com/apache/incubator-kie-kogito-apps/commit/e7680b4aaef743f8da308c39b43433cb694323fe#diff-ac1ccd3eb1c4080808ebca25bf08032999d51511479f4219801b1e46a1562293R32 ########## packages/sonataflow-quarkus-devui-extension-parent/sonataflow-quarkus-devui-extension-deployment/src/main/java/org/kie/sonataflow/swf/tools/deployment/DevConsoleProcessor.java: ########## @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.kie.sonataflow.swf.tools.deployment; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.file.Path; + +import io.quarkus.deployment.IsDevelopment; +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.ConfigurationBuildItem; +import io.quarkus.deployment.builditem.LaunchModeBuildItem; +import io.quarkus.deployment.builditem.LiveReloadBuildItem; +import io.quarkus.deployment.builditem.ShutdownContextBuildItem; +import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; +import io.quarkus.deployment.util.WebJarUtil; +import io.quarkus.devui.spi.page.CardPageBuildItem; +import io.quarkus.devui.spi.page.Page; +import io.quarkus.maven.dependency.ResolvedDependency; +import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem; +import io.quarkus.vertx.http.deployment.RouteBuildItem; +import io.quarkus.vertx.http.runtime.devmode.DevConsoleRecorder; +import io.quarkus.vertx.http.runtime.management.ManagementInterfaceBuildTimeConfig; + +public class DevConsoleProcessor { + + private static final String STATIC_RESOURCES_PATH = "dev-static/"; + private static final String BASE_RELATIVE_URL = "/q/dev-v1/org.apache.kie.sonataflow.sonataflow-quarkus-devui-extension"; + + @BuildStep(onlyIf = IsDevelopment.class) + public CardPageBuildItem pages(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem, Review Comment: You may need to add the `List<SystemPropertyBuildItem>` as done [here](https://github.com/apache/incubator-kie-kogito-apps/commit/e7680b4aaef743f8da308c39b43433cb694323fe#diff-6c9fbb5e91f40d979005c1ddc7c3dcb3d8697207929f91a24736894974dbbdfdR53) in order to get the `data-index.url` if it's not available in the `configurationBuildItem` ########## packages/sonataflow-quarkus-devui-extension-parent/sonataflow-quarkus-devui-extension-deployment/src/main/resources/dev-templates/workflowInstances.html: ########## @@ -0,0 +1,45 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; } #envelope-app { width: 100vw; height: +calc(100vh - 98px); } {/style} {#title}Runtime UI{/title} {#body} +<div id="envelope-app"></div> Review Comment: Quarkus 3.8 completelly removes the DevUI v1, this isn't needed anymore ########## packages/sonataflow-quarkus-devui-extension-parent/sonataflow-quarkus-devui-extension-deployment/src/main/resources/dev-templates/monitoring.html: ########## @@ -0,0 +1,44 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; } #envelope-app { width: 100vw; height: Review Comment: Quarkus 3.8 completelly removes the DevUI v1, this isn't needed anymore -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
