@@ -73,7 +73,7 @@ const TotalLogsCount = (props: TotalLogsCountProps) => {
73
73
74
74
const renderTotalCount = useCallback ( ( ) => ( < Tooltip label = { totalCount } > < Text > { HumanizeNumber ( totalCount ) } </ Text > </ Tooltip > ) , [ totalCount ] ) ;
75
75
return (
76
- < Stack style = { { alignItems : 'center' , justifyContent : 'center' , flexDirection : 'row' } } gap = { 6 } >
76
+ < Stack style = { { alignItems : 'center' , justifyContent : 'center' , flexDirection : 'row' } } gap = { 6 } >
77
77
< Text > { `Showing ${ loadedCount < LOAD_LIMIT ? loadedCount : LOAD_LIMIT } out of` } </ Text >
78
78
{ renderTotalCount ( ) }
79
79
</ Stack >
@@ -498,57 +498,64 @@ const LogTable: FC = () => {
498
498
</ Center >
499
499
) }
500
500
< Box className = { tableStyles . footerContainer } >
501
- < TotalLogsCount totalCount = { totalCount } loadedCount = { loadedCount } />
502
- { ! loading && ! logsLoading ? (
503
- < Pagination . Root
504
- total = { pageLogData ?. totalPages || 1 }
505
- value = { pageLogData ?. page || 1 }
506
- onChange = { ( page ) => {
507
- goToPage ( page , pageLogData ?. limit || 1 ) ;
508
- pagination . setPage ( page ) ;
509
- } } >
510
- < Group gap = { 5 } justify = "center" >
511
- < Pagination . First
512
- onClick = { ( ) => {
513
- if ( pageOffset !== 0 ) setPageOffset ( ( value ) => value - loadLimit ) ;
514
- } }
515
- disabled = { pageOffset === 0 }
516
- />
517
- < Pagination . Previous />
518
- { pagination . range . map ( ( page ) => {
519
- if ( page === 'dots' ) {
520
- return < Pagination . Dots key = { page } /> ;
521
- } else {
522
- return (
523
- < Pagination . Control
524
- value = { page }
525
- key = { page }
526
- active = { pageLogData ?. page === page }
527
- onClick = { ( ) => {
528
- goToPage ( page ) ;
529
- pagination . setPage ( page ) ;
530
- } } >
531
- { pageLogData ?. limit ? page + pageOffset / pageLogData ?. limit ?? 1 : page }
532
- </ Pagination . Control >
533
- ) ;
534
- }
535
- } ) }
536
-
537
- < Pagination . Next />
538
- < Pagination . Last
539
- onClick = { ( ) => {
540
- setPageOffset ( ( value ) => {
541
- return value + loadLimit ;
542
- } ) ;
543
- } }
544
- disabled = { false }
545
- />
546
- </ Group >
547
- </ Pagination . Root >
548
- ) : (
549
- < Loader variant = "dots" />
550
- ) }
551
- < LimitControl value = { pageLogData ?. limit || 0 } onChange = { setPageLimit } />
501
+ < Stack w = "100%" justify = "center" align = "flex-start" >
502
+ < TotalLogsCount totalCount = { totalCount } loadedCount = { loadedCount } />
503
+ </ Stack >
504
+ < Stack w = "100%" justify = "center" >
505
+ { ! loading && ! logsLoading ? (
506
+ < Pagination . Root
507
+ total = { pageLogData ?. totalPages || 1 }
508
+ value = { pageLogData ?. page || 1 }
509
+ onChange = { ( page ) => {
510
+ goToPage ( page , pageLogData ?. limit || 1 ) ;
511
+ pagination . setPage ( page ) ;
512
+ } } >
513
+ < Group gap = { 5 } justify = "center" >
514
+ < Pagination . First
515
+ onClick = { ( ) => {
516
+ if ( pageOffset !== 0 ) setPageOffset ( ( value ) => value - loadLimit ) ;
517
+ } }
518
+ disabled = { pageOffset === 0 }
519
+ />
520
+ < Pagination . Previous />
521
+ { pagination . range . map ( ( page ) => {
522
+ if ( page === 'dots' ) {
523
+ return < Pagination . Dots key = { page } /> ;
524
+ } else {
525
+ return (
526
+ < Pagination . Control
527
+ value = { page }
528
+ key = { page }
529
+ active = { pageLogData ?. page === page }
530
+ onClick = { ( ) => {
531
+ goToPage ( page ) ;
532
+ pagination . setPage ( page ) ;
533
+ } } >
534
+ { pageLogData ?. limit ? page + pageOffset / pageLogData ?. limit ?? 1 : page }
535
+ </ Pagination . Control >
536
+ ) ;
537
+ }
538
+ } ) }
539
+ < Pagination . Next />
540
+ < Pagination . Last
541
+ onClick = { ( ) => {
542
+ setPageOffset ( ( value ) => {
543
+ return value + loadLimit ;
544
+ } ) ;
545
+ } }
546
+ disabled = { false }
547
+ />
548
+ </ Group >
549
+ </ Pagination . Root >
550
+ ) : (
551
+ < Stack w = "100%" align = "center" >
552
+ < Loader variant = "dots" />
553
+ </ Stack >
554
+ ) }
555
+ </ Stack >
556
+ < Stack w = "100%" align = "flex-end" >
557
+ < LimitControl value = { pageLogData ?. limit || 0 } onChange = { setPageLimit } />
558
+ </ Stack >
552
559
</ Box >
553
560
</ Box >
554
561
) ;
0 commit comments