Skip to content

Commit 860de84

Browse files
authored
Adding experimental badge in header in Workflows list page (opensearch-project#496)
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent c2f05e4 commit 860de84

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

public/pages/workflows/workflows.tsx

+20-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
import { prettifyErrorMessage } from '../../../common/utils';
4040
import { DataSourceOption } from '../../../../../src/plugins/data_source_management/public/components/data_source_menu/types';
4141
import { ExperimentalBadge } from '../../general_components';
42+
import { TopNavControlData } from '../../../../../src/plugins/navigation/public';
4243

4344
export interface WorkflowsRouterProps {}
4445

@@ -88,7 +89,7 @@ export function Workflows(props: WorkflowsProps) {
8889
chrome: { setBreadcrumbs },
8990
} = getCore();
9091
const { HeaderControl } = getNavigationUI();
91-
const { setAppDescriptionControls } = getApplication();
92+
const { setAppDescriptionControls, setAppCenterControls } = getApplication();
9293

9394
// import modal state
9495
const [isImportModalOpen, setIsImportModalOpen] = useState<boolean>(false);
@@ -202,6 +203,23 @@ export function Workflows(props: WorkflowsProps) {
202203
);
203204
}, [getSavedObjectsClient, getNotifications(), props.setActionMenu]);
204205
}
206+
207+
const experimentalBadgeInHeader = (
208+
<HeaderControl
209+
setMountPoint={setAppCenterControls}
210+
controls={[
211+
{
212+
renderComponent: (
213+
<ExperimentalBadge
214+
popoverEnabled={true}
215+
popoverAnchorPosition="downLeft"
216+
/>
217+
),
218+
} as TopNavControlData,
219+
]}
220+
/>
221+
);
222+
205223
const DESCRIPTION = `Design, experiment, and prototype your solutions with ${PLUGIN_NAME}. Build your search and last mile
206224
ingestion flows with a visual interface. Experiment with different configurations with prototyping tools and launch them
207225
into your environment.`;
@@ -244,6 +262,7 @@ export function Workflows(props: WorkflowsProps) {
244262
/>
245263
)}
246264
{dataSourceEnabled && renderDataSourceComponent}
265+
{USE_NEW_HOME_PAGE && experimentalBadgeInHeader}
247266
<EuiPage>
248267
<EuiPageBody>
249268
<EuiPageHeader

0 commit comments

Comments
 (0)