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

fix: probe filtering behaviour and reset button #1066

Merged
merged 4 commits into from
Feb 12, 2025
Merged

Conversation

ckbedwell
Copy link
Contributor

Problem

We had a bug where you couldn't filter most probes correctly on the check list page. We were made aware of it in this escalation: https://github.com/grafana/support-escalations/issues/14671

We had unit and integration tests covering this problem but none that were comprehensive enough to catch the bug.

Whilst fixing this bug I discovered the reset button also wasn't working so put in a quick fix.

Solution

I've added the displayName property to our hard-coded probe meta data list. Upon reflection this is the safer way to handle this problem as it no longer transforms private probe names, which would likely want to restrict their display to the user-inputted name.

Regardless, I've updated camelCaseToSentence to pascalCaseToSentence. It ensures that if the first letter is a capital it doesn't get prepended with a space and for values which already have a space it no longer double pads them.

I've also changed the reset button so it directly alters the URL, which the state then passes down to the filters to update themselves accordingly. This isn't an ideal fix but as we have re-doing the check list page on the horizon I don't want to invest an unnecessary amount of time for something that is likely to change in some capacity in the future.

@ckbedwell ckbedwell requested a review from a team as a code owner February 12, 2025 11:24
@ckbedwell ckbedwell requested a review from VikaCep February 12, 2025 11:24
Copy link
Contributor

@VikaCep VikaCep left a comment

Choose a reason for hiding this comment

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

I'm still having issues selecting the probes in the filter:
2025-02-12 10 07 42

And the reset button is not working:
2025-02-12 10 08 05

@ckbedwell
Copy link
Contributor Author

@VikaCep Forgot to git push 🤦

Copy link
Contributor

@VikaCep VikaCep left a comment

Choose a reason for hiding this comment

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

💯 👏 🥇

@ckbedwell ckbedwell merged commit 1b7dfb4 into main Feb 12, 2025
7 checks passed
@ckbedwell ckbedwell deleted the fix/probe-displaynames branch February 12, 2025 15:51
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