Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the ssl connection switch #1338

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion src/components/ConfigInput/ConfigInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Autocomplete, Box, IconButton, InputAdornment } from '@mui/material';
import {
Autocomplete,
Box,
FormControlLabel,
IconButton,
InputAdornment,
InputLabel,
Switch,
} from '@mui/material';
import React, { useEffect, useState } from 'react';
import MultiTagInput from '../MultiTagInput';
import { Controller } from 'react-hook-form';
Expand Down Expand Up @@ -256,6 +264,43 @@
/>
<Box sx={{ m: 2 }} />
</React.Fragment>
) : spec.type === 'boolean' ? (
<React.Fragment key={spec.field}>

Check warning on line 268 in src/components/ConfigInput/ConfigInput.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/ConfigInput/ConfigInput.tsx#L268

Added line #L268 was not covered by tests
<Controller
name={spec.field}
control={control}
render={({ field: { ref, onChange, value, ...rest }, fieldState }) => (
<>
<FormControlLabel
sx={{ margin: '0' }}
labelPlacement="end"
label={
<InputLabel
sx={{
marginBottom: '5px',
mt: '5px',
maxWidth: '100%',
whiteSpace: 'normal',
wordWrap: 'break-word',
overflow: 'hidden',
}}
>{`${spec.title}${spec.required ? '*' : ''}`}</InputLabel>
}
control={
<Switch
{...rest}
checked={value}
onChange={(event) => {
onChange(event.target.checked);

Check warning on line 294 in src/components/ConfigInput/ConfigInput.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/ConfigInput/ConfigInput.tsx#L293-L294

Added lines #L293 - L294 were not covered by tests
}}
/>
}
/>
</>
)}
/>
<Box sx={{ m: 2 }} />
</React.Fragment>
) : (
''
);
Expand Down
1 change: 1 addition & 0 deletions src/components/Destinations/Destinations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const Destinations = () => {
wtype: w_house.wtype,
icon: w_house.airbyte_destination.icon,
connectionConfiguration: w_house.airbyte_destination.connectionConfiguration,
ssl: w_house.ssl,
} as Warehouse);
}
}, [data]);
Expand Down
Loading