Skip to content

Commit ab978f2

Browse files
authored
Merge pull request #1990 from RedisInsight/fe/feature/RI-4119_Edit_SNI
#RI-4119 - edit sni
2 parents 2ee8a4d + edb07d0 commit ab978f2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceForm/InstanceForm.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const AddStandaloneForm = (props: Props) => {
128128
provider,
129129
ssh,
130130
sshPassType = SshPassType.Password,
131-
sshOptions
131+
sshOptions,
132132
},
133133
initialValues: initialValuesProp,
134134
width,
@@ -162,6 +162,7 @@ const AddStandaloneForm = (props: Props) => {
162162
showDb: !!db,
163163
showCompressor: compressor !== NONE,
164164
sni: !!servername,
165+
servername,
165166
newCaCert: '',
166167
newCaCertName: '',
167168
selectedCaCertName,

redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceFormWrapper.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const getInitialValues = (editedInstance: Nullable<Instance>) => ({
6868
: (editedInstance ? '' : undefined),
6969
tls: !!editedInstance?.tls ?? false,
7070
ssh: !!editedInstance?.ssh ?? false,
71+
servername: editedInstance?.tlsServername,
7172
sshPassType: editedInstance?.sshOptions
7273
? (editedInstance.sshOptions.privateKey ? SshPassType.PrivateKey : SshPassType.Password)
7374
: SshPassType.Password
@@ -87,7 +88,7 @@ const InstanceFormWrapper = (props: Props) => {
8788
const [initialValues, setInitialValues] = useState(getInitialValues(editedInstance))
8889
const [isCloneMode, setIsCloneMode] = useState<boolean>(false)
8990

90-
const { host, port, name, username, password, timeout, tls, ssh, sshPassType } = initialValues
91+
const { host, port, name, username, password, timeout, tls, ssh, sshPassType, servername } = initialValues
9192

9293
const { loadingChanging: loadingStandalone } = useSelector(instancesSelector)
9394
const { loading: loadingSentinel } = useSelector(sentinelSelector)
@@ -541,7 +542,8 @@ const InstanceFormWrapper = (props: Props) => {
541542
sentinelMasterUsername,
542543
sentinelMasterPassword,
543544
ssh,
544-
sshPassType
545+
sshPassType,
546+
servername,
545547
}
546548

547549
const getSubmitButtonText = () => {

0 commit comments

Comments
 (0)