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

Add a way to filter topics by status #280

Merged
merged 4 commits into from
Dec 20, 2023
Merged

Conversation

riccardo-forina
Copy link
Collaborator

@riccardo-forina riccardo-forina commented Dec 19, 2023

image

image

image

@@ -38,6 +40,7 @@ export async function getTopics(
"name,status,visibility,numPartitions,totalLeaderLogBytes,consumerGroups",
"filter[id]": params.id ? `eq,${params.id}` : undefined,
"filter[name]": params.name ? `like,*${params.name}*` : undefined,
"filter[status]": params.status,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case where there is no "operator" in the filter like eq or in, the API defaults to eq. If you ever want to search for multiple status values, the in could be used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it wasn't clear from the openapi doc, I thought it supported a single value only

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I missed docs for many of the filter parameters. They should all follow that pattern. I'll see if there's a nice way to document that without too much repetition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, updated screens in the PR description to match the new option

@MikeEdgar MikeEdgar added this to the 0.0.21 milestone Dec 19, 2023
@riccardo-forina riccardo-forina enabled auto-merge (squash) December 20, 2023 09:20
@riccardo-forina riccardo-forina merged commit 9fdbeee into main Dec 20, 2023
8 checks passed
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@riccardo-forina riccardo-forina deleted the topic-filter-by-status branch December 20, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants