Skip to content

Commit

Permalink
Merge pull request #17 from Sanketika-Obsrv/v2_fixes
Browse files Browse the repository at this point in the history
#OBS-l285: UI fixes
  • Loading branch information
HarishGangula authored Oct 24, 2024
2 parents 737755e + 82b5388 commit 394316b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
justify-content: flex-end;
align-items: center;
left: -1.23rem;
position: relative;
transition:
width 0.3s ease,
transform 0.3s ease;
Expand Down
1 change: 1 addition & 0 deletions web-console-v2/src/components/ActionButtons/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const Actions = ({ buttons, onClick }: ActionsProps) => {
disabled={buttonConfig.disabled || false}
onClick={() => onClick(buttonConfig.id)}
className={styles.button}
sx={{mr: 8}}
>
{buttonConfig.icon && <Button color="primary">{buttonConfig.icon}</Button>}
{buttonConfig.label}
Expand Down
3 changes: 2 additions & 1 deletion web-console-v2/src/components/Dropzone/MultiFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import uploadImage from 'assets/upload/upload.svg';
import uploadIcon from 'assets/upload/upload_icon.svg';
import PlaceholderContent from './PlaceholderContent';
import { CustomFile, DropzopType, UploadMultiFileProps } from 'types/dropzone';
import _ from 'lodash';

const DropzoneWrapper = styled('div')(({ theme }) => ({
outline: 'none',
Expand Down Expand Up @@ -58,7 +59,7 @@ const MultiFileUpload = ({
});
});
setFieldValue('files', data);
onUpload(data);
!_.isEmpty(data) && onUpload(data);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const FieldSection = (props: any) => {
sx={{
'& .MuiAccordion-root': {
borderColor: theme.palette.divider,
border: '1px solid #d6d6d6',
'& .MuiAccordionSummary-root': {
bgcolor: 'transparent',
boxShadow: 'none',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ const ReactTable = ({
<TableRow
{...row.getRowProps()}
sx={{
// border: '2px solid black',
outline: '1px solid #d6d6d6',
borderRadius: '0.5rem',
backgroundColor: theme.palette.common.white,
...(!disableRowColor && bgColor()),
marginLeft: isSubRow ? `${depth * 20}px` : '0'
Expand Down Expand Up @@ -151,7 +152,7 @@ const ReactTable = ({

return (
<TableContainer sx={tableSx}>
<Table sx={{ marginTop: showHeaders ? 0 : '1rem' }} {...getTableProps()}>
<Table sx={{ marginTop: showHeaders ? 0 : '1rem', width: '99.8%', marginRight: '0.063rem', marginLeft: '0.063rem' }} {...getTableProps()}>
{!showHeaders && (
<TableHead sx={tHeadHeight ? { height: tHeadHeight } : {}}>
{headerGroups.map((headerGroup) => (
Expand Down
2 changes: 1 addition & 1 deletion web-console-v2/src/components/Stepper/Stepper.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
align-items: center;
justify-content: flex-start;
padding-left: 3rem;
padding-left: 2rem;
background-color: var(--white-color);
height: 4rem;
box-shadow: var(--shadow-large);
Expand Down
9 changes: 9 additions & 0 deletions web-console-v2/src/pages/StepsPages/Ingestion/Ingestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import ingestionStyle from './Ingestion.module.css';
import helpSectionData from './HelpSectionData.json';
import axios from 'axios';
import localStyles from "./Ingestion.module.css";
import RejectionFiles from 'components/Dropzone/RejectionFiles';
interface FormData {
[key: string]: unknown;
}
Expand Down Expand Up @@ -80,6 +81,9 @@ const Ingestion = () => {

const ConnectorConfiguration = connectorConfigData ? JSON.parse(connectorConfigData) : null;

const [fileErrors, setFileErrors] = useState<any>(null);
const maxFileSizeConfig = 5242880;

const {
data: uploadData,
isPending: isUploadLoading,
Expand Down Expand Up @@ -503,6 +507,8 @@ const Ingestion = () => {
files={files}
setFiles={setFiles}
allowSchema
maxFileSize={maxFileSizeConfig}
subscribeErrors={setFileErrors}
/>
{!_.isEmpty(files) && (
<Box mx={3} mt={18}>
Expand All @@ -523,6 +529,9 @@ const Ingestion = () => {
/>
</Box>
)}
<Box sx={{marginTop: 30, mr: 1, ml: 1, mb:1}}>
{fileErrors?.length > 0 && <RejectionFiles fileRejections={fileErrors} />}
</Box>
</GenericCard>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const extractTransformationOptions = (schema: any, path: string[] = []):
for (const key in schema.properties) {
const currentPath = [...path, key].join('.');

options.push(currentPath);
if(!schema.properties[key].properties){
options.push(currentPath);
}

if (schema.properties[key].properties) {
options.push(
Expand Down

0 comments on commit 394316b

Please sign in to comment.