Commit 7a1885d
[Security Solution] [Alerts] Fix deprecated pageNames with redirects (elastic#232558)
## Summary
Related issue: elastic#232557
This pr fixes an issue where deprecated pages that are not registered
with the global navigation and search, as the now deprecated
app/security/detections/* routes are, but did have custom redirect logic
with react router components, stopped working as a result of a recent
change elastic#217890 that prevented any
of this logic from running if the route was not registered globally,
"useLinkInfo" is the hook below that checks this. Alert actions use an
older url, app/security/detections/rules/id/{ruleId}, and redirect at
the application level to the new url app/security/rules/id/{ruleId} and
so this pr explicitly excludes the old route from this check, because we
should also continue to not show a detections result in the global
search bar that just redirects to the alerts page. Open to doing this in
another way if we want, but this seemed the most direct and lowest
friction way to make this core functionality work again.
Before:

After:

### Checklist
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios1 parent 7b1ea01 commit 7a1885d
1 file changed
Lines changed: 6 additions & 3 deletions
File tree
- x-pack/solutions/security/plugins/security_solution/public/common/components/security_route_page_wrapper
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | | - | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | | - | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
0 commit comments