Skip to content

Commit 14c245f

Browse files
committed
Merge branch 'main' into feature/RI-4437
2 parents c56c9d5 + e7b37c9 commit 14c245f

File tree

38 files changed

+128
-53
lines changed

38 files changed

+128
-53
lines changed

redisinsight/api/src/modules/analytics/analytics.service.spec.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { AppType } from 'src/modules/server/models/server';
1010
import { SettingsService } from 'src/modules/settings/settings.service';
1111
import {
1212
AnalyticsService,
13+
Telemetry,
1314
NON_TRACKING_ANONYMOUS_ID,
1415
} from './analytics.service';
1516

@@ -95,6 +96,11 @@ describe('AnalyticsService', () => {
9596
anonymousId: mockAnonymousId,
9697
integrations: { Amplitude: { session_id: sessionId } },
9798
event: TelemetryEvents.ApplicationStarted,
99+
context: {
100+
traits: {
101+
telemetry: Telemetry.Enabled,
102+
},
103+
},
98104
properties: {
99105
anonymousId: mockAnonymousId,
100106
buildType: AppType.Electron,
@@ -128,6 +134,11 @@ describe('AnalyticsService', () => {
128134
anonymousId: NON_TRACKING_ANONYMOUS_ID,
129135
integrations: { Amplitude: { session_id: sessionId } },
130136
event: TelemetryEvents.ApplicationStarted,
137+
context: {
138+
traits: {
139+
telemetry: Telemetry.Disabled,
140+
},
141+
},
131142
properties: {
132143
anonymousId: mockAnonymousId,
133144
buildType: AppType.Electron,
@@ -150,6 +161,11 @@ describe('AnalyticsService', () => {
150161
anonymousId: mockAnonymousId,
151162
integrations: { Amplitude: { session_id: sessionId } },
152163
event: TelemetryEvents.ApplicationStarted,
164+
context: {
165+
traits: {
166+
telemetry: Telemetry.Enabled,
167+
},
168+
},
153169
properties: {
154170
anonymousId: mockAnonymousId,
155171
buildType: AppType.Electron,
@@ -186,6 +202,11 @@ describe('AnalyticsService', () => {
186202
anonymousId: mockAnonymousId,
187203
integrations: { Amplitude: { session_id: sessionId } },
188204
name: TelemetryEvents.ApplicationStarted,
205+
context: {
206+
traits: {
207+
telemetry: Telemetry.Enabled,
208+
},
209+
},
189210
properties: {
190211
anonymousId: mockAnonymousId,
191212
buildType: AppType.Electron,
@@ -219,6 +240,11 @@ describe('AnalyticsService', () => {
219240
anonymousId: NON_TRACKING_ANONYMOUS_ID,
220241
integrations: { Amplitude: { session_id: sessionId } },
221242
name: TelemetryEvents.ApplicationStarted,
243+
context: {
244+
traits: {
245+
telemetry: Telemetry.Disabled,
246+
},
247+
},
222248
properties: {
223249
anonymousId: mockAnonymousId,
224250
buildType: AppType.Electron,
@@ -241,6 +267,11 @@ describe('AnalyticsService', () => {
241267
anonymousId: mockAnonymousId,
242268
integrations: { Amplitude: { session_id: sessionId } },
243269
name: TelemetryEvents.ApplicationStarted,
270+
context: {
271+
traits: {
272+
telemetry: Telemetry.Enabled,
273+
},
274+
},
244275
properties: {
245276
anonymousId: mockAnonymousId,
246277
buildType: AppType.Electron,

redisinsight/api/src/modules/analytics/analytics.service.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export interface ITelemetryInitEvent {
2424
appVersion: string;
2525
}
2626

27+
export enum Telemetry {
28+
Enabled = 'enabled',
29+
Disabled = 'disabled',
30+
}
31+
2732
@Injectable()
2833
export class AnalyticsService {
2934
private anonymousId: string = NON_TRACKING_ANONYMOUS_ID;
@@ -83,6 +88,11 @@ export class AnalyticsService {
8388
anonymousId: !isAnalyticsGranted && nonTracking ? NON_TRACKING_ANONYMOUS_ID : this.anonymousId,
8489
integrations: { Amplitude: { session_id: this.sessionId } },
8590
event,
91+
context: {
92+
traits: {
93+
telemetry: isAnalyticsGranted ? Telemetry.Enabled : Telemetry.Disabled,
94+
}
95+
},
8696
properties: {
8797
...eventData,
8898
anonymousId: this.anonymousId,
@@ -116,6 +126,11 @@ export class AnalyticsService {
116126
name: event,
117127
anonymousId: !isAnalyticsGranted && nonTracking ? NON_TRACKING_ANONYMOUS_ID : this.anonymousId,
118128
integrations: { Amplitude: { session_id: this.sessionId } },
129+
context: {
130+
traits: {
131+
telemetry: isAnalyticsGranted ? Telemetry.Enabled : Telemetry.Disabled,
132+
}
133+
},
119134
properties: {
120135
...eventData,
121136
anonymousId: this.anonymousId,

redisinsight/ui/src/components/messages/filter-not-available/FilterNotAvailable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const FilterNotAvailable = ({ onClose } : { onClose?: () => void }) => {
2828
{!!freeInstance && (
2929
<>
3030
<EuiText color="subdued">
31-
Use your free all-in-one Redis Enterprise Cloud database to start exploring these capabilities.
31+
Use your free all-in-one Redis Cloud database to start exploring these capabilities.
3232
</EuiText>
3333
<EuiSpacer size="l" />
3434
<OAuthConnectFreeDb source={OAuthSocialSource.BrowserFiltering} onSuccessClick={onClose} />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const ModuleNotLoaded = ({ moduleName, id, type = 'workbench', onClose }: IProps
8484
</EuiText>
8585
) : (
8686
<EuiText className={cx(styles.text, styles.marginBottom, styles.textFooter)}>
87-
Use your free all-in-one Redis Enterprise Cloud database to start exploring these capabilities.
87+
Use your free all-in-one Redis Cloud database to start exploring these capabilities.
8888
</EuiText>
8989
)), [freeInstance])
9090

redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const INFINITE_MESSAGES = {
5555
>
5656
<EuiTitle className="infiniteMessage__title"><span>Congratulations!</span></EuiTitle>
5757
<EuiText size="xs">
58-
You can now use your Redis Stack database in Redis Enterprise Cloud
58+
You can now use your Redis Stack database in Redis Cloud
5959
to start exploring all its developer capabilities via RedisInsight tutorials.
6060
</EuiText>
6161
<EuiSpacer size="m" />
@@ -84,7 +84,7 @@ export const INFINITE_MESSAGES = {
8484
onMouseUp={(e) => { e.preventDefault() }}
8585
data-testid="database-exists-notification"
8686
>
87-
<EuiTitle className="infiniteMessage__title"><span>You already have a free Redis Enterprise Cloud subscription.</span></EuiTitle>
87+
<EuiTitle className="infiniteMessage__title"><span>You already have a free Redis Cloud subscription.</span></EuiTitle>
8888
<EuiText size="xs">
8989
Do you want to import your existing database into RedisInsight?
9090
</EuiText>
@@ -125,7 +125,7 @@ export const INFINITE_MESSAGES = {
125125
onMouseUp={(e) => { e.preventDefault() }}
126126
data-testid="subscription-exists-notification"
127127
>
128-
<EuiTitle className="infiniteMessage__title"><span>Your subscription does not have a free Redis Enterprise Cloud database.</span></EuiTitle>
128+
<EuiTitle className="infiniteMessage__title"><span>Your subscription does not have a free Redis Cloud database.</span></EuiTitle>
129129
<EuiText size="xs">
130130
Do you want to create a free database in your existing subscription?
131131
</EuiText>

redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const OAuthSelectAccountDialog = () => {
125125
<EuiModalBody className={styles.modalBody}>
126126
<section className={styles.content}>
127127
<EuiTitle size="s">
128-
<h3 className={styles.title}>Connect to Redis Enterprise Cloud</h3>
128+
<h3 className={styles.title}>Connect to Redis Cloud</h3>
129129
</EuiTitle>
130130
<EuiText className={styles.subTitle}>
131131
Select an account to connect to:

redisinsight/ui/src/components/oauth/oauth-sign-in-dialog/OAuthSignInDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const OAuthSignInDialog = () => {
4444
<EuiFlexItem grow={false} className={styles.advantages}>
4545
<div className={styles.advantagesContent}>
4646
<EuiTitle size="s">
47-
<h3 className={styles.title}>Get started with Redis Enterprise Cloud</h3>
47+
<h3 className={styles.title}>Get started with Redis Cloud</h3>
4848
</EuiTitle>
4949
{OAuthAdvantages.map(({ icon, text, title }) => (
5050
<EuiText className={styles.advantage} key={text?.toString()}>

redisinsight/ui/src/components/oauth/oauth-social/OAuthSocial.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const OAuthSocial = ({ type = OAuthSocialType.Modal, hideTitle = false }: Props)
104104
<EuiText className={styles.text} color="subdued">
105105
Auto-discover subscriptions and add your databases.
106106
<br />
107-
A new Redis Enterprise Cloud account will be created for you if you don’t have one.
107+
A new Redis Cloud account will be created for you if you don’t have one.
108108
</EuiText>
109109
<div className={styles.buttonsAuto}>
110110
{buttons}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
414414
type: 'link',
415415
value: {
416416
href: 'https://redis.com/redis-enterprise-cloud/overview/',
417-
name: 'Redis Enterprise Cloud'
417+
name: 'Redis Cloud'
418418
}
419419
},
420420
{
@@ -558,7 +558,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
558558
type: 'link',
559559
value: {
560560
href: 'https://redis.com/redis-enterprise-cloud/overview/',
561-
name: 'Redis Enterprise Cloud'
561+
name: 'Redis Cloud'
562562
}
563563
},
564564
{
@@ -719,7 +719,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
719719
type: 'link',
720720
value: {
721721
href: 'https://redis.com/redis-enterprise-cloud/overview/',
722-
name: 'Redis Enterprise Cloud'
722+
name: 'Redis Cloud'
723723
}
724724
},
725725
{
@@ -997,7 +997,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
997997
type: 'link',
998998
value: {
999999
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1000-
name: 'Redis Enterprise Cloud'
1000+
name: 'Redis Cloud'
10011001
}
10021002
},
10031003
{
@@ -1089,7 +1089,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
10891089
type: 'link',
10901090
value: {
10911091
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1092-
name: 'Redis Enterprise Cloud'
1092+
name: 'Redis Cloud'
10931093
}
10941094
},
10951095
{
@@ -1218,7 +1218,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
12181218
type: 'link',
12191219
value: {
12201220
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1221-
name: 'Redis Enterprise Cloud'
1221+
name: 'Redis Cloud'
12221222
}
12231223
},
12241224
{
@@ -1399,7 +1399,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
13991399
type: 'link',
14001400
value: {
14011401
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1402-
name: 'Redis Enterprise Cloud'
1402+
name: 'Redis Cloud'
14031403
}
14041404
},
14051405
{
@@ -1479,7 +1479,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
14791479
type: 'link',
14801480
value: {
14811481
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1482-
name: 'Redis Enterprise Cloud'
1482+
name: 'Redis Cloud'
14831483
}
14841484
},
14851485
{
@@ -1548,7 +1548,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
15481548
type: 'link',
15491549
value: {
15501550
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1551-
name: 'Redis Enterprise Cloud'
1551+
name: 'Redis Cloud'
15521552
}
15531553
},
15541554
{
@@ -1625,7 +1625,7 @@ export const MOCK_RECOMMENDATIONS: IRecommendationsStatic = {
16251625
type: 'link',
16261626
value: {
16271627
href: 'https://redis.com/redis-enterprise-cloud/overview/',
1628-
name: 'Redis Enterprise Cloud'
1628+
name: 'Redis Cloud'
16291629
}
16301630
},
16311631
{

redisinsight/ui/src/pages/browser/components/string-details/StringDetails.spec.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,34 @@ describe('StringDetails', () => {
190190
})
191191
})
192192

193+
it('Should add "..." in the end of the part value', async () => {
194+
const stringDataSelectorMock = jest.fn().mockReturnValue({
195+
value: partValue
196+
})
197+
stringDataSelector.mockImplementation(stringDataSelectorMock)
198+
199+
render(
200+
<StringDetails
201+
{...instance(mockedProps)}
202+
/>
203+
)
204+
expect(screen.getByTestId(STRING_VALUE)).toHaveTextContent(`${bufferToString(partValue)}...`)
205+
})
206+
207+
it('Should not add "..." in the end of the full value', async () => {
208+
const stringDataSelectorMock = jest.fn().mockReturnValue({
209+
value: fullValue
210+
})
211+
stringDataSelector.mockImplementation(stringDataSelectorMock)
212+
213+
render(
214+
<StringDetails
215+
{...instance(mockedProps)}
216+
/>
217+
)
218+
expect(screen.getByTestId(STRING_VALUE)).toHaveTextContent(bufferToString(fullValue))
219+
})
220+
193221
it('should call fetchDownloadStringValue and sendEventTelemetry after clicking on load button and download button', async () => {
194222
const stringDataSelectorMock = jest.fn().mockReturnValue({
195223
value: partValue

0 commit comments

Comments
 (0)