Skip to content

Commit 0f4d00a

Browse files
authored
Merge pull request #3607 from RedisInsight/feature/RI-5924-new-feature-flag-for-rdi
New feature flag for rdi #5924
2 parents dfbc787 + 25c4f42 commit 0f4d00a

File tree

10 files changed

+19
-16
lines changed

10 files changed

+19
-16
lines changed

redisinsight/api/config/features-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": 2.5203,
33
"features": {
4-
"rdi": {
4+
"redisDataIntegration": {
55
"flag": true,
66
"perc": [[0,0]],
77
"filters": [

redisinsight/api/src/modules/feature/constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export enum KnownFeatures {
2727
RedisClient = 'redisClient',
2828
DocumentationChat = 'documentationChat',
2929
DatabaseChat = 'databaseChat',
30-
Rdi = 'rdi',
30+
Rdi = 'redisDataIntegration',
3131
HashFieldExpiration = 'hashFieldExpiration',
3232
}
3333

Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 1 addition & 1 deletion
Loading

redisinsight/ui/src/components/home-tabs/HomeTabs.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import reactRouterDom from 'react-router-dom'
33
import { cloneDeep } from 'lodash'
44
import { render, screen, fireEvent, act, cleanup, mockedStore } from 'uiSrc/utils/test-utils'
55

6-
import { Pages } from 'uiSrc/constants'
6+
import { FeatureFlags, Pages } from 'uiSrc/constants'
77
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
88
import { appFeatureFlagsFeaturesSelector, removeFeatureFromHighlighting } from 'uiSrc/slices/app/features'
99
import HomeTabs from './HomeTabs'
@@ -18,9 +18,9 @@ beforeEach(() => {
1818
jest.mock('uiSrc/slices/app/features', () => ({
1919
...jest.requireActual('uiSrc/slices/app/features'),
2020
appFeatureFlagsFeaturesSelector: jest.fn().mockReturnValue({
21-
rdi: {
21+
redisDataIntegration: {
2222
flag: true
23-
},
23+
}
2424
}),
2525
}))
2626

@@ -88,7 +88,7 @@ describe('HomeTabs', () => {
8888

8989
fireEvent.click(screen.getByTestId('home-tab-rdi-instances'))
9090

91-
const expectedActions = [removeFeatureFromHighlighting('rdi')]
91+
const expectedActions = [removeFeatureFromHighlighting(FeatureFlags.rdi)]
9292
expect(store.getActions()).toEqual(expectedActions)
9393
})
9494

redisinsight/ui/src/components/home-tabs/HomeTabs.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react'
22
import { EuiTab, EuiTabs } from '@elastic/eui'
33
import { useHistory, useLocation } from 'react-router-dom'
44
import { useDispatch, useSelector } from 'react-redux'
5-
import { Pages, PageValues } from 'uiSrc/constants'
5+
import { FeatureFlags, Pages, PageValues } from 'uiSrc/constants'
66
import { FeatureFlagComponent } from 'uiSrc/components'
77
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
88
import { BUILD_FEATURES } from 'uiSrc/constants/featuresHighlighting'
@@ -16,7 +16,7 @@ import styles from './styles.module.scss'
1616
const HomeTabs = () => {
1717
const [activeTab, setActiveTab] = useState('')
1818
const { features } = useSelector(appFeatureHighlightingSelector)
19-
const { rdi: rdiHighlighting } = getHighlightingFeatures(features)
19+
const { [FeatureFlags.rdi]: rdiHighlighting } = getHighlightingFeatures(features)
2020

2121
const history = useHistory()
2222
const { pathname } = useLocation()
@@ -35,7 +35,7 @@ const HomeTabs = () => {
3535
})
3636

3737
if (path === Pages.rdi) {
38-
dispatch(removeFeatureFromHighlighting('rdi'))
38+
dispatch(removeFeatureFromHighlighting(FeatureFlags.rdi))
3939
history.push(Pages.rdi)
4040
return
4141
}
@@ -55,7 +55,7 @@ const HomeTabs = () => {
5555
<HighlightedFeature
5656
isHighlight={rdiHighlighting}
5757
/* highlighting will remove in next release, do not need cover multiple tabs */
58-
{...(BUILD_FEATURES.rdi || {})}
58+
{...(BUILD_FEATURES.redisDataIntegration || {})}
5959
>
6060
{title}
6161
</HighlightedFeature>

redisinsight/ui/src/constants/featureFlags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export enum FeatureFlags {
44
cloudSsoRecommendedSettings = 'cloudSsoRecommendedSettings',
55
databaseChat = 'databaseChat',
66
documentationChat = 'documentationChat',
7-
rdi = 'rdi',
7+
rdi = 'redisDataIntegration',
88
hashFieldExpiration = 'hashFieldExpiration',
99
}

redisinsight/ui/src/constants/featuresHighlighting.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const BUILD_FEATURES: Record<string, BuildHighlightingFeature> = {
1414
aiChatbot: {
1515
type: 'dialog'
1616
},
17-
rdi: {
17+
redisDataIntegration: {
1818
type: 'tooltip-badge',
1919
title: '',
2020
content: 'Sync Redis databases with data from another database.',

redisinsight/ui/src/slices/app/features.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export const initialState: StateAppFeatures = {
4141
[FeatureFlags.hashFieldExpiration]: {
4242
flag: false
4343
},
44+
[FeatureFlags.rdi]: {
45+
flag: false
46+
}
4447
}
4548
}
4649
}

redisinsight/ui/src/slices/interfaces/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface IMessage {
4242

4343
export enum AppWorkspace {
4444
Databases = 'databases',
45-
RDI = 'rdi'
45+
RDI = 'redisDataIntegration'
4646
}
4747

4848
export interface StateAppInfo {

0 commit comments

Comments
 (0)