@@ -23,6 +23,7 @@ import {
2323 Toggle ,
2424 InputToggleType ,
2525 InputLabel ,
26+ SlideToggle ,
2627} from '@influxdata/clockface'
2728import UserInput from 'src/writeData/subscriptions/components/UserInput'
2829import CertificateInput from 'src/writeData/subscriptions/components/CertificateInput'
@@ -283,17 +284,40 @@ const BrokerFormContent: FC<Props> = ({
283284 ) }
284285 </ Form . ValidationElement >
285286 </ FlexBox >
287+ { isFlagEnabled ( 'subscriptionsSSLSupport' ) && (
288+ < FlexBox
289+ direction = { FlexDirection . Row }
290+ alignItems = { AlignItems . Center }
291+ margin = { ComponentSize . Medium }
292+ className = "static-toggle"
293+ >
294+ < SlideToggle
295+ active = { formContent . useSSL }
296+ onChange = { ( ) => {
297+ updateForm ( {
298+ ...formContent ,
299+ useSSL : ! formContent . useSSL ,
300+ } )
301+ } }
302+ disabled = { ! edit }
303+ size = { ComponentSize . Medium }
304+ />
305+ < Heading
306+ element = { HeadingElement . H4 }
307+ weight = { FontWeight . Regular }
308+ className = { `${ className } -broker-form__ssl-text` }
309+ >
310+ Enable SSL
311+ </ Heading >
312+ </ FlexBox >
313+ ) }
286314 { showHostPortExampleText && (
287315 < Heading
288316 element = { HeadingElement . H5 }
289317 weight = { FontWeight . Regular }
290318 className = { `${ className } -broker-form__example-text` }
291319 >
292- { getSchemaFromProtocol (
293- formContent . protocol ,
294- isFlagEnabled ( 'subscriptionsCertificateSupport' ) &&
295- formContent . authType === BrokerAuthTypes . Certificate
296- ) }
320+ { getSchemaFromProtocol ( formContent . protocol , formContent ) }
297321 { `${ formContent . brokerHost } :${
298322 ! ! formContent . brokerPort && ! isNaN ( formContent . brokerPort )
299323 ? formContent . brokerPort
@@ -457,6 +481,7 @@ const BrokerFormContent: FC<Props> = ({
457481 brokerUsername : null ,
458482 brokerPassword : null ,
459483 authType : BrokerAuthTypes . Certificate ,
484+ useSSL : true ,
460485 } )
461486 } }
462487 value = "certificate"
0 commit comments