mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Security Solution] [Bugfix] add redirect for old external alert route to new one on events page (#146896)
as per https://github.com/elastic/kibana/issues/140158, old external alert route should either take user back to main entity page or to external alerts. ## Summary Take advantage of `onlyExternalAlerts` param to redirect users with old urls to the new one for external alerts. The gif below shows the old url before hitting enter- causing the page to redirect to the events page with external alerts checked.  Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
This commit is contained in:
parent
8be9ae629c
commit
0d64593769
2 changed files with 22 additions and 1 deletions
|
@ -39,6 +39,17 @@ export const HostsContainer = React.memo(() => (
|
|||
<Route path={`${HOSTS_PATH}/ml-hosts`}>
|
||||
<MlHostConditionalContainer />
|
||||
</Route>
|
||||
<Route // Compatibility redirect for the old external alert path to events page with external alerts showing.
|
||||
path={`${HOSTS_PATH}/externalAlerts`}
|
||||
render={({ location: { search = '' } }) => (
|
||||
<Redirect
|
||||
to={{
|
||||
pathname: `${HOSTS_PATH}/${HostsTableType.events}`,
|
||||
search: `${search}&onlyExternalAlerts=true`,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Route path={getHostsTabPath()}>
|
||||
<Hosts />
|
||||
</Route>
|
||||
|
|
|
@ -20,7 +20,17 @@ export const UsersContainer = React.memo(() => {
|
|||
<Route path={usersTabPath}>
|
||||
<Users />
|
||||
</Route>
|
||||
|
||||
<Route // Compatibility redirect for the old external alert path to events page with external alerts showing.
|
||||
path={`${USERS_PATH}/externalAlerts`}
|
||||
render={({ location: { search = '' } }) => (
|
||||
<Redirect
|
||||
to={{
|
||||
pathname: `${USERS_PATH}/${UsersTableType.events}`,
|
||||
search: `${search}&onlyExternalAlerts=true`,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path={usersDetailsTabPath}
|
||||
render={({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue