[8.15] [ResponseOps][Alerts] Fix Stack Alerts page filter controls error (#194785)#194942
Merged
kibanamachine merged 1 commit intoelastic:8.15from Oct 4, 2024
Merged
Conversation
…astic#194785) ## Summary elastic#190561 introduced a breaking change in the format of the controls embeddable configuration object that caused usages in the Security and Stack alerts pages to break if there was an old value saved in localStorage. This PR makes the storage key for the alert filter controls configurable and uses a new value for the usage in `<UrlSyncedAlertsSearchBar>`, fixing the error in the Stack Alerts page. ## To verify 1. Checkout a revision prior to this PR 2. Create Stack rules that fire alerts 3. Visit the Stack Alerts page (should show a full-page error message, if it doesn't see [If the page works correctly](#how-to-break)) 4. Checkout this PR 5. Reload the Stack Alerts page 6. Verify that the page loads correctly <details id="how-to-break"> <summary>If the page works correctly</summary> You likely didn't have an old saved configuration for the controls bar in the localStorage. In this case, create a localStorage item named `stackAlerts.default.pageFilters` with the following content: ```json { "panels": { "0": { "type": "optionsListControl", "order": 0, "grow": true, "width": "small", "explicitInput": { "id": "0", "dataViewId": "unified-alerts-dv", "fieldName": "kibana.alert.status", "title": "Status", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true }, "selectedOptions": [ "active" ], "hideActionBar": true, "persist": true, "hideExists": true } }, "1": { "type": "optionsListControl", "order": 1, "grow": true, "width": "small", "explicitInput": { "id": "1", "dataViewId": "unified-alerts-dv", "fieldName": "kibana.alert.rule.name", "title": "Rule", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true }, "hideExists": true } }, "2": { "type": "optionsListControl", "order": 2, "grow": true, "width": "small", "explicitInput": { "id": "2", "dataViewId": "unified-alerts-dv", "fieldName": "kibana.alert.group.value", "title": "Group", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true } } }, "3": { "type": "optionsListControl", "order": 3, "grow": true, "width": "small", "explicitInput": { "id": "3", "dataViewId": "unified-alerts-dv", "fieldName": "tags", "title": "Tags", "hideExclude": true, "hideSort": true, "hidePanelTitles": true, "placeholder": "", "ignoreParentSettings": { "ignoreValidations": true } } } }, "labelPosition": "oneLine", "chainingSystem": "HIERARCHICAL", "autoApplySelections": true, "ignoreParentSettings": { "ignoreValidations": true }, "editorConfig": { "hideWidthSettings": true, "hideDataViewSelector": true, "hideAdditionalSettings": true } } ``` </details> ## References Fixes elastic#193565 (cherry picked from commit ef3bc96)
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Async chunks
To update your PR or re-run it, just comment with: cc @umbopepato |
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.
Backport
This will backport the following commits from
mainto8.15:Questions ?
Please refer to the Backport tool documentation