Skip to content

Commit

Permalink
DEV UI: adding filters
Browse files Browse the repository at this point in the history
  • Loading branch information
saumya1singh committed Feb 23, 2021
1 parent c026b31 commit 3c63f9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
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;
import io.quarkus.deployment.annotations.BuildStep;
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;
Expand All @@ -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)
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
<a href="{urlbase}/endpoints" class="badge badge-light">
<i class="fa fa-map fa-fw"></i>
List of endpoints</a>
<a href="{urlbase}/filters" class="badge badge-light">
<i class="fa fa-map fa-fw"></i>
Filters</a>

This file was deleted.

0 comments on commit 3c63f9f

Please sign in to comment.