[Alerting v2] MVP Dedicated rule form#254995
Closed
dominiqueclarke wants to merge 30 commits into
Closed
Conversation
Add missing newline at the end of the tsconfig.json file
dominiqueclarke
commented
Feb 26, 2026
…iqueclarke/kibana into feature/alerting-v2-dedicated-form
dominiqueclarke
commented
Feb 26, 2026
| const [loadError, setLoadError] = useState<string | null>(null); | ||
| const [isLoadingRule, setIsLoadingRule] = useState(false); | ||
|
|
||
| const esqlCallbacks = useMemo<ESQLCallbacks>( |
Contributor
Author
There was a problem hiding this comment.
I don't think this needs to be passed as a prop. It can just be internal logic as part of the form. Will make the change shortly.
…iqueclarke/kibana into feature/alerting-v2-dedicated-form
…iqueclarke/kibana into feature/alerting-v2-dedicated-form
fe5065d to
e9b4791
Compare
64e9f03 to
bf6f1ce
Compare
8 tasks
dominiqueclarke
commented
Mar 4, 2026
| @@ -0,0 +1,263 @@ | |||
| /* | |||
Contributor
Author
There was a problem hiding this comment.
This is essentially Dima's original yaml rule form just moved into this package.
dominiqueclarke
commented
Mar 4, 2026
| }, | ||
| }, | ||
| }; | ||
| const DEFAULT_QUERY = 'FROM logs-*\n| LIMIT 1'; |
Contributor
Author
There was a problem hiding this comment.
This was brought over from the default query in Dima's yaml form. Probably should disappear now.
…iqueclarke/kibana into feature/alerting-v2-dedicated-form
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]
History
|
Contributor
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #251333
This PR adds a dedicated ES|QL query editor and enhances the
@kbn/alerting-v2-rule-formpackage with several new features for creating and editing v2 alerting rules. In particular, it sets up boilerplate for using the alerting v2 rule form components for a dedicated alerting experience.Key Changes
ES|QL Query Editor
EsqlEditorField: A generic ES|QL editor field component usingESQLLangEditorwith full syntax highlighting, autocomplete, and real-time validationEvaluationQueryField: A specific implementation for theevaluation.query.basefield with ES|QL validationQueryFieldGroup: Field group wrapper for query-related fields (will eventually contain condition and also test query features)Form Enhancements
includeQueryEditorprop: Controls whether the ES|QL query editor is shown inRuleForm(default:true). Set tofalseforDynamicRuleFormwhere the query is controlled externally (e.g., Discover integration)includeYamlprop: Enables a Form/YAML toggle to switch between structured form UI and raw YAML editingincludeSubmissionprop: Whentrue, the form renders submit/cancel buttons and handles rule creation internally viauseCreateRuleEditModeToggle: New component for switching between Form and YAML editing modesArchitecture Improvements
QueryClientProviderfor react-query hooksRULE_FORM_IDconstant - consumers no longer need to provide form IDErrorCallOutto extract validation errors from nested field paths (e.g.,evaluation.query.base)Usage Examples
Standalone form with all features (Create Rule Page):
Dynamic form for Discover integration:
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
@kbn/esqlRelease Note
skip