Skip to content
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

UI: group similar violations #1381

Open
ePaul opened this issue Apr 6, 2022 · 1 comment
Open

UI: group similar violations #1381

ePaul opened this issue Apr 6, 2022 · 1 comment
Labels
area: web UI Zally web interface issues

Comments

@ePaul
Copy link
Member

ePaul commented Apr 6, 2022

Current situation

When validating large APIs, you often get many similar violations, just for different locations. In the UI this currently looks like this (Nakadi's API used as an example):
zally-ui-similar-rules

This makes the list of violations quite long, while there essentially are only 11 different MUST rules violated here.

Suggestion

Violations with the same title (and rule) should be grouped together. When (as here) they also have the same detail message, we should just have a list of locations (+ a total count).

zally-ui-similar-rules-aggregated-suggestion

When they have different details (for cases where the details message is parameterized, like scope ... does not match regex '^(uid)|(([a-z-]+\.){1,2}(read|write))$', it's a bit more complicated.

Current state:

zally-ui-similar-rules-different-details-scopes

Simple solution

Just aggregate those with the exact same detail message), with a list of locations, leave ones with different details alone.

zally-ui-similar-rules-different-details-scopes-simple

More complex solution

Have a second level aggregation by detail under the top-level aggregation.
This likely needs a slight rearrangement, moving the rule link to the top:

zally-ui-similar-rules-different-details-scopes-complex

(I've mocked up this by editing the DOM in Chromium's dev tools, with proper styling it can look better.)

@ePaul ePaul added the area: web UI Zally web interface issues label Apr 6, 2022
@tkrop
Copy link
Member

tkrop commented Apr 27, 2022

Could be also seen as a kind of violation optimization, that is handled by the server. Violations are than aggregated outside the rule engine and translated into violations that allow multiple locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: web UI Zally web interface issues
Projects
None yet
Development

No branches or pull requests

2 participants