@@ -20,6 +20,8 @@ import { numberWithSpaces } from 'uiSrc/utils/numbers'
20
20
import { getApproximatePercentage } from 'uiSrc/utils/validations'
21
21
import { BrowserStorageItem , DEFAULT_DELIMITER } from 'uiSrc/constants'
22
22
import { appContextBrowserTree } from 'uiSrc/slices/app/context'
23
+ import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
24
+ import { ConnectionType } from 'uiSrc/slices/interfaces'
23
25
import AnalyticsTabs from 'uiSrc/components/analytics-tabs'
24
26
import { Nullable } from 'uiSrc/utils'
25
27
import { sendEventTelemetry , TelemetryEvent } from 'uiSrc/telemetry'
@@ -30,6 +32,9 @@ import styles from './styles.module.scss'
30
32
31
33
const dateFormat = 'd MMM yyyy HH:mm'
32
34
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
+
33
38
export interface Props {
34
39
items : ShortDatabaseAnalysis [ ]
35
40
selectedValue : Nullable < string >
@@ -47,6 +52,7 @@ const Header = (props: Props) => {
47
52
analysisLoading
48
53
} = props
49
54
55
+ const { connectionType } = useSelector ( connectedInstanceSelector )
50
56
const { instanceId } = useParams < { instanceId : string } > ( )
51
57
const dispatch = useDispatch ( )
52
58
@@ -150,7 +156,8 @@ const Header = (props: Props) => {
150
156
anchorClassName = { styles . tooltipAnchor }
151
157
className = { styles . tooltip }
152
158
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"
154
161
>
155
162
< EuiIcon
156
163
className = { styles . infoIcon }
0 commit comments