Skip to content

Commit 9f40330

Browse files
Merge pull request #4076 from RedisInsight/e2e/feature/RI-5743-Rename-capabilities
E2e/feature/ri 5743 rename capabilities
2 parents f3da0b8 + f1ddbc8 commit 9f40330

File tree

26 files changed

+107
-104
lines changed

26 files changed

+107
-104
lines changed

redisinsight/api/src/__mocks__/rdi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ export const mockRdiConfigSchema = {
311311
default: 1000,
312312
},
313313
target_data_type: {
314-
title: 'Target data type: hash/json - RedisJSON module must be in use in the target DB',
314+
title: 'Target data type: hash/json - JSON module must be in use in the target DB',
315315
type: 'string',
316316
pattern: '^\\${.*}$|hash|json',
317317
default: 'hash',
318318
},
319319
json_update_strategy: {
320-
title: 'Target update strategy: replace/merge - RedisJSON module must be in use in the target DB',
320+
title: 'Target update strategy: replace/merge - JSON module must be in use in the target DB',
321321
type: 'string',
322322
pattern: '^\\${.*}$|replace|merge',
323323
default: 'replace',

redisinsight/api/src/modules/browser/rejson-rl/rejson-rl.service.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ describe('JsonService', () => {
181181
} catch (err) {
182182
expect(err).toBeInstanceOf(BadRequestException);
183183
expect(err.message).toEqual(
184-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
184+
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON'),
185185
);
186186
}
187187
});
@@ -923,7 +923,7 @@ describe('JsonService', () => {
923923
} catch (err) {
924924
expect(err).toBeInstanceOf(BadRequestException);
925925
expect(err.message).toEqual(
926-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
926+
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON'),
927927
);
928928
}
929929
});
@@ -1004,7 +1004,7 @@ describe('JsonService', () => {
10041004
} catch (err) {
10051005
expect(err).toBeInstanceOf(BadRequestException);
10061006
expect(err.message).toEqual(
1007-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
1007+
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON'),
10081008
);
10091009
}
10101010
});
@@ -1097,7 +1097,7 @@ describe('JsonService', () => {
10971097
} catch (err) {
10981098
expect(err).toBeInstanceOf(BadRequestException);
10991099
expect(err.message).toEqual(
1100-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
1100+
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON'),
11011101
);
11021102
}
11031103
});
@@ -1170,7 +1170,7 @@ describe('JsonService', () => {
11701170
} catch (err) {
11711171
expect(err).toBeInstanceOf(BadRequestException);
11721172
expect(err.message).toEqual(
1173-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
1173+
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON'),
11741174
);
11751175
}
11761176
});

redisinsight/api/src/modules/browser/rejson-rl/rejson-rl.service.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ export class RejsonRlService {
253253
}
254254

255255
if (error.message.includes(RedisErrorCodes.UnknownCommand)) {
256-
throw new BadRequestException(
257-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
258-
);
256+
throw new BadRequestException({
257+
message: ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON')
258+
});
259259
}
260260

261261
throw catchAclError(error);
@@ -307,9 +307,9 @@ export class RejsonRlService {
307307
}
308308

309309
if (error.message.includes(RedisErrorCodes.UnknownCommand)) {
310-
throw new BadRequestException(
311-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
312-
);
310+
throw new BadRequestException({
311+
message: ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON')
312+
});
313313
}
314314

315315
// todo: refactor error handling across the project
@@ -361,9 +361,9 @@ export class RejsonRlService {
361361
}
362362

363363
if (error.message.includes(RedisErrorCodes.UnknownCommand)) {
364-
throw new BadRequestException(
365-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
366-
);
364+
throw new BadRequestException({
365+
message: ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON')
366+
});
367367
}
368368

369369
throw catchAclError(error);
@@ -402,9 +402,9 @@ export class RejsonRlService {
402402
}
403403

404404
if (error.message.includes(RedisErrorCodes.UnknownCommand)) {
405-
throw new BadRequestException(
406-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
407-
);
405+
throw new BadRequestException({
406+
message: ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON')
407+
});
408408
}
409409

410410
throw catchAclError(error);
@@ -443,9 +443,9 @@ export class RejsonRlService {
443443
}
444444

445445
if (error.message.includes(RedisErrorCodes.UnknownCommand)) {
446-
throw new BadRequestException(
447-
ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('RedisJSON'),
448-
);
446+
throw new BadRequestException({
447+
message: ERROR_MESSAGES.REDIS_MODULE_IS_REQUIRED('JSON')
448+
});
449449
}
450450

451451
throw catchAclError(error);

redisinsight/api/src/modules/database/providers/database-overview.provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class DatabaseOverviewProvider {
219219
return [undefined, undefined];
220220
}
221221

222-
const totalKeysPerDb = {};
222+
const totalKeysPerDb: Record<string, number> = {};
223223

224224
masterNodes.forEach((node) => {
225225
map(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export const MODULE_CAPABILITY_TEXT_NOT_AVAILABLE: { [key in RedisDefaultModules
99
text: 'Create a free Redis Stack database with probabilistic data structures that extend the core capabilities of your Redis.'
1010
},
1111
[RedisDefaultModules.ReJSON]: {
12-
title: 'JSON capability is not available',
12+
title: 'JSON data structure is not available',
1313
text: 'Create a free Redis Stack database with JSON capability that extends the core capabilities of your Redis.'
1414
},
1515
[RedisDefaultModules.Search]: {
16-
title: 'Search and query capability is not available',
16+
title: 'Redis Query Engine capability is not available',
1717
text: 'Create a free Redis Stack database with search and query features that extend the core capabilities of your Redis.'
1818
},
1919
[RedisDefaultModules.TimeSeries]: {

redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoaded.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ import { getDbWithModuleLoaded } from 'uiSrc/utils'
1818
import { useCapability } from 'uiSrc/services'
1919
import styles from './styles.module.scss'
2020

21+
export const MODULE_OAUTH_SOURCE_MAP: { [key in RedisDefaultModules]?: String } = {
22+
[RedisDefaultModules.Bloom]: 'RedisBloom',
23+
[RedisDefaultModules.ReJSON]: 'RedisJSON',
24+
[RedisDefaultModules.Search]: 'RediSearch',
25+
[RedisDefaultModules.TimeSeries]: 'RedisTimeSeries',
26+
}
27+
2128
export interface IProps {
2229
moduleName: RedisDefaultModules
2330
id: string
@@ -31,7 +38,7 @@ const MAX_ELEMENT_WIDTH = 1440
3138
const renderTitle = (width: number, moduleName?: string) => (
3239
<EuiTitle size="m" className={styles.title} data-testid="welcome-page-title">
3340
<h4>
34-
{`${moduleName} ${moduleName === MODULE_TEXT_VIEW.redisgears ? 'are' : 'is'} not available `}
41+
{`${moduleName} ${[MODULE_TEXT_VIEW.redisgears, MODULE_TEXT_VIEW.bf].includes(moduleName) ? 'are' : 'is'} not available `}
3542
{width > MAX_ELEMENT_WIDTH && <br />}
3643
for this database
3744
</h4>
@@ -51,7 +58,8 @@ const ModuleNotLoaded = ({ moduleName, id, type = 'workbench', onClose }: IProps
5158
const [width, setWidth] = useState(0)
5259
const freeInstances = useSelector(freeInstancesSelector) || []
5360

54-
const module = MODULE_TEXT_VIEW[moduleName]
61+
const module = MODULE_OAUTH_SOURCE_MAP[moduleName]
62+
5563
const freeDbWithModule = getDbWithModuleLoaded(freeInstances, moduleName)
5664
const source = type === 'browser' ? OAuthSocialSource.BrowserSearch : OAuthSocialSource[module]
5765

@@ -104,7 +112,7 @@ const ModuleNotLoaded = ({ moduleName, id, type = 'workbench', onClose }: IProps
104112
)}
105113
</div>
106114
<div className={styles.contentWrapper}>
107-
{renderTitle(width, module)}
115+
{renderTitle(width, MODULE_TEXT_VIEW[moduleName])}
108116
<EuiText className={styles.bigText}>
109117
{CONTENT[moduleName]?.text.map((item: string) => (
110118
width > MIN_ELEMENT_WIDTH ? <>{item}<br /></> : item
@@ -122,7 +130,7 @@ const ModuleNotLoaded = ({ moduleName, id, type = 'workbench', onClose }: IProps
122130
))}
123131
</EuiText>
124132
)}
125-
{renderText(module)}
133+
{renderText(MODULE_TEXT_VIEW[moduleName])}
126134
</div>
127135
</div>
128136
<div className={styles.linksWrapper}>

redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/expert-chat/ExpertChat.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,16 @@ const ExpertChat = () => {
173173
if (!instanceId) {
174174
return {
175175
title: 'Open a database',
176-
content: 'Open your Redis database with search & query, or create a new database to get started.'
176+
content: 'Open your Redis database with Redis Query Engine, or create a new database to get started.'
177177
}
178178
}
179179

180180
if (!isRedisearchAvailable(modules)) {
181181
return {
182-
title: 'Search & query capability is not available',
182+
title: 'Redis Query Engine capability is not available',
183183
content: freeInstances?.length
184184
? 'Use your free all-in-one Redis Cloud database to start exploring these capabilities.'
185-
: 'Create a free Redis Stack database with search & query capability that extends the core capabilities of open-source Redis.',
185+
: 'Create a free Redis Stack database with Redis Query Engine capability that extends the core capabilities of open-source Redis.',
186186
icon: (
187187
<EuiIcon
188188
className={styles.iconTelescope}

redisinsight/ui/src/constants/help-texts.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,15 @@ import styles from 'uiSrc/pages/browser/components/popover-delete/styles.module.
77
export default {
88
REJSON_SHOULD_BE_LOADED: (
99
<>
10-
RedisJSON module should be loaded to add this key. Find&nbsp;
11-
<a
12-
href="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/json/?utm_source=redisinsight&utm_medium=app&utm_campaign=redisinsight_tutorials"
13-
className="link-underline"
14-
target="_blank"
15-
rel="noreferrer"
16-
>
17-
more information
18-
</a>
19-
&nbsp;
20-
about RedisJSON or create your&nbsp;
21-
<a href={`${EXTERNAL_LINKS.tryFree}?utm_source=redis&utm_medium=app&utm_campaign=redisinsight_redisjson`} className="link-underline" target="_blank" rel="noreferrer">
22-
free Redis database
23-
</a>
24-
&nbsp;
25-
with RedisJSON on Redis Cloud.
10+
This database does not support the JSON data structure. Learn more about JSON support
11+
{' '}
12+
<a href="https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/json/" target="_blank" rel="noreferrer">here</a>.
13+
{' '}
14+
You can also create a
15+
{' '}
16+
<a href="https://redis.io/try-free/" target="_blank" rel="noreferrer">free Redis Cloud database</a>
17+
{' '}
18+
with built-in JSON support.
2619
</>
2720
),
2821
REMOVE_LAST_ELEMENT: (fieldType: string) => (

redisinsight/ui/src/constants/mocks/mock-recommendations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
875875
type: 'link',
876876
value: {
877877
href: 'https://redis.io/docs/interact/search-and-query/',
878-
name: 'RediSearch'
878+
name: 'Redis Query Engine'
879879
}
880880
},
881881
{

redisinsight/ui/src/constants/workbenchResults.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const EMPTY_COMMAND = 'Encrypted data'
66

77
export const MODULE_NOT_LOADED_CONTENT: { [key in RedisDefaultModules]?: any } = {
88
[RedisDefaultModules.TimeSeries]: {
9-
text: ['RedisTimeSeries adds a Time Series data structure to Redis. ', 'With this capability you can:'],
9+
text: ['Time series data structure adds the capability to:'],
1010
improvements: [
1111
'Add sample data',
1212
'Perform cross-time-series range and aggregation queries',
@@ -15,7 +15,7 @@ export const MODULE_NOT_LOADED_CONTENT: { [key in RedisDefaultModules]?: any } =
1515
link: 'https://redis.io/docs/latest/develop/data-types/timeseries/'
1616
},
1717
[RedisDefaultModules.Search]: {
18-
text: ['RediSearch adds the capability to:'],
18+
text: ['Redis Query Engine allows to:'],
1919
improvements: [
2020
'Query',
2121
'Secondary index',
@@ -25,32 +25,32 @@ export const MODULE_NOT_LOADED_CONTENT: { [key in RedisDefaultModules]?: any } =
2525
link: 'https://redis.io/docs/interact/search-and-query/'
2626
},
2727
[RedisDefaultModules.ReJSON]: {
28-
text: ['RedisJSON adds the capability to:'],
28+
text: ['JSON adds the capability to:'],
2929
improvements: [
3030
'Store JSON documents',
3131
'Update JSON documents',
3232
'Retrieve JSON documents'
3333
],
34-
additionalText: ['RedisJSON also works seamlessly with RediSearch to let you index and query JSON documents.'],
34+
additionalText: ['JSON data structure also works seamlessly with Redis Query Engine to let you index and query JSON documents.'],
3535
link: 'https://redis.io/docs/latest/develop/data-types/json/'
3636
},
3737
[RedisDefaultModules.Bloom]: {
38-
text: ['RedisBloom adds a set of probabilistic data structures to Redis, including:'],
38+
text: ['Probabilistic data structures include:'],
3939
improvements: [
4040
'Bloom filter',
4141
'Cuckoo filter',
4242
'Count-min sketch',
4343
'Top-K',
4444
'T-digest'
4545
],
46-
additionalText: ['With this capability you can query streaming data without needing to store all the elements of the stream.'],
46+
additionalText: ['With these data structures, you can query streaming data without needing to store all the elements of the stream.'],
4747
link: 'https://redis.io/docs/latest/develop/data-types/probabilistic/bloom-filter/'
4848
},
4949
}
5050

5151
export const MODULE_TEXT_VIEW: { [key in RedisDefaultModules]?: string } = {
52-
[RedisDefaultModules.Bloom]: 'RedisBloom',
53-
[RedisDefaultModules.ReJSON]: 'RedisJSON',
54-
[RedisDefaultModules.Search]: 'RediSearch',
55-
[RedisDefaultModules.TimeSeries]: 'RedisTimeSeries',
52+
[RedisDefaultModules.Bloom]: 'Probabilistic data structures',
53+
[RedisDefaultModules.ReJSON]: 'JSON data structure',
54+
[RedisDefaultModules.Search]: 'Redis Query Engine',
55+
[RedisDefaultModules.TimeSeries]: 'Time series data structure',
5656
}

0 commit comments

Comments
 (0)