unical1988 commented on code in PR #1244:
URL: https://github.com/apache/answer/pull/1244#discussion_r1975431787
##########
ui/src/pages/Install/components/SecondStep/index.tsx:
##########
@@ -179,12 +242,107 @@ const Index: FC<Props> = ({ visible, data,
changeCallback, nextCallback }) => {
});
}}
/>
-
<Form.Control.Feedback type="invalid">
{data.db_password.errorMsg}
</Form.Control.Feedback>
</Form.Group>
+ {data.db_type.value === 'postgres' && (
+ <Form.Group
+ controlId="ssl_enabled"
+ className="conditional-checkbox">
+ <Form.Check type="checkbox" id="sslEnabled">
+ <Form.Check.Input
+ value={data.ssl_enabled.value}
+ type="checkbox"
+ onChange={(e) => {
+ changeCallback({
+ ssl_enabled: {
+ value: e.target.checked,
+ isInvalid: false,
+ errorMsg: '',
+ },
+ });
+ }}
+ />
+ <Form.Label className="ms-1" htmlFor="ssl_enabled">
+ {t('ssl_enabled.label')}
+ </Form.Label>
+ </Form.Check>
+ </Form.Group>
+ )}
+ {data.db_type.value === 'postgres' && data.ssl_enabled.value && (
+ <Form.Group controlId="sslmodeOptionsDropdown" className="mb-3">
+ <Form.Label>{t('ssl_mode.label')}</Form.Label>
+ <Form.Select
+ value={data.ssl_mode.value}
+ onChange={(e) => {
+ changeCallback({
+ ssl_mode: {
+ value: e.target.value,
+ isInvalid: false,
+ errorMsg: '',
+ },
+ });
+ }}>
+ {sslModes.map((item) => {
+ return <option value={item.value}>{item.value}</option>;
+ })}
+ </Form.Select>
+ </Form.Group>
+ )}
Review Comment:
I find it more convenient here to use a select instead of a radio box
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]