Skip to content

Commit 8b7226b

Browse files
authored
Merge pull request #3477 from RedisInsight/fe/feature/RI-5662-remove-tf
#RI-5662 - remove tf
2 parents 7732691 + bce1f8f commit 8b7226b

File tree

108 files changed

+41
-7351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+41
-7351
lines changed

redisinsight/ui/src/assets/img/triggers_and_functions_dark.svg

Lines changed: 0 additions & 45 deletions
This file was deleted.

redisinsight/ui/src/assets/img/triggers_and_functions_light.svg

Lines changed: 0 additions & 45 deletions
This file was deleted.

redisinsight/ui/src/components/explore-guides/icons.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import SearchIcon from 'uiSrc/assets/img/guides/search.svg?react'
22
import ProbabilisticDataIcon from 'uiSrc/assets/img/guides/probabilistic-data.svg?react'
33
import JSONIcon from 'uiSrc/assets/img/guides/json.svg?react'
44
import TimeSeriesIcon from 'uiSrc/assets/img/guides/time-series.svg?react'
5-
import TriggersAndFunctionsIcon from 'uiSrc/assets/img/guides/triggers-and-functions.svg?react'
65
import VectorSimilarity from 'uiSrc/assets/img/guides/vector-similarity.svg?react'
76

87
const GUIDE_ICONS: Record<string, any> = {
98
search: SearchIcon,
109
json: JSONIcon,
1110
'probabilistic-data-structures': ProbabilisticDataIcon,
1211
'time-series': TimeSeriesIcon,
13-
'triggers-and-functions': TriggersAndFunctionsIcon,
1412
'vector-similarity-search': VectorSimilarity
1513
}
1614

redisinsight/ui/src/components/main-router/constants/defaultRoutes.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import {
1212
import WorkbenchPage from 'uiSrc/pages/workbench'
1313
import PubSubPage from 'uiSrc/pages/pub-sub'
1414
import AnalyticsPage from 'uiSrc/pages/analytics'
15-
import TriggeredFunctionsPage from 'uiSrc/pages/triggered-functions'
1615
import RdiList from 'uiSrc/pages/rdi/home'
17-
import { ANALYTICS_ROUTES, RDI_ROUTES, TRIGGERED_FUNCTIONS_ROUTES } from './sub-routes'
16+
import { ANALYTICS_ROUTES, RDI_ROUTES } from './sub-routes'
1817

1918
import COMMON_ROUTES from './commonRoutes'
2019

@@ -39,11 +38,6 @@ const INSTANCE_ROUTES: IRoute[] = [
3938
component: AnalyticsPage,
4039
routes: ANALYTICS_ROUTES,
4140
},
42-
{
43-
path: Pages.triggeredFunctions(':instanceId'),
44-
component: TriggeredFunctionsPage,
45-
routes: TRIGGERED_FUNCTIONS_ROUTES
46-
}
4741
]
4842

4943
const ROUTES: IRoute[] = [

redisinsight/ui/src/components/main-router/constants/redisStackRoutes.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import EditConnection from 'uiSrc/pages/redis-stack/components/edit-connection'
99
import ClusterDetailsPage from 'uiSrc/pages/cluster-details'
1010
import AnalyticsPage from 'uiSrc/pages/analytics'
1111
import DatabaseAnalysisPage from 'uiSrc/pages/database-analysis'
12-
import TriggeredFunctionsPage from 'uiSrc/pages/triggered-functions'
13-
import { LibrariesPage, FunctionsPage } from 'uiSrc/pages/triggered-functions/pages'
1412
import COMMON_ROUTES from './commonRoutes'
1513

1614
const ANALYTICS_ROUTES: IRoute[] = [
@@ -34,21 +32,6 @@ const ANALYTICS_ROUTES: IRoute[] = [
3432
},
3533
]
3634

37-
const TRIGGERED_FUNCTIONS_ROUTES: IRoute[] = [
38-
{
39-
pageName: PageNames.triggeredFunctionsFunctions,
40-
path: Pages.triggeredFunctionsFunctions(':instanceId'),
41-
protected: true,
42-
component: FunctionsPage,
43-
},
44-
{
45-
pageName: PageNames.triggeredFunctionsLibraries,
46-
path: Pages.triggeredFunctionsLibraries(':instanceId'),
47-
protected: true,
48-
component: LibrariesPage,
49-
},
50-
]
51-
5235
const INSTANCE_ROUTES: IRoute[] = [
5336
{
5437
pageName: PageNames.browser,
@@ -74,11 +57,6 @@ const INSTANCE_ROUTES: IRoute[] = [
7457
component: AnalyticsPage,
7558
routes: ANALYTICS_ROUTES,
7659
},
77-
{
78-
path: Pages.triggeredFunctions(':instanceId'),
79-
component: TriggeredFunctionsPage,
80-
routes: TRIGGERED_FUNCTIONS_ROUTES
81-
}
8260
]
8361

8462
const ROUTES: IRoute[] = [
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { ANALYTICS_ROUTES } from './analyticsRoutes'
2-
import { TRIGGERED_FUNCTIONS_ROUTES } from './triggeredFunctionsRoutes'
32
import { RDI_ROUTES } from './rdiRoutes'
43

54
export {
65
ANALYTICS_ROUTES,
7-
TRIGGERED_FUNCTIONS_ROUTES,
86
RDI_ROUTES,
97
}

redisinsight/ui/src/components/main-router/constants/sub-routes/triggeredFunctionsRoutes.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

redisinsight/ui/src/components/messages/module-not-loaded-minimalized/constants.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@ export const MODULE_CAPABILITY_TEXT_NOT_AVAILABLE: { [key in RedisDefaultModules
2020
title: 'Time series data structure is not available',
2121
text: 'Create a free Redis Stack database with the time series data structure that extends the core capabilities of your Redis.'
2222
},
23-
[RedisDefaultModules.RedisGears]: {
24-
title: 'Triggers and functions capability is not available',
25-
text: 'Create a free Redis Stack database with triggers and functions that extend the core capabilities of your Redis.'
26-
},
2723
}

redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
EuiToolTip
1414
} from '@elastic/eui'
1515
import HighlightedFeature, { Props as HighlightedFeatureProps } from 'uiSrc/components/hightlighted-feature/HighlightedFeature'
16-
import { ANALYTICS_ROUTES, TRIGGERED_FUNCTIONS_ROUTES } from 'uiSrc/components/main-router/constants/sub-routes'
16+
import { ANALYTICS_ROUTES } from 'uiSrc/components/main-router/constants/sub-routes'
1717

1818
import { PageNames, Pages } from 'uiSrc/constants'
1919
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
@@ -34,8 +34,6 @@ import SlowLogSVG from 'uiSrc/assets/img/sidebar/slowlog.svg'
3434
import SlowLogActiveSVG from 'uiSrc/assets/img/sidebar/slowlog_active.svg'
3535
import PubSubSVG from 'uiSrc/assets/img/sidebar/pubsub.svg'
3636
import PubSubActiveSVG from 'uiSrc/assets/img/sidebar/pubsub_active.svg'
37-
import TriggeredFunctionsSVG from 'uiSrc/assets/img/sidebar/gears.svg'
38-
import TriggeredFunctionsActiveSVG from 'uiSrc/assets/img/sidebar/gears_active.svg'
3937
import GithubSVG from 'uiSrc/assets/img/sidebar/github.svg'
4038
import Divider from 'uiSrc/components/divider/Divider'
4139
import { BuildType } from 'uiSrc/constants/env'
@@ -87,10 +85,6 @@ const NavigationMenu = () => {
8785
({ path }) => (`/${last(path.split('/'))}` === activePage)
8886
)
8987

90-
const isTriggeredFunctionsPath = (activePage: string) => !!TRIGGERED_FUNCTIONS_ROUTES.find(
91-
({ path }) => (`/${last(path.split('/'))}` === activePage)
92-
)
93-
9488
const getAdditionPropsForHighlighting = (pageName: string): Omit<HighlightedFeatureProps, 'children'> => {
9589
if (BUILD_FEATURES[pageName]?.asPageFeature) {
9690
return ({
@@ -167,23 +161,6 @@ const NavigationMenu = () => {
167161
},
168162
onboard: ONBOARDING_FEATURES.PUB_SUB_PAGE
169163
},
170-
{
171-
tooltipText: 'Triggers and Functions',
172-
pageName: PageNames.triggeredFunctions,
173-
ariaLabel: 'Triggers and Functions',
174-
onClick: () => handleGoPage(Pages.triggeredFunctions(connectedInstanceId)),
175-
dataTestId: 'triggered-functions-page-btn',
176-
connectedInstanceId,
177-
isActivePage: isTriggeredFunctionsPath(activePage),
178-
isBeta: true,
179-
getClassName() {
180-
return cx(styles.navigationButton, { [styles.active]: this.isActivePage })
181-
},
182-
getIconType() {
183-
return this.isActivePage ? TriggeredFunctionsActiveSVG : TriggeredFunctionsSVG
184-
},
185-
onboard: ONBOARDING_FEATURES.TRIGGERED_FUNCTIONS_PAGE
186-
},
187164
]
188165

189166
const publicRoutes: INavigations[] = [

redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.spec.tsx

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import React from 'react'
22
import { cloneDeep } from 'lodash'
33
import { cleanup, fireEvent, mockedStore, render, within } from 'uiSrc/utils/test-utils'
44
import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
5-
import { addFreeDb, oauthCloudPlanSelector, oauthCloudSelector, initialState } from 'uiSrc/slices/oauth/cloud'
5+
import { addFreeDb, oauthCloudPlanSelector } from 'uiSrc/slices/oauth/cloud'
66
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
7-
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
87
import { MOCK_NO_TF_REGION, MOCK_REGIONS, MOCK_RS_PREVIEW_REGION, MOCK_CUSTOM_REGIONS } from 'uiSrc/constants/mocks/mock-sso'
98
import OAuthSelectPlan from './OAuthSelectPlan'
109

@@ -33,16 +32,6 @@ jest.mock('uiSrc/slices/app/features', () => ({
3332
data: {
3433
selectPlan: {
3534
components: {
36-
triggersAndFunctions: [
37-
{
38-
provider: 'AWS',
39-
regions: ['ap-southeast-1']
40-
},
41-
{
42-
provider: 'GCP',
43-
regions: ['asia-northeast1']
44-
}
45-
],
4635
redisStackPreview: [
4736
{
4837
provider: 'AWS',
@@ -118,21 +107,7 @@ describe('OAuthSelectPlan', () => {
118107
expect(store.getActions()).toEqual(expectedActions)
119108
})
120109

121-
it('if source is Trigger and Functions region with TF should be selected by default', async () => {
122-
(oauthCloudSelector as jest.Mock).mockReturnValue({
123-
...initialState,
124-
source: OAuthSocialSource.TriggersAndFunctions,
125-
})
126-
127-
const container = render(<OAuthSelectPlan />)
128-
129-
const { queryByTestId } = within(container.queryByTestId('select-oauth-region') as HTMLElement)
130-
const tfIconEl = queryByTestId(/tf-icon-/)
131-
132-
expect(tfIconEl).toBeInTheDocument()
133-
})
134-
135-
it('if source is not Trigger and Functions region with RS should be selected by default', async () => {
110+
it('region with RS should be selected by default', async () => {
136111
const container = render(<OAuthSelectPlan />)
137112

138113
const { queryByTestId } = within(container.queryByTestId('select-oauth-region') as HTMLElement)
@@ -198,19 +173,6 @@ describe('OAuthSelectPlan', () => {
198173
expect(rsTextEl).toBeInTheDocument()
199174
})
200175

201-
it('should display text if no Trigger and Function regions available on this vendor', async () => {
202-
(oauthCloudPlanSelector as jest.Mock).mockReturnValue({
203-
isOpenDialog: true,
204-
data: [MOCK_NO_TF_REGION],
205-
})
206-
207-
const { queryByTestId } = render(<OAuthSelectPlan />)
208-
const selectDescriptionEl = queryByTestId('select-region-select-description')
209-
210-
expect(selectDescriptionEl).toBeInTheDocument()
211-
expect(selectDescriptionEl).toHaveTextContent('This vendor does not support triggers and functions capability.')
212-
})
213-
214176
it('should display text if regions is no available on this venodor', async () => {
215177
(oauthCloudPlanSelector as jest.Mock).mockReturnValue({
216178
isOpenDialog: true,

0 commit comments

Comments
 (0)