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

refactor: rewrite plugin to add multiples queries support #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hbollon
Copy link
Member

@hbollon hbollon commented May 23, 2022

With this PR, I completely rewrite this plugin to add the possibility to have multiples possibles queries to execute and be able to choose the one we want through a scenario parameter.
Indeed, I introduced a new QueryEditor type called EditorQuery, it's extends DataQuery and have a scenario attribute.
All custom QueryEditors will now extends EditorQuery instead of DataQuery to have this new common attribute.

Screenshot from 2022-05-23 15-41-44

On the query editor view of the plugin, a new selector will be available to choose which query we want to build. If user change this settings, the query editor will be updated for the new scenario with associated fields for the query config.
Atm, only one scenario is available which is the old one for alerts but a new one is coming to fetch silences rules from Alertmanager.

Before:
Screenshot from 2022-05-23 15-34-19

Now:
Screenshot from 2022-05-23 15-34-40

By doing this change, I must rewrite almost all this plugin. So, I refactor others aspects of the code and updated some parts of it to more modern typescript.

@hbollon hbollon requested a review from cryptobioz May 23, 2022 13:42
@hbollon hbollon force-pushed the master branch 2 times, most recently from d507cd2 to 1694ee8 Compare July 25, 2024 09:07
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.

1 participant