Skip to content

Commit 3a6c536

Browse files
committed
#RI-4936 - small fixes
1 parent a4d2614 commit 3a6c536

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

redisinsight/ui/src/components/notifications/Notifications.tsx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ import { IError, IMessage, InfiniteMessage } from 'uiSrc/slices/interfaces'
2222
import { ApiEncryptionErrors } from 'uiSrc/constants/apiErrors'
2323
import { DEFAULT_ERROR_MESSAGE } from 'uiSrc/utils'
2424
import { showOAuthProgress } from 'uiSrc/slices/oauth/cloud'
25-
2625
import { CustomErrorCodes } from 'uiSrc/constants'
26+
import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
27+
2728
import errorMessages from './error-messages'
2829
import { InfiniteMessagesIds } from './components'
2930

@@ -115,9 +116,25 @@ const Notifications = () => {
115116
text: Inner,
116117
color: 'success',
117118
onClose: () => {
118-
if (id === InfiniteMessagesIds.oAuthProgress) {
119-
dispatch(showOAuthProgress(false))
119+
switch (id) {
120+
case InfiniteMessagesIds.oAuthProgress:
121+
dispatch(showOAuthProgress(false))
122+
break
123+
case InfiniteMessagesIds.databaseExists:
124+
sendEventTelemetry({
125+
event: TelemetryEvent.CLOUD_IMPORT_EXISTING_DATABASE_FORM_CLOSED,
126+
})
127+
break
128+
case InfiniteMessagesIds.subscriptionExists:
129+
sendEventTelemetry({
130+
event: TelemetryEvent.CLOUD_CREATE_DATABASE_IN_SUBSCRIPTION_FORM_CLOSED,
131+
})
132+
break
133+
134+
default:
135+
break
120136
}
137+
121138
dispatch(removeInfiniteNotification(id))
122139
},
123140
toastLifeTimeMs: 3_600_000,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const INFINITE_MESSAGES = {
2727
{ (step === CloudJobStep.Credentials || !step) && 'Processing Cloud API keys…'}
2828
{ step === CloudJobStep.Subscription && 'Processing Cloud subscriptions…'}
2929
{ step === CloudJobStep.Database && 'Creating a free Cloud database…'}
30+
{ step === CloudJobStep.Import && 'Importing a free Cloud database…'}
3031
</span>
3132
</EuiTitle>
3233
<EuiText size="xs">
@@ -83,7 +84,7 @@ export const INFINITE_MESSAGES = {
8384
>
8485
<EuiTitle className="infiniteMessage__title"><span>You already have a free Redis Enterprise Cloud subscription.</span></EuiTitle>
8586
<EuiText size="xs">
86-
Do you want to import existing databases into RedisInsight?
87+
Do you want to import your existing database into RedisInsight?
8788
</EuiText>
8889
<EuiSpacer size="m" />
8990
<EuiFlexGroup justifyContent="spaceBetween" gutterSize="none">

redisinsight/ui/src/electron/constants/cloudAuth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export enum CloudJobStep {
2525
Credentials = 'credentials',
2626
Subscription = 'subscription',
2727
Database = 'database',
28+
Import = 'import',
2829
}
2930

3031
export enum CloudJobName {

0 commit comments

Comments
 (0)