[Streams 🌊] Update link to management (#217942)

## 📓 Summary

Fixes a link targeting the overview page while it should have gone to
the management section.
Also fixes broken redirect when targeting `/{key}/management`
This commit is contained in:
Marco Antonio Ghiani 2025-04-11 12:26:04 +02:00 committed by GitHub
parent cb5ae3a483
commit 7812de377e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View file

@ -61,6 +61,10 @@ export function StreamDetailView() {
const { definition } = useStreamDetail();
if (tab === 'management') {
return <RedirectTo path="/{key}/management/{tab}" params={{ path: { tab: 'route' } }} />;
}
if (!isValidStreamDetailTab(tab)) {
return <RedirectTo path="/{key}/{tab}" params={{ path: { key, tab: 'overview' } }} />;
}

View file

@ -298,7 +298,9 @@ function StreamNode({
aria-label={i18n.translate('xpack.streams.streamsTable.management', {
defaultMessage: 'Management',
})}
href={router.link('/{key}/{tab}', { path: { key: node.name, tab: 'management' } })}
href={router.link('/{key}/management/{tab}', {
path: { key: node.name, tab: 'route' },
})}
/>
</EuiToolTip>
</EuiFlexGroup>

View file

@ -61,11 +61,6 @@ const streamsAppRoutes = {
}),
}),
},
'/{key}/management': {
element: (
<RedirectTo path="/{key}/management/{tab}" params={{ path: { tab: 'route' } }} />
),
},
'/{key}/management/{tab}': {
element: <StreamManagementView />,
params: t.type({