Skip to content

Commit 32bb66c

Browse files
kibanamachinerylnd
andauthored
[9.1] [Detection Engine] Display dataview pattern as tooltip during rule creation (#226909) (#227557)
# Backport This will backport the following commits from `main` to `9.1`: - [[Detection Engine] Display dataview pattern as tooltip during rule creation (#226909)](#226909) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ryland Herrick","email":"ryalnd@gmail.com"},"sourceCommit":{"committedDate":"2025-07-11T01:40:55Z","message":"[Detection Engine] Display dataview pattern as tooltip during rule creation (#226909)\n\n## Summary\n\nThe story behind this feature is a little circuitous: the [original\nissue](#137823) was about the\nfull dataview index pattern being truncated, and the [first\nattempt](#214495) to fix this did\nso by instead displaying the data view _name_ instead of its index\npattern. However, this meant that users were less likely to see _any_\nindex pattern associated to the dataview, rather than the full pattern.\n\nThis PR finishes the story by, in addition to preferring the data view's\n_name_ as the dropdown option, adds its full index pattern as the\n_tooltip_ for the corresponding option.\n\n## What this PR does\n* Adds the index pattern for the dataview as a tooltip on the Data View\ndropdown during rule creation\n\n## Screenshots\n\n<kbd>Before: \n<img width=\"894\" alt=\"Screenshot 2025-07-07 at 5 13 34 PM\"\nsrc=\"https://github.com/user-attachments/assets/1079f8c0-148f-4b1f-9469-ab17fc408d64\"\n/>\n\n</kbd>\n\n<kbd>After:\n<img width=\"894\" alt=\"Screenshot 2025-07-07 at 5 14 26 PM\"\nsrc=\"https://github.com/user-attachments/assets/335e54f9-9c6b-4833-8d1d-a254329ab7c1\"\n/>\n\n</kbd>\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"7086158afef2d5dfa67efdd76ba9962df1e1af95","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Data Views","Feature:Rule Creation","backport:all-open","Team:Detection Engine","v9.2.0"],"title":"[Detection Engine] Display dataview pattern as tooltip during rule creation","number":226909,"url":"https://github.com/elastic/kibana/pull/226909","mergeCommit":{"message":"[Detection Engine] Display dataview pattern as tooltip during rule creation (#226909)\n\n## Summary\n\nThe story behind this feature is a little circuitous: the [original\nissue](#137823) was about the\nfull dataview index pattern being truncated, and the [first\nattempt](#214495) to fix this did\nso by instead displaying the data view _name_ instead of its index\npattern. However, this meant that users were less likely to see _any_\nindex pattern associated to the dataview, rather than the full pattern.\n\nThis PR finishes the story by, in addition to preferring the data view's\n_name_ as the dropdown option, adds its full index pattern as the\n_tooltip_ for the corresponding option.\n\n## What this PR does\n* Adds the index pattern for the dataview as a tooltip on the Data View\ndropdown during rule creation\n\n## Screenshots\n\n<kbd>Before: \n<img width=\"894\" alt=\"Screenshot 2025-07-07 at 5 13 34 PM\"\nsrc=\"https://github.com/user-attachments/assets/1079f8c0-148f-4b1f-9469-ab17fc408d64\"\n/>\n\n</kbd>\n\n<kbd>After:\n<img width=\"894\" alt=\"Screenshot 2025-07-07 at 5 14 26 PM\"\nsrc=\"https://github.com/user-attachments/assets/335e54f9-9c6b-4833-8d1d-a254329ab7c1\"\n/>\n\n</kbd>\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"7086158afef2d5dfa67efdd76ba9962df1e1af95"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226909","number":226909,"mergeCommit":{"message":"[Detection Engine] Display dataview pattern as tooltip during rule creation (#226909)\n\n## Summary\n\nThe story behind this feature is a little circuitous: the [original\nissue](#137823) was about the\nfull dataview index pattern being truncated, and the [first\nattempt](#214495) to fix this did\nso by instead displaying the data view _name_ instead of its index\npattern. However, this meant that users were less likely to see _any_\nindex pattern associated to the dataview, rather than the full pattern.\n\nThis PR finishes the story by, in addition to preferring the data view's\n_name_ as the dropdown option, adds its full index pattern as the\n_tooltip_ for the corresponding option.\n\n## What this PR does\n* Adds the index pattern for the dataview as a tooltip on the Data View\ndropdown during rule creation\n\n## Screenshots\n\n<kbd>Before: \n<img width=\"894\" alt=\"Screenshot 2025-07-07 at 5 13 34 PM\"\nsrc=\"https://github.com/user-attachments/assets/1079f8c0-148f-4b1f-9469-ab17fc408d64\"\n/>\n\n</kbd>\n\n<kbd>After:\n<img width=\"894\" alt=\"Screenshot 2025-07-07 at 5 14 26 PM\"\nsrc=\"https://github.com/user-attachments/assets/335e54f9-9c6b-4833-8d1d-a254329ab7c1\"\n/>\n\n</kbd>\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"7086158afef2d5dfa67efdd76ba9962df1e1af95"}}]}] BACKPORT--> Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
1 parent 25cad02 commit 32bb66c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector_field

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector_field/data_view_selector_field.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ export function DataViewSelectorField({ field }: DataViewSelectorProps): JSX.Ele
2525
const fieldAndError = field ? getFieldValidityAndErrorMessage(field) : undefined;
2626
const isInvalid = fieldAndError?.isInvalid;
2727
const errorMessage = fieldAndError?.errorMessage;
28-
const comboBoxOptions = useMemo(
28+
const comboBoxOptions: Array<EuiComboBoxOptionOption<string>> = useMemo(
2929
() =>
3030
dataViews.map(({ id, title, name }) => ({
3131
id,
3232
label: name ?? title,
33+
toolTipContent: title,
3334
})),
3435
[dataViews]
3536
);

0 commit comments

Comments
 (0)