Skip to content

Commit

Permalink
Conditional display
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikpersistent committed Jan 21, 2025
1 parent 0ec182e commit e331212
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
15 changes: 8 additions & 7 deletions frontend/src/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,8 @@ const Content: React.FC<ContentProps> = ({
setshowExpirationModal(true);
} else if (largeFileExists && isGCSActive) {
setshowConfirmationModal(true);
} else if (largeFileExists && isGCSActive) {
setshowExpirationModal(true);
} else {
} else {
handleGenerateGraph(selectedRows.filter((f) => isFileReadyToProcess(f, false)));
}
} else if (filesData.length) {
Expand Down Expand Up @@ -917,11 +916,13 @@ const Content: React.FC<ContentProps> = ({
)
)}
</div>
{connectionStatus&&(<Callout
className='!w-[93%] m-auto '
type='note'
description={`Large files may be partially processed up to ${chunksToBeProces} chunks due to resource limits. If you need more comprehensive processing, consider splitting larger documents.`}
></Callout>)}
{connectionStatus && (
<Callout
className='!w-[93%] m-auto '
type='note'
description={`Large files may be partially processed up to ${chunksToBeProces} chunks due to resource limits. If you need more comprehensive processing, consider splitting larger documents.`}
></Callout>
)}
</Flex>

<FileTable
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/FileTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1009,9 +1009,9 @@ const FileTable: ForwardRefRenderFunction<ChildRef, FileTableProps> = (props, re
}}
isLoading={isLoading}
rootProps={{
className: `absolute ${!largedesktops ? 'h-[50%]' : 'h-[60%]'} left-10 filetable ${
!largedesktops ? 'top-[29%]' : 'top-[26%]'
}`,
className: `absolute left-10 filetable ${
!largedesktops && connectionStatus ? 'h-[50%]' : connectionStatus ? 'h-[60%]' : 'h-[67%]'
} ${!largedesktops && connectionStatus ? 'top-[29%]' : connectionStatus ? 'top-[26%]' : 'top-[14%]'}`,
}}
components={{
Body: () => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Layout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const PageLayout: React.FC = () => {
isGCSActive: connectionData?.data?.gcs_file_cache === 'True',
chunksTobeProcess: parseInt(connectionData.data.chunk_to_be_created),
};
setChunksToBeProces(connectionData.chunksTobeProcess);
setChunksToBeProces(envCredentials.chunksTobeProcess);
setIsGCSActive(envCredentials.isGCSActive);
if (session) {
const updated = updateSessionIfNeeded(envCredentials, session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function ConnectionModal({
const isgdsActive = response.data.data.gds_status;
const isReadOnlyUser = !response.data.data.write_access;
const isGCSActive = response.data.data.gcs_file_cache === 'True';
const chunksTobeProcess = parseInt(response.data.chunk_to_be_created);
const chunksTobeProcess = parseInt(response.data.data.chunk_to_be_created);
setIsGCSActive(isGCSActive);
setGdsActive(isgdsActive);
setIsReadOnlyUser(isReadOnlyUser);
Expand Down

0 comments on commit e331212

Please sign in to comment.