Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ const OAuthSelectPlan = () => {
<EuiModal className={styles.container} onClose={handleOnClose} data-testid="oauth-select-plan-dialog">
<EuiModalBody className={styles.modalBody}>
<section className={styles.content}>
<EuiText className={styles.subTitle}>
Redis Enterprise Cloud
</EuiText>
<EuiTitle size="s">
<h2 className={styles.title}>Select cloud vendor</h2>
<h2 className={styles.title}>Choose a cloud vendor</h2>
</EuiTitle>
<EuiText className={styles.subTitle}>
Select a cloud vendor and region to complete the final step towards
your free Redis database. No credit card is required.
</EuiText>
<section className={styles.providers}>
{ OAuthProviders.map(({ icon, id, label }) => (
<div className={styles.provider} key={id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
.title {
font-size: 28px !important;
color: var(--htmlColor) !important;
padding-top: 16px;
}

.subTitle {
padding-top: 24px;
padding-bottom: 8px;
padding: 24px 40px 0;
font-size: 14px !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { setSignInDialogState } from 'uiSrc/slices/oauth/cloud'

export interface Props {
children: (ssoCloudHandlerClick: (e: React.MouseEvent, source: OAuthSocialSource) => void) => React.ReactElement
children: (
ssoCloudHandlerClick: (e: React.MouseEvent, source: OAuthSocialSource) => void,
isSSOEnabled: boolean,
) => React.ReactElement
}

const OAuthSsoHandlerDialog = ({ children }: Props) => {
Expand All @@ -32,7 +35,7 @@ const OAuthSsoHandlerDialog = ({ children }: Props) => {
})
}

return children?.(ssoCloudHandlerClick)
return children?.(ssoCloudHandlerClick, !!feature?.flag)
}

export default OAuthSsoHandlerDialog
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
const linkStyles = stylesCss ? stylesCss[theme] : {}
const promoLink = (
<OAuthSsoHandlerDialog>
{(ssoCloudHandlerClick) => (
{(ssoCloudHandlerClick, isSSOEnabled) => (
<PromoLink
title={title}
description={description}
Expand All @@ -199,7 +199,10 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
: undefined
}}
onClick={(e) => {
handleCreateDatabaseClick(HELP_LINKS.cloud.event, { source: 'My Redis databases' })
!isSSOEnabled && handleCreateDatabaseClick(
HELP_LINKS.cloud.event,
{ source: HELP_LINKS.cloud.sources.databaseList },
)
ssoCloudHandlerClick(e, OAuthSocialSource.ListOfDatabases)
}}
/>
Expand Down