Skip to content

Commit a37ef1b

Browse files
committed
Merge branch 'main' into feature/RI-6508/mandatory-encryption
2 parents b9161cb + 452bf51 commit a37ef1b

File tree

41 files changed

+1160
-113
lines changed

Some content is hidden

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

41 files changed

+1160
-113
lines changed

l10n/bundle.l10n.json

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@
3939
"Structured querying and full-text search": "Structured querying and full-text search",
4040
"Native support for JSON": "Native support for JSON",
4141
"Scalable and fully managed": "Scalable and fully managed",
42-
"Free database to get started immediately": "Free database to get started immediately",
42+
"Free trial database to get started immediately": "Free trial database to get started immediately",
4343
"Cloud": "Cloud",
4444
"Get started with": "Get started with",
45-
"Free Cloud database": "Free Cloud database",
45+
"Free Trial Cloud database": "Free Trial Cloud database",
4646
"Get your": "Get your",
4747
"The database will be created automatically and can be changed from Redis Cloud.": "The database will be created automatically and can be changed from Redis Cloud.",
4848
"Create": "Create",
4949
"Includes native support for JSON, Query and Search and more.": "Includes native support for JSON, Query and Search and more.",
50-
"Get free Redis Cloud database": "Get free Redis Cloud database",
51-
"Create free Redis Cloud database": "Create free Redis Cloud database",
50+
"Get free trial Redis Cloud database": "Get free trial Redis Cloud database",
51+
"Create free trial Redis Cloud database": "Create free trial Redis Cloud database",
5252
"Try Redis Cloud database: your ultimate Redis starting point": "Try Redis Cloud database: your ultimate Redis starting point",
5353
"key(s)": "key(s)",
5454
"({0}{1} Scanned)": "({0}{1} Scanned)",
@@ -136,11 +136,11 @@
136136
"This database does not support the JSON data structure. Learn more about JSON support ": "This database does not support the JSON data structure. Learn more about JSON support ",
137137
"here. ": "here. ",
138138
"You can also create a ": "You can also create a ",
139-
"free Redis Cloud database": "free Redis Cloud database",
139+
"free trial Redis Cloud database": "free trial Redis Cloud database",
140140
" with built-in JSON support.": " with built-in JSON support.",
141141
"If you remove the single {0}, the whole Key will be deleted.": "If you remove the single {0}, the whole Key will be deleted.",
142142
"Removing multiple elements is available for Redis databases v. 6.2 or later. Update your Redis database or create a new ": "Removing multiple elements is available for Redis databases v. 6.2 or later. Update your Redis database or create a new ",
143-
"free up-to-date": "free up-to-date",
143+
"free up-to-date trial": "free up-to-date trial",
144144
" Redis database.": " Redis database.",
145145
"Database has been added": "Database has been added",
146146
" has been added to Redis for VS Code.": " has been added to Redis for VS Code.",
@@ -288,8 +288,8 @@
288288
"This may take several seconds, but it is totally worth it!": "This may take several seconds, but it is totally worth it!",
289289
"Processing Cloud API keys…": "Processing Cloud API keys…",
290290
"Processing Cloud subscriptions…": "Processing Cloud subscriptions…",
291-
"Creating a free Cloud database…": "Creating a free Cloud database…",
292-
"Importing a free Cloud database…": "Importing a free Cloud database…",
291+
"Creating a free trial Cloud database…": "Creating a free trial Cloud database…",
292+
"Importing a free trial Cloud database…": "Importing a free trial Cloud database…",
293293
"This may take several minutes, but it is totally worth it!": "This may take several minutes, but it is totally worth it!",
294294
"You can now use your Redis Stack database in Redis Cloud": "You can now use your Redis Stack database in Redis Cloud",
295295
" with pre-loaded sample data": " with pre-loaded sample data",
@@ -299,8 +299,8 @@
299299
"You already have a free Redis Cloud subscription.": "You already have a free Redis Cloud subscription.",
300300
"Do you want to import your existing database into Redis Insight?": "Do you want to import your existing database into Redis Insight?",
301301
"Import": "Import",
302-
"Your subscription does not have a free Redis Cloud database.": "Your subscription does not have a free Redis Cloud database.",
303-
"Do you want to create a free database in your existing subscription?": "Do you want to create a free database in your existing subscription?",
302+
"Your subscription does not have a free trial Redis Cloud database.": "Your subscription does not have a free trial Redis Cloud database.",
303+
"Do you want to create a free trial database in your existing subscription?": "Do you want to create a free trial database in your existing subscription?",
304304
"Keys are the foundation of Redis.": "Keys are the foundation of Redis.",
305305
"Add key": "Add key",
306306
"No results found.": "No results found.",
@@ -363,5 +363,11 @@
363363
"Auto Refresh": "Auto Refresh",
364364
"Add": "Add",
365365
"Release Notes": "Release Notes",
366-
"Redis for VS Code extension updated to {0}.": "Redis for VS Code extension updated to {0}."
367-
}
366+
"Redis for VS Code extension updated to {0}.": "Redis for VS Code extension updated to {0}.",
367+
"Choose a cloud vendor": "Choose a cloud vendor",
368+
"Select a cloud vendor and region to complete the final step towards your free trial Redis database.": "Select a cloud vendor and region to complete the final step towards your free trial Redis database.",
369+
"No credit card is required.": "No credit card is required.",
370+
"Region": "Region",
371+
"No regions available, try another vendor.": "No regions available, try another vendor.",
372+
"Create database": "Create database"
373+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@
259259
"@stablelib/snappy": "^1.0.3",
260260
"@vscode/l10n": "^0.0.18",
261261
"@vscode/webview-ui-toolkit": "^1.4.0",
262-
"axios": "^1.7.4",
262+
"axios": "^1.8.3",
263263
"brotli-unicode": "^1.0.2",
264264
"buffer": "^6.0.3",
265265
"classnames": "^2.3.2",

src/extension.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ export async function activate(context: vscode.ExtensionContext) {
8888
viewId: ViewId.AddDatabase,
8989
handleMessage: (message) => handleMessage(message),
9090
message: args,
91+
}).postMessage({
92+
action: 'OpenOAuthSsoDialog',
93+
data: { source: args?.source, ssoFlow: args?.ssoFlow },
9194
})
9295
}),
9396

src/utils/handleMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const handleMessage = async (message: any = {}) => {
4343
await setUIStorageField('ssoFlow', message.data?.ssoFlow)
4444
}
4545

46-
vscode.commands.executeCommand('RedisForVSCode.addDatabase')
46+
vscode.commands.executeCommand('RedisForVSCode.addDatabase', message.data)
4747
break
4848
case 'CloseAddDatabase':
4949
console.debug('RedisForVSCode.addDatabaseClose, ', message.data)

src/webviews/src/actions/oauthCallback.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CloudAuthStatus, CloudJobName, CloudJobStep, OAuthSocialAction, Storage
33
import { CustomError } from 'uiSrc/interfaces'
44
import { CloudAuthResponse } from 'uiSrc/modules/oauth/interfaces'
55
import { localStorageService } from 'uiSrc/services'
6-
import { createFreeDbJob, fetchUserInfo, useOAuthStore } from 'uiSrc/store'
6+
import { createFreeDbJob, fetchCloudSubscriptionPlans, fetchUserInfo, useOAuthStore } from 'uiSrc/store'
77
import { getApiErrorMessage, parseCustomError, removeInfinityToast, showErrorInfinityToast, showInfinityToast } from 'uiSrc/utils'
88

99
let isFlowInProgress = false
@@ -41,6 +41,8 @@ export const processOauthCallback = ({ status, message = '', error }: CloudAuthR
4141
removeInfinityToast()
4242
},
4343
})
44+
45+
return
4446
}
4547

4648
showInfinityToast(INFINITE_MESSAGES.PENDING_CREATE_DB(CloudJobStep.Credentials).Inner)
@@ -59,7 +61,7 @@ export const processOauthCallback = ({ status, message = '', error }: CloudAuthR
5961
// return
6062
// }
6163

62-
// dispatch(fetchPlans())
64+
fetchCloudSubscriptionPlans()
6365
}
6466

6567
setJob({ id: '', name: CloudJobName.CreateFreeSubscriptionAndDatabase, status: '' })

src/webviews/src/components/notifications/infinite-messages/InfiniteMessages.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export const INFINITE_MESSAGES = {
5252
<span className="text-[15px]">
5353
{ (step === CloudJobStep.Credentials || !step) && l10n.t('Processing Cloud API keys…')}
5454
{ step === CloudJobStep.Subscription && l10n.t('Processing Cloud subscriptions…')}
55-
{ step === CloudJobStep.Database && l10n.t('Creating a free Cloud database…')}
56-
{ step === CloudJobStep.Import && l10n.t('Importing a free Cloud database…')}
55+
{ step === CloudJobStep.Database && l10n.t('Creating a free trial Cloud database…')}
56+
{ step === CloudJobStep.Import && l10n.t('Importing a free trial Cloud database…')}
5757
</span>
5858
<Spacer size="m" />
5959
<div>
@@ -158,10 +158,10 @@ export const INFINITE_MESSAGES = {
158158
>
159159
<Spinner type="clip" size="20px" className="min-w-5" />
160160
<div className="ml-2">
161-
<div className="text-[15px]">{l10n.t('Your subscription does not have a free Redis Cloud database.')}</div>
161+
<div className="text-[15px]">{l10n.t('Your subscription does not have a free trial Redis Cloud database.')}</div>
162162
<Spacer size="s" />
163163
<div>
164-
{l10n.t('Do you want to create a free database in your existing subscription?')}
164+
{l10n.t('Do you want to create a free trial database in your existing subscription?')}
165165
</div>
166166
<Spacer size="m" />
167167
<div className="flex justify-between">

src/webviews/src/constants/cloud/source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export enum OAuthSocialSource {
1010
BrowserContentMenu = 'browser content menu',
1111
BrowserFiltering = 'browser filtering',
1212
BrowserSearch = 'browser search',
13+
BrowserRedisJSON = 'browser RedisJSON',
1314
RediSearch = 'workbench RediSearch',
1415
RedisJSON = 'workbench RedisJSON',
1516
RedisTimeSeries = 'workbench RedisTimeSeries',
@@ -91,7 +92,6 @@ export const OAuthProviders = [{
9192
id: OAuthProvider.AWS,
9293
icon: AWSIcon,
9394
label: 'Amazon Web Services',
94-
// className: styles.awsIcon,
9595
}, {
9696
id: OAuthProvider.Google,
9797
icon: GoogleIcon,
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
export const MOCK_NO_TF_REGION = {
2+
id: 12148,
3+
type: 'fixed',
4+
name: 'Cache 30MB',
5+
provider: 'AWS',
6+
price: 0,
7+
region: 'us-east-2',
8+
regionId: 4,
9+
details: {
10+
id: '4',
11+
name: 'us-east-2',
12+
cloud: 'AWS',
13+
displayOrder: 4,
14+
countryName: 'Europe',
15+
cityName: 'Ireland',
16+
regionId: 4,
17+
flag: 'ie',
18+
},
19+
}
20+
21+
export const MOCK_RS_PREVIEW_REGION = {
22+
id: 12148,
23+
type: 'fixed',
24+
name: 'Cache 30MB',
25+
provider: 'AWS',
26+
price: 0,
27+
region: 'us-east-2',
28+
regionId: 1,
29+
details: {
30+
id: '1',
31+
name: 'us-east-2',
32+
cloud: 'AWS',
33+
displayOrder: 1,
34+
countryName: 'US West',
35+
cityName: 'Oregon',
36+
regionId: 1,
37+
flag: 'ie',
38+
},
39+
}
40+
41+
export const MOCK_REGIONS = [
42+
MOCK_NO_TF_REGION,
43+
{
44+
id: 12150,
45+
type: 'fixed',
46+
name: 'Cache 30MB',
47+
provider: 'AWS',
48+
price: 0,
49+
region: 'ap-southeast-1',
50+
regionId: 5,
51+
details: {
52+
id: '5',
53+
name: 'ap-southeast-1',
54+
cloud: 'AWS',
55+
displayOrder: 7,
56+
countryName: 'Asia Pacific',
57+
cityName: 'Singapore',
58+
regionId: 5,
59+
flag: 'sg',
60+
},
61+
},
62+
{
63+
id: 12152,
64+
type: 'fixed',
65+
name: 'Cache 30MB',
66+
provider: 'Azure',
67+
price: 0,
68+
region: 'east-us',
69+
regionId: 16,
70+
details: {
71+
id: '16',
72+
name: 'east-us',
73+
cloud: 'Azure',
74+
displayOrder: 10,
75+
countryName: 'East US',
76+
cityName: 'Virginia',
77+
regionId: 16,
78+
flag: 'us',
79+
},
80+
},
81+
{
82+
id: 12153,
83+
type: 'fixed',
84+
name: 'Cache 30MB',
85+
provider: 'GCP',
86+
price: 0,
87+
region: 'us-central1',
88+
regionId: 27,
89+
details: {
90+
id: '27',
91+
name: 'us-central1',
92+
cloud: 'GCP',
93+
displayOrder: 17,
94+
countryName: 'North America',
95+
cityName: 'Iowa',
96+
regionId: 27,
97+
flag: 'us',
98+
},
99+
},
100+
]
101+
102+
export const MOCK_CUSTOM_REGIONS = [
103+
{
104+
id: 12150,
105+
type: 'fixed',
106+
name: 'Cache 30MB',
107+
provider: 'AWS',
108+
price: 0,
109+
region: 'custom-1',
110+
regionId: 11,
111+
details: {
112+
id: '11',
113+
name: 'custom-1',
114+
cloud: 'AWS',
115+
displayOrder: 2,
116+
countryName: 'Asia Pacific',
117+
cityName: 'Singapore',
118+
regionId: 11,
119+
flag: 'sg',
120+
},
121+
},
122+
{
123+
id: 12152,
124+
type: 'fixed',
125+
name: 'Cache 30MB',
126+
provider: 'Azure',
127+
price: 0,
128+
region: 'custom-2',
129+
regionId: 16,
130+
details: {
131+
id: '16',
132+
name: 'custom-2',
133+
cloud: 'Azure',
134+
displayOrder: 10,
135+
countryName: 'East US',
136+
cityName: 'Virginia',
137+
regionId: 16,
138+
flag: 'us',
139+
},
140+
},
141+
{
142+
id: 12153,
143+
type: 'fixed',
144+
name: 'Cache 30MB',
145+
provider: 'GCP',
146+
price: 0,
147+
region: 'custom-3',
148+
regionId: 27,
149+
details: {
150+
id: '27',
151+
name: 'custom-3',
152+
cloud: 'GCP',
153+
displayOrder: 17,
154+
countryName: 'North America',
155+
cityName: 'Iowa',
156+
regionId: 27,
157+
flag: 'us',
158+
},
159+
},
160+
]

src/webviews/src/constants/vscode/vscode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export enum VscodeMessageAction {
3232
OAuthCallback = 'OAuthCallback',
3333
RefreshDatabases = 'RefreshDatabases',
3434
OpenExternalUrl = 'OpenExternalUrl',
35+
OpenOAuthSsoDialog = 'OpenOAuthSsoDialog',
3536
}
3637

3738
export enum VscodeStateItem {

0 commit comments

Comments
 (0)