From 3c63f9f7e39a7ca33a142ecaa92ad798ab0f54c6 Mon Sep 17 00:00:00 2001 From: SaumyaSingh1 Date: Tue, 23 Feb 2021 19:10:47 +0530 Subject: [PATCH] DEV UI: adding filters --- .../devconsole/DevConsoleProcessor.java | 18 ++++---- .../resources/dev-templates/embedded.html | 4 +- .../main/resources/dev-templates/filters.html | 46 ------------------- 3 files changed, 9 insertions(+), 59 deletions(-) delete mode 100644 extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/filters.html diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/devconsole/DevConsoleProcessor.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/devconsole/DevConsoleProcessor.java index 7585348e7e7bcd..3b9c6462bf5575 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/devconsole/DevConsoleProcessor.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/devconsole/DevConsoleProcessor.java @@ -11,7 +11,7 @@ import java.util.List; import java.util.Stack; -import org.jboss.resteasy.reactive.common.model.ResourceInterceptors; +import org.jboss.resteasy.reactive.server.util.ScoreSystem; import io.quarkus.deployment.ApplicationArchive; import io.quarkus.deployment.IsDevelopment; @@ -19,7 +19,6 @@ import io.quarkus.deployment.builditem.ApplicationArchivesBuildItem; import io.quarkus.devconsole.spi.DevConsoleRuntimeTemplateInfoBuildItem; import io.quarkus.devconsole.spi.DevConsoleTemplateInfoBuildItem; -import io.quarkus.resteasy.reactive.common.deployment.ResourceInterceptorsBuildItem; import io.quarkus.resteasy.reactive.server.runtime.EndpointScoresSupplier; import io.quarkus.vertx.http.deployment.devmode.NotFoundPageDisplayableEndpointBuildItem; import io.quarkus.vertx.http.runtime.StaticResourcesRecorder; @@ -28,7 +27,13 @@ public class DevConsoleProcessor { @BuildStep(onlyIf = IsDevelopment.class) public DevConsoleRuntimeTemplateInfoBuildItem collectScores() { - return new DevConsoleRuntimeTemplateInfoBuildItem("endpointScores", new EndpointScoresSupplier()); + // For Debugging Purpose + EndpointScoresSupplier endpointScoresSupplier = new EndpointScoresSupplier(); + for (ScoreSystem.EndpointScore list : endpointScoresSupplier.get().endpoints) { + System.out.println(list.fullPath); + System.out.println(list.requestFilterEntries); + } + return new DevConsoleRuntimeTemplateInfoBuildItem("endpointScores", endpointScoresSupplier); } @BuildStep(onlyIf = IsDevelopment.class) @@ -37,13 +42,6 @@ public DevConsoleTemplateInfoBuildItem collectAdditionalEndpoints( return new DevConsoleTemplateInfoBuildItem("additionalEndpointInfo", additionalEndpoint); } - @BuildStep(onlyIf = IsDevelopment.class) - public DevConsoleTemplateInfoBuildItem collectFiltersInfo(ResourceInterceptorsBuildItem resourceInterceptorsBuildItem) { - - ResourceInterceptors interceptors = resourceInterceptorsBuildItem.getResourceInterceptors(); - return new DevConsoleTemplateInfoBuildItem("filterInfo", interceptors); - } - @BuildStep(onlyIf = IsDevelopment.class) public DevConsoleTemplateInfoBuildItem collectStaticResourcesInfo( ApplicationArchivesBuildItem applicationArchivesBuildItem) throws Exception { diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/embedded.html b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/embedded.html index ae35a7aabd4d71..6bb3b8cd3246d6 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/embedded.html +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/embedded.html @@ -5,6 +5,4 @@ List of endpoints - - - Filters + diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/filters.html b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/filters.html deleted file mode 100644 index 8fac9cf1bd8cd1..00000000000000 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-templates/filters.html +++ /dev/null @@ -1,46 +0,0 @@ -{#include main} -{#title} Filter Information {/title} -{#style} -{/style} -{#body} -{#for requestFilterGlobalResource in info:filterInfo.getContainerRequestFilters.getGlobalResourceInterceptors} -
-
- {requestFilterGlobalResource.getClassName} -
-
-{/for} - -{#for requestFilterNameResource in info:filterInfo.getContainerRequestFilters.getNameResourceInterceptors} -
-
- {requestFilterNameResource.getClassName} -
-
-{/for} - -{#for requestFilterPreMatch in info:filterInfo.getContainerRequestFilters.getPreMatchInterceptors} -
-
- {requestFilterPreMatch.getClassName} -
-
-{/for} - -{#for responseFilterNameResource in info:filterInfo.getContainerResponseFilters.getNameResourceInterceptors} -
-
- {responseFilterNameResource.getClassName} -
-
-{/for} - -{#for responseFilterGlobalResource in info:filterInfo.getContainerResponseFilters.getGlobalResourceInterceptors()} -
-
- {responseFilterGlobalResource.getClassName} -
-
-{/for} -{/body} -{/include} \ No newline at end of file