Skip to content

Commit

Permalink
Adding experimental badge in header in Workflows list page (#496)
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
(cherry picked from commit 860de84)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Nov 22, 2024
1 parent 5893743 commit 970547d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion public/pages/workflows/workflows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
import { prettifyErrorMessage } from '../../../common/utils';
import { DataSourceOption } from '../../../../../src/plugins/data_source_management/public/components/data_source_menu/types';
import { ExperimentalBadge } from '../../general_components';
import { TopNavControlData } from '../../../../../src/plugins/navigation/public';

export interface WorkflowsRouterProps {}

Expand Down Expand Up @@ -88,7 +89,7 @@ export function Workflows(props: WorkflowsProps) {
chrome: { setBreadcrumbs },
} = getCore();
const { HeaderControl } = getNavigationUI();
const { setAppDescriptionControls } = getApplication();
const { setAppDescriptionControls, setAppCenterControls } = getApplication();

// import modal state
const [isImportModalOpen, setIsImportModalOpen] = useState<boolean>(false);
Expand Down Expand Up @@ -202,6 +203,23 @@ export function Workflows(props: WorkflowsProps) {
);
}, [getSavedObjectsClient, getNotifications(), props.setActionMenu]);
}

const experimentalBadgeInHeader = (
<HeaderControl
setMountPoint={setAppCenterControls}
controls={[
{
renderComponent: (
<ExperimentalBadge
popoverEnabled={true}
popoverAnchorPosition="downLeft"
/>
),
} as TopNavControlData,
]}
/>
);

const DESCRIPTION = `Design, experiment, and prototype your solutions with ${PLUGIN_NAME}. Build your search and last mile
ingestion flows with a visual interface. Experiment with different configurations with prototyping tools and launch them
into your environment.`;
Expand Down Expand Up @@ -244,6 +262,7 @@ export function Workflows(props: WorkflowsProps) {
/>
)}
{dataSourceEnabled && renderDataSourceComponent}
{USE_NEW_HOME_PAGE && experimentalBadgeInHeader}
<EuiPage>
<EuiPageBody>
<EuiPageHeader
Expand Down

0 comments on commit 970547d

Please sign in to comment.