@@ -267,8 +267,9 @@ const Content: React.FC<ContentProps> = ({
267
267
const handleOpenGraphClick = ( ) => {
268
268
const bloomUrl = process . env . BLOOM_URL ;
269
269
const uriCoded = userCredentials ?. uri . replace ( / : \d + $ / , '' ) ;
270
- const connectURL = `${ uriCoded ?. split ( '//' ) [ 0 ] } //${ userCredentials ?. userName } @${ uriCoded ?. split ( '//' ) [ 1 ] } :${ userCredentials ?. port ?? '7687'
271
- } `;
270
+ const connectURL = `${ uriCoded ?. split ( '//' ) [ 0 ] } //${ userCredentials ?. userName } @${ uriCoded ?. split ( '//' ) [ 1 ] } :${
271
+ userCredentials ?. port ?? '7687'
272
+ } `;
272
273
const encodedURL = encodeURIComponent ( connectURL ) ;
273
274
const replacedUrl = bloomUrl ?. replace ( '{CONNECT_URL}' , encodedURL ) ;
274
275
window . open ( replacedUrl , '_blank' ) ;
@@ -278,10 +279,10 @@ const Content: React.FC<ContentProps> = ({
278
279
isLeftExpanded && isRightExpanded
279
280
? 'contentWithExpansion'
280
281
: isRightExpanded
281
- ? 'contentWithChatBot'
282
- : ! isLeftExpanded && ! isRightExpanded
283
- ? 'w-[calc(100%-128px)]'
284
- : 'contentWithDropzoneExpansion' ;
282
+ ? 'contentWithChatBot'
283
+ : ! isLeftExpanded && ! isRightExpanded
284
+ ? 'w-[calc(100%-128px)]'
285
+ : 'contentWithDropzoneExpansion' ;
285
286
286
287
const handleGraphView = ( ) => {
287
288
setOpenGraphView ( true ) ;
@@ -317,10 +318,29 @@ const Content: React.FC<ContentProps> = ({
317
318
[ selectedfileslength , completedfileNo ]
318
319
) ;
319
320
320
- const deleteFileClickHandler : React . MouseEventHandler < HTMLButtonElement > = ( ) => {
321
- setshowDeletePopUp ( true ) ;
321
+ const processingCheck = ( ) => {
322
+ const processingFiles = filesData . some ( ( file ) => file . status === 'Processing' ) ;
323
+ const selectedRowProcessing = selectedRows . some ( ( row ) =>
324
+ filesData . some ( ( file ) => file . name === row && file . status === 'Processing' )
325
+ ) ;
326
+ return processingFiles || selectedRowProcessing ;
322
327
} ;
323
328
329
+ const filesForProcessing = useMemo ( ( ) => {
330
+ let newstatusfiles : CustomFile [ ] = [ ] ;
331
+ if ( selectedRows . length ) {
332
+ selectedRows . forEach ( ( f ) => {
333
+ const parsedFile : CustomFile = JSON . parse ( f ) ;
334
+ if ( parsedFile . status === 'New' ) {
335
+ newstatusfiles . push ( parsedFile ) ;
336
+ }
337
+ } ) ;
338
+ } else if ( filesData . length ) {
339
+ newstatusfiles = filesData . filter ( ( f ) => f . status === 'New' ) ;
340
+ }
341
+ return newstatusfiles ;
342
+ } , [ filesData , selectedRows ] ) ;
343
+
324
344
const handleDeleteFiles = async ( deleteEntities : boolean ) => {
325
345
try {
326
346
setdeleteLoading ( true ) ;
@@ -502,7 +522,6 @@ const Content: React.FC<ContentProps> = ({
502
522
} ) ;
503
523
localStorage . setItem ( 'isSchema' , JSON . stringify ( true ) ) ;
504
524
} ;
505
-
506
525
return (
507
526
< >
508
527
{ alertDetails . showAlert && (
@@ -590,8 +609,9 @@ const Content: React.FC<ContentProps> = ({
590
609
} }
591
610
> </ FileTable >
592
611
< Flex
593
- className = { `${ ! isLeftExpanded && ! isRightExpanded ? 'w-[calc(100%-128px)]' : 'w-full'
594
- } p-2.5 absolute bottom-4 mt-1.5 self-start`}
612
+ className = { `${
613
+ ! isLeftExpanded && ! isRightExpanded ? 'w-[calc(100%-128px)]' : 'w-full'
614
+ } p-2.5 absolute bottom-4 mt-1.5 self-start`}
595
615
justifyContent = 'space-between'
596
616
flexDirection = 'row'
597
617
>
@@ -601,6 +621,7 @@ const Content: React.FC<ContentProps> = ({
601
621
placeholder = 'Select LLM Model'
602
622
defaultValue = { defaultLLM }
603
623
view = 'ContentView'
624
+ isDisabled = { false }
604
625
/>
605
626
< Flex flexDirection = 'row' gap = '4' className = 'self-end' >
606
627
< ButtonWithToolTip
@@ -659,6 +680,7 @@ const Content: React.FC<ContentProps> = ({
659
680
open = { openGraphView }
660
681
setGraphViewOpen = { setOpenGraphView }
661
682
viewPoint = { viewPoint }
683
+ processingCheck = { processingCheck ( ) }
662
684
/>
663
685
</ >
664
686
) ;
0 commit comments