Commit 06b9122
[SigEvents] Auto-create rules for high-severity queries during onboarding (elastic#267395)
## Summary
Wires `cloneApiKeysOnCreate` (from elastic#265530) into the streams onboarding
task so that high-severity (>=60) non-STATS queries get backing Kibana
rules created automatically during onboarding, eliminating the manual
promotion step for those queries.
### Changes
- **Onboarding task** passes `rulesClientOptions: {
cloneApiKeysOnCreate: true }` so rules get independent, non-expiring API
keys
- **`persistQueries`** routes new high-severity non-STATS queries to the
rule-creating `syncQueries` path (same bulk call used by rule-backed
replacements), while low-severity and STATS queries remain draft (no
rules)
### Cleanup
Removes the legacy manual-promotion UI and supporting code that is now
redundant:
- **Deleted components**: `PromotionCallout`, `SuggestedRulesFlyout`
- **Deleted hooks**: `usePromotableQueries`, `useUnbackedQueriesCount`
- **Removed client API methods**: `promoteAll`,
`getUnbackedQueriesCount` from `useQueriesApi`
- **Removed UI elements**: "Promote all" callout and unbacked-count
badge from `KnowledgeIndicatorsTable` / discovery page tabs
- **Removed server route**: `GET
/internal/streams/queries/_unbacked_count`
- **Removed server method**: `countPromotableUnbackedQueries` from
`QueryClient` (and its tests)
https://github.com/user-attachments/assets/d549d7b0-2c35-42e1-8808-99231e578fbf
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 6889d71 commit 06b9122
27 files changed
Lines changed: 223 additions & 1343 deletions
File tree
- x-pack/platform
- plugins
- private/translations/translations
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
Lines changed: 0 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51829 | 51829 | | |
51830 | 51830 | | |
51831 | 51831 | | |
51832 | | - | |
51833 | | - | |
51834 | | - | |
51835 | | - | |
51836 | | - | |
51837 | | - | |
51838 | | - | |
51839 | | - | |
51840 | 51832 | | |
51841 | 51833 | | |
51842 | 51834 | | |
| |||
52779 | 52771 | | |
52780 | 52772 | | |
52781 | 52773 | | |
52782 | | - | |
52783 | | - | |
52784 | | - | |
52785 | | - | |
52786 | | - | |
52787 | | - | |
52788 | | - | |
52789 | | - | |
52790 | | - | |
52791 | | - | |
52792 | | - | |
52793 | | - | |
52794 | | - | |
52795 | | - | |
52796 | | - | |
52797 | | - | |
52798 | 52774 | | |
52799 | 52775 | | |
52800 | 52776 | | |
| |||
Lines changed: 0 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51652 | 51652 | | |
51653 | 51653 | | |
51654 | 51654 | | |
51655 | | - | |
51656 | | - | |
51657 | | - | |
51658 | | - | |
51659 | | - | |
51660 | 51655 | | |
51661 | 51656 | | |
51662 | 51657 | | |
| |||
52600 | 52595 | | |
52601 | 52596 | | |
52602 | 52597 | | |
52603 | | - | |
52604 | | - | |
52605 | | - | |
52606 | | - | |
52607 | | - | |
52608 | | - | |
52609 | | - | |
52610 | | - | |
52611 | | - | |
52612 | | - | |
52613 | | - | |
52614 | | - | |
52615 | | - | |
52616 | | - | |
52617 | | - | |
52618 | 52598 | | |
52619 | 52599 | | |
52620 | 52600 | | |
| |||
Lines changed: 0 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52020 | 52020 | | |
52021 | 52021 | | |
52022 | 52022 | | |
52023 | | - | |
52024 | | - | |
52025 | | - | |
52026 | | - | |
52027 | | - | |
52028 | | - | |
52029 | | - | |
52030 | | - | |
52031 | 52023 | | |
52032 | 52024 | | |
52033 | 52025 | | |
| |||
52969 | 52961 | | |
52970 | 52962 | | |
52971 | 52963 | | |
52972 | | - | |
52973 | | - | |
52974 | | - | |
52975 | | - | |
52976 | | - | |
52977 | | - | |
52978 | | - | |
52979 | | - | |
52980 | | - | |
52981 | | - | |
52982 | | - | |
52983 | | - | |
52984 | | - | |
52985 | | - | |
52986 | | - | |
52987 | | - | |
52988 | 52964 | | |
52989 | 52965 | | |
52990 | 52966 | | |
| |||
Lines changed: 0 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52011 | 52011 | | |
52012 | 52012 | | |
52013 | 52013 | | |
52014 | | - | |
52015 | | - | |
52016 | | - | |
52017 | | - | |
52018 | | - | |
52019 | | - | |
52020 | | - | |
52021 | | - | |
52022 | 52014 | | |
52023 | 52015 | | |
52024 | 52016 | | |
| |||
52962 | 52954 | | |
52963 | 52955 | | |
52964 | 52956 | | |
52965 | | - | |
52966 | | - | |
52967 | | - | |
52968 | | - | |
52969 | | - | |
52970 | | - | |
52971 | | - | |
52972 | | - | |
52973 | | - | |
52974 | | - | |
52975 | | - | |
52976 | | - | |
52977 | | - | |
52978 | | - | |
52979 | | - | |
52980 | | - | |
52981 | 52957 | | |
52982 | 52958 | | |
52983 | 52959 | | |
| |||
0 commit comments