Skip to content

Commit 0aba864

Browse files
committed
#RI-5187 - fix connection form
1 parent b413a0e commit 0aba864

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

redisinsight/ui/src/pages/home/components/manual-connection/ManualConnectionWrapper.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ const ManualConnectionWrapper = (props: Props) => {
174174
sentinelMasterName,
175175
sentinelMasterUsername,
176176
sentinelMasterPassword,
177+
ssh,
178+
tls
177179
} = values
178180

179181
const database: any = {
@@ -186,6 +188,8 @@ const ManualConnectionWrapper = (props: Props) => {
186188
password,
187189
compressor,
188190
timeout: timeout ? toNumber(timeout) * 1_000 : toNumber(DEFAULT_TIMEOUT),
191+
ssh,
192+
tls
189193
}
190194

191195
// add tls & ssh for database (modifies database object)

redisinsight/ui/src/pages/home/utils/form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ export const getFormValues = (instance?: Nullable<Record<string, any>>) => ({
284284
modules: instance?.modules,
285285
showDb: !!instance?.db,
286286
showCompressor: instance && instance.compressor && instance.compressor !== NONE,
287-
sni: !!instance?.servername,
288-
servername: instance?.servername,
287+
sni: !!instance?.tlsServername,
288+
servername: instance?.tlsServername,
289289
newCaCert: '',
290290
newCaCertName: '',
291291
selectedCaCertName: instance?.caCert?.id ?? NO_CA_CERT,

redisinsight/ui/src/utils/comparisons/diff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const getFormUpdates = (obj1: UnknownObject = {}, obj2: UnknownObject = {
2929
result[key] = diff
3030
}
3131
} else if (value !== obj2[key] && !(!value && !obj2[key])) {
32-
result[key] = value || null
32+
result[key] = value ?? null
3333
}
3434

3535
return result

redisinsight/ui/src/utils/tests/comparisons/diff.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('getDiffKeysOfObjectValues', () => {
1818

1919
const getFormUpdatesTests: any[] = [
2020
[{ name: 'name' }, { name: 'name' }, {}],
21-
[{ name: '' }, { name: 'name' }, { name: null }],
21+
[{ name: '' }, { name: 'name' }, { name: '' }],
2222
[{ name: 'name' }, { name: '' }, { name: 'name' }],
2323
[{ name: 'name', port: 123 }, { name: '', port: 123 }, { name: 'name' }],
2424
[{ name: 'name', port: 123 }, { name: '', port: 1 }, { name: 'name', port: 123 }],

0 commit comments

Comments
 (0)