🌊 Streams: Fix indices link (#217229)

The link to all indices of a data stream from the streams UI didn't work
properly because `includeHiddenIndices` wasn't set properly.

To fix it and prevent it breaking in another place, I moved the logic to
the locator itself
This commit is contained in:
Joe Reuter 2025-04-09 11:56:36 +02:00 committed by GitHub
parent 4109420186
commit 102ceb65e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 5 deletions

View file

@ -25,6 +25,10 @@ export type IndexManagementLocatorParams = SerializableRecord &
filter?: string;
includeHiddenIndices?: boolean;
}
| {
page: 'data_stream_index_list';
dataStreamName: string;
}
| {
page: 'data_streams_details';
dataStreamName?: string;

View file

@ -236,9 +236,8 @@ export const DataStreamDetailPanel: React.FunctionComponent<Props> = ({
<EuiLink
href={
locator?.getRedirectUrl({
page: 'index_list',
filter: `data_stream="${dataStreamName}"`,
includeHiddenIndices: true,
page: 'data_stream_index_list',
dataStreamName,
}) || ''
}
>

View file

@ -48,6 +48,12 @@ export class IndexManagementLocatorDefinition
path: location.path + getIndexListUri(params.filter, params.includeHiddenIndices),
};
}
case 'data_stream_index_list': {
return {
...location,
path: location.path + getIndexListUri(`data_stream="${params.dataStreamName}"`, true),
};
}
case 'data_streams_details': {
return {
...location,

View file

@ -90,8 +90,8 @@ export function DataStreamDetails({
href={
(dataStream &&
indexManagementLocator?.getRedirectUrl({
page: 'index_list',
filter: `data_stream="${dataStream.name}"`,
page: 'data_stream_index_list',
dataStreamName: dataStream.name,
})) ||
''
}