diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/CredentialsDownload.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/CredentialsDownload.tsx index d2b747fbfc..11540140f6 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/CredentialsDownload.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/CredentialsDownload.tsx @@ -22,7 +22,7 @@ const CredentialsDownload: React.FC<{ cluster: Cluster }> = ({ cluster }) => { const clusterWizardContext = useClusterWizardContext(); const [isChecked, setIsChecked] = React.useState(false); const [isDownloading, setIsDownloading] = React.useState(false); - const { addAlert } = useAlerts(); + const { addAlert, clearAlerts } = useAlerts(); const { t } = useTranslation(); const downloadSingleFile = async (fileName: string) => { @@ -42,6 +42,7 @@ const CredentialsDownload: React.FC<{ cluster: Cluster }> = ({ cluster }) => { }; const handleDownloadClick = async () => { + clearAlerts(); setIsDownloading(true); const configSuccess = await downloadSingleFile('kubeconfig'); diff --git a/libs/ui-lib/lib/ocm/components/clusters/AssistedInstallerHeader.tsx b/libs/ui-lib/lib/ocm/components/clusters/AssistedInstallerHeader.tsx index 0ba87120fe..114e3346ab 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/AssistedInstallerHeader.tsx @@ -1,13 +1,21 @@ import React from 'react'; import { TextContent, Text, Split, SplitItem } from '@patternfly/react-core'; -import { ASSISTED_INSTALLER_DOCUMENTATION_LINK, ExternalLink, isInOcm } from '../../../common'; +import { + ASSISTED_INSTALLER_DOCUMENTATION_LINK, + DeveloperPreview, + ExternalLink, + isInOcm, +} from '../../../common'; +import { useFeature } from '../../hooks/use-feature'; export const AssistedInstallerHeader = () => { + const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE'); return ( Install OpenShift with the Assisted Installer + {isSingleClusterFeatureEnabled && } diff --git a/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx b/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx index 97ffe7238a..d04534710b 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/ClusterPage.tsx @@ -205,6 +205,9 @@ export const SingleClusterPage = ({ resetModal: React.ReactNode; }) => ( + + + ); diff --git a/libs/ui-lib/lib/ocm/components/clusters/NewClusterPage.tsx b/libs/ui-lib/lib/ocm/components/clusters/NewClusterPage.tsx index ae6ccbaf7e..8b9b72c5d6 100644 --- a/libs/ui-lib/lib/ocm/components/clusters/NewClusterPage.tsx +++ b/libs/ui-lib/lib/ocm/components/clusters/NewClusterPage.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import React from 'react'; import { PageSectionVariants, PageSection } from '@patternfly/react-core'; import { AlertsContextProvider } from '../../../common'; import ClusterBreadcrumbs from './ClusterBreadcrumbs'; @@ -13,7 +13,7 @@ import { AssistedInstallerHeader } from './AssistedInstallerHeader'; import { ModalDialogsContextProvider } from '../hosts/ModalDialogsContext'; import { OpenShiftVersionsContextProvider } from '../clusterWizard/OpenShiftVersionsContext'; -const NewClusterPageGeneric = ({ pageTitleSection }: { pageTitleSection?: ReactNode }) => { +const NewClusterPageGeneric = ({ children }: React.PropsWithChildren) => { return ( @@ -24,7 +24,10 @@ const NewClusterPageGeneric = ({ pageTitleSection }: { pageTitleSection?: ReactN > }> - {pageTitleSection} + {children} + + + @@ -39,16 +42,9 @@ const NewClusterPageGeneric = ({ pageTitleSection }: { pageTitleSection?: ReactN ); }; -const NewClusterTitleSection = () => ( - <> - - - - - -); - export const NewSingleClusterPage = () => ; export const NewClusterPage = () => ( - } /> + + + );