8000 Fixing misleading operators by hoangpn · Pull Request #570 · line/promgen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixing misleading operators #570

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

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

hoangpn
Copy link
Contributor
@hoangpn hoangpn commented Mar 3, 2025

There are some filters on UI that have confused users by displaying the =~ operator instead of =. We will change it.

The silence create modal:
BEFORE:
image

AFTER:
image

The global list of silence:
BEFORE:
image

AFTER:
image

@hoangpn hoangpn requested review from kfdm and a team as code owners March 3, 2025 08:06
@hoangpn hoangpn force-pushed the fix/misleading-operator branch from d41338c to d18cb18 Compare March 3, 2025 08:09
hoangpn added 2 commits March 3, 2025 15:48
In the filter feature of the silence list form, the =~ operator caused confusion as users thought
they could use regex. However, only values ending in * are regex, others are considered literals.
Therefore, for the sake of avoiding confusion among our users, we change the UI to use
the = operator. It is better to put an = operator in there until we add support for new operators
in the future. We know this is not 100% accurate, because anything ending in * is considered
a regular expression, therefore the actual operation is =~ in that case.
We also change a misleading comment in the code that led to the addition of the =~ operator
in the UI.
…list of silence

Currently, when using the filter feature on the global list of silence, we are using
the === operator in JavaScript. The values being compared are also entirely chosen from
a list of specific values. Therefore, the operator that should be displayed here is = instead of =~.
We have made this change to avoid misunderstandings.
@hoangpn hoangpn force-pushed the fix/misleading-operator branch from 997cd4a to 721120b Compare March 3, 2025 08:48
@vincent-olivert-riera vincent-olivert-riera merged commit 8763d21 into line:master Mar 3, 2025
5 checks passed
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
0