-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting invocation order of Filters #15237
Conversation
Thanks! It looks like it already conflicts with what we have on master :) Moreover, I'll need to take a closer look to let you know what needs to be done to progress to meet the actual needs mentioned in #14885 |
Yeah, I see the conflict is because of the previous PR I made. |
a0ffa11
to
53f80a7
Compare
This is a good start, but it's not exactly what we are looking for to solve #14885. Looking at the existing DevUI, I think we should add that information into the scores page (the UI will need some attention as to not cluter each entry). To determine the filters for each endpoint you will need to update EndpointScore to contain a list of request filter entries. Those entries will a new static class inside the public static class RequestFilterEntry {
public final String name;
public final boolean preMatch;
public RequestFilterEntry(String name, boolean preMatch) {
this.name = name;
this.preMatch = preMatch;
}
} Those filter entries will be determined in this method by doing something like: ServerRestHandler[] handlerChain = runtimeResource.getHandlerChain();
List<RequestFilterEntry> requestFilters = new ArrayList<>();
for (ServerRestHandler serverRestHandler : handlerChain) {
if (serverRestHandler instanceof ResourceRequestFilterHandler) {
ResourceRequestFilterHandler requestFilterHandler = (ResourceRequestFilterHandler) serverRestHandler;
requestFilters.add(new RequestFilterEntry(requestFilterHandler.getFilter().getClass().getName(), requestFilterHandler.isPreMatch()));
}
} Note: To make that work, you'll also need to update public ContainerRequestFilter getFilter() {
return filter;
}
public boolean isPreMatch() {
return preMatch;
} Once you do all that, each Does this all make sense? |
Yes, this is all very well explained and it is now clear: going to start the work :) |
Cool :) |
3c63f9f
to
9daae87
Compare
I would suggest doing a clean build of Quarkus and of the project you are using to test it. |
oh nice, it worked :) |
A rule of thumb is that anytime you see a |
A filter does not have a score. I was thinking that filters should be in some kind of UI component that allows you to open / close them. The reason is that there could potentially be a lot of filters and in that case that would really mess up the UI. |
Humm like for one single endpoint, one can have a huge list of Filters. yes that definitely makes sense to put it in a UI component that allows to open/close them else the score page will be flooded with list of filters. |
Yeah, there is no telling how many there could be. |
filterListBadgeSecondary.mp4After trying diff styles, ended here: well I am working to improve this too :) |
Yeah, that is a step in the proper direction. Can you also add a simple screenshot pointing to the part in question? I would like @phillip-kruger to be able to see it and perhaps provide suggestions for alternatives :) |
Sure, I was thinking to put this on zulip too so that can get better feedback and suggestions from everyone :) |
Sure, although I think that Phillip's advice is all you'll need :) |
Hi @SaumyaSingh1 - I think what you have is great already. Here some notes on the screen and what I would possibly change: As I understand, the main goal of the screen is to show the score of the endpoints, first at a global value and expanded in these 3 categories:
Then as a second goal provide some metadata about the endpoints, like
I think users might 1) have many endpoints and 2) really mostly care about the endpoints that does not score high, right ? So how about we order the endpoints from low scoring to high scoring, so that the "bad" ones is at the top. Then maybe use an Then, what would be cool is if those 3 scored can be more visible, so I was thinking, maybe a basic Gauge per score ? Then at the bottom a table with the other meta data on the endpoint, with the filters using a collapse (https://getbootstrap.com/docs/4.6/components/collapse/) like you have now, but maybe just in icon to activate the "show" So something like this maybe : On another note: I would rename the page name and remove the "Quarkus REST" part, and just call it Scoring (we know it's Quarkus and we know it's Rest :) ) Let me know if I can help you with this :) |
Here a pure CSS Gauge example: https://github.com/JohnrBell/Gauge_CSS |
WOW, that design is awesome! |
Thanks @geoand :) It does not have to be gauges, just somehow make the score more visible, as at the moment , metadata and score blur a bit and it's a bit of an alignment exercise to see what score is where. |
Awesome, this design idea is soo beautiful and clean 💙 @phillip-kruger Definitely, I would love to do the redesigning of the score page :) But I think for that I will need to open a separate PR because this one is mainly focused on the "Filters" Category. WDYT @geoand As Phillip suggested for the Filters I will keep the simple |
Yes, for sure |
What about adding the "Meta data" table at the bottom ? The we can later work on the score section ? |
If @SaumyaSingh1 is up for it or if you want to chip in sure, why not :) |
sure :) |
DEV UI : Adding Filters in Score Page added initial filter information adding code adding code- not final DEV UI: adding filters Committing Final Code for Filters
3e84ddf
to
f7f03a3
Compare
Can you post a screenshot of what the page looks like now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
I closed and re-opened to get CI working |
nice, all checks passed :) |
Thanks @SaumyaSingh1 ! |
Fixes: #14885