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

[RAM] Allow wildcard search on rule's name and tags #136312

Merged
merged 16 commits into from Jul 20, 2022

Conversation

XavierM
Copy link
Contributor

@XavierM XavierM commented Jul 13, 2022

Summary

Resolve #131230

This PR will allow our user to use wildcard to find rule's name and tag without crashing the application. if we want to find rule with just few letter and without using wildcard, we will have to implement N-gram tokenizer on the saved object to allow this kind of search.

Checklist

@XavierM XavierM added release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.4.0 labels Jul 13, 2022
@XavierM XavierM marked this pull request as ready for review July 18, 2022 10:23
@XavierM XavierM requested a review from a team as a code owner July 18, 2022 10:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@jcger jcger self-requested a review July 18, 2022 10:49
@XavierM XavierM requested review from EricDavisX and removed request for jcger July 18, 2022 12:18
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
triggersActionsUi 490 556 +66

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 888.6KB 918.8KB +30.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
triggersActionsUi 89.6KB 89.9KB +306.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

let optionsFilter: KueryNode | string | null = filter ?? null;
try {
if (optionsFilter != null && typeof optionsFilter === 'string') {
// FUTURE ENGINEER -> if I can parse it that mean it is a KueryNode or it is a string
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of the comment you could create a function with a descriptive name like isKueryNodeOrString, up to you

optionsFilter = JSON.parse(optionsFilter);
}
} catch (e) {
optionsFilter = filter ?? null;
Copy link
Contributor

Choose a reason for hiding this comment

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

at this point optionsFilter has already the same value so you might consider removing this line or the assignation in line 11

Copy link
Contributor

@EricDavisX EricDavisX left a comment

Choose a reason for hiding this comment

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

awesome work! I pulled the PR and it tests great.

@XavierM XavierM merged commit d85438f into elastic:main Jul 20, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 20, 2022
@gmmorris gmmorris added the Feature:Alerting/RulesManagement Issues related to the Rules Management UX label Jul 29, 2022
@tylersmalley tylersmalley added ci:cloud-deploy Create or update a Cloud deployment and removed ci:deploy-cloud labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:cloud-deploy Create or update a Cloud deployment Feature:Alerting/RulesManagement Issues related to the Rules Management UX release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps] Rules + Cases dialogs don't use partial text match for search-bar
8 participants