Skip to content

Commit

Permalink
Merge pull request #1338 from DalgoT4D/763-warehouse-details-dont-sho…
Browse files Browse the repository at this point in the history
…w-ssl-connection-when-its-enabled

added the ssl connection switch
  • Loading branch information
Ishankoradia authored Dec 5, 2024
2 parents 4ec2555 + 9d0c582 commit 01fe34a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
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 @@ export const ConfigInput = ({ specs, control, setFormValue, entity }: ConfigInpu
/>
<Box sx={{ m: 2 }} />
</React.Fragment>
) : spec.type === 'boolean' ? (
<React.Fragment key={spec.field}>
<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);
}}
/>
}
/>
</>
)}
/>
<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

0 comments on commit 01fe34a

Please sign in to comment.