Skip to content

Commit 4013913

Browse files
#RI-3699-update tooltips on new report icon
1 parent fec0f76 commit 4013913

File tree

1 file changed

+8
-1
lines changed
  • redisinsight/ui/src/pages/databaseAnalysis/components/header

1 file changed

+8
-1
lines changed

redisinsight/ui/src/pages/databaseAnalysis/components/header/Header.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import { numberWithSpaces } from 'uiSrc/utils/numbers'
2020
import { getApproximatePercentage } from 'uiSrc/utils/validations'
2121
import { BrowserStorageItem, DEFAULT_DELIMITER } from 'uiSrc/constants'
2222
import { appContextBrowserTree } from 'uiSrc/slices/app/context'
23+
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
24+
import { ConnectionType } from 'uiSrc/slices/interfaces'
2325
import AnalyticsTabs from 'uiSrc/components/analytics-tabs'
2426
import { Nullable } from 'uiSrc/utils'
2527
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
@@ -30,6 +32,9 @@ import styles from './styles.module.scss'
3032

3133
const dateFormat = 'd MMM yyyy HH:mm'
3234

35+
const commonTooltipMessage = 'Analyze up to 10,000 keys per shard to get an overview of your data.'
36+
const clusterTooltipMessage = 'Analyze up to 10,000 keys per Redis database to get an overview of your data.'
37+
3338
export interface Props {
3439
items: ShortDatabaseAnalysis[]
3540
selectedValue: Nullable<string>
@@ -47,6 +52,7 @@ const Header = (props: Props) => {
4752
analysisLoading
4853
} = props
4954

55+
const { connectionType } = useSelector(connectedInstanceSelector)
5056
const { instanceId } = useParams<{ instanceId: string }>()
5157
const dispatch = useDispatch()
5258

@@ -150,7 +156,8 @@ const Header = (props: Props) => {
150156
anchorClassName={styles.tooltipAnchor}
151157
className={styles.tooltip}
152158
title="Memory Efficiency"
153-
content="Analyze up to 10K keys in your Redis database to get an overview of your data and memory efficiency recommendations."
159+
content={connectionType === ConnectionType.Cluster ? clusterTooltipMessage : commonTooltipMessage}
160+
data-testid="db-new-reports-tooltip"
154161
>
155162
<EuiIcon
156163
className={styles.infoIcon}

0 commit comments

Comments
 (0)