Skip to content

Commit 8e62b74

Browse files
authored
[Streams] Add root stream processing CTA to partitioning (elastic#240964)
## 📓 Summary Closes elastic#231318 Quick change to add a CTA to bring users landing on a root stream processing tab into the partitioning page. <img width="3000" height="1583" alt="Screenshot 2025-10-28 at 11 53 54" src="https://github.com/user-attachments/assets/51dd1dcd-661b-499c-9f50-4d54f025329e" />
1 parent ec67b3d commit 8e62b74

File tree

1 file changed

+32
-1
lines changed
  • x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment

1 file changed

+32
-1
lines changed

x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/empty_prompts.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,26 @@
66
*/
77

88
import React from 'react';
9-
import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui';
9+
import {
10+
EuiButton,
11+
EuiEmptyPrompt,
12+
EuiFlexGroup,
13+
EuiFlexItem,
14+
EuiSpacer,
15+
EuiText,
16+
} from '@elastic/eui';
1017
import { i18n } from '@kbn/i18n';
18+
import { useStreamsAppParams } from '../../../hooks/use_streams_app_params';
19+
import { useStreamsAppRouter } from '../../../hooks/use_streams_app_router';
1120
import { AssetImage } from '../../asset_image';
1221
import { CreateStepButton } from './create_step_button';
1322

1423
export const RootStreamEmptyPrompt = () => {
24+
const router = useStreamsAppRouter();
25+
const {
26+
path: { key: streamName },
27+
} = useStreamsAppParams('/{key}/management/{tab}');
28+
1529
return (
1630
<EuiEmptyPrompt
1731
aria-live="polite"
@@ -36,6 +50,23 @@ export const RootStreamEmptyPrompt = () => {
3650
)}
3751
</p>
3852
}
53+
actions={
54+
<EuiButton
55+
href={router.link('/{key}/management/{tab}', {
56+
path: {
57+
key: streamName,
58+
tab: 'partitioning',
59+
},
60+
})}
61+
>
62+
{i18n.translate(
63+
'xpack.streams.streamDetailView.managementTab.rootStreamEmptyPrompt.button',
64+
{
65+
defaultMessage: 'Open stream partitioning',
66+
}
67+
)}
68+
</EuiButton>
69+
}
3970
/>
4071
);
4172
};

0 commit comments

Comments
 (0)