File tree 2 files changed +11
-10
lines changed
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -49,24 +49,24 @@ const {
49
49
setCleanStoreForStreamChange,
50
50
} = logsStoreReducers ;
51
51
52
+ const TotalCount = ( props : { totalCount : number } ) => {
53
+ return (
54
+ < Tooltip label = { props . totalCount } >
55
+ < Text > { HumanizeNumber ( props . totalCount ) } </ Text >
56
+ </ Tooltip >
57
+ ) ;
58
+ } ;
59
+
52
60
const TotalLogsCount = ( ) => {
53
61
const [ { totalCount, perPage, pageData } ] = useLogsStore ( ( store ) => store . tableOpts ) ;
54
62
const displayedCount = _ . size ( pageData ) ;
55
63
const showingCount = displayedCount < perPage ? displayedCount : perPage ;
56
64
if ( typeof totalCount !== 'number' || typeof displayedCount !== 'number' ) return < Stack /> ;
57
65
58
- const renderTotalCount = useCallback (
59
- ( ) => (
60
- < Tooltip label = { totalCount } >
61
- < Text > { HumanizeNumber ( totalCount ) } </ Text >
62
- </ Tooltip >
63
- ) ,
64
- [ totalCount ] ,
65
- ) ;
66
66
return (
67
67
< Stack style = { { alignItems : 'center' , justifyContent : 'center' , flexDirection : 'row' } } gap = { 6 } >
68
68
< Text > { `Showing ${ showingCount } out of` } </ Text >
69
- { renderTotalCount ( ) }
69
+ < TotalCount totalCount = { totalCount } />
70
70
< Text > records</ Text >
71
71
</ Stack >
72
72
) ;
Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ const getCleanStoreForRefetch = (store: LogsStore) => {
570
570
} ;
571
571
572
572
const setCleanStoreForStreamChange = ( store : LogsStore ) => {
573
- const { tableOpts, timeRange } = store ;
573
+ const { tableOpts, timeRange, alerts } = store ;
574
574
const { interval, type } = timeRange ;
575
575
const duration = _ . find ( FIXED_DURATIONS , ( duration ) => duration . name === timeRange . label ) ;
576
576
const updatedTimeRange = interval && type === 'fixed' ? { timeRange : getDefaultTimeRange ( duration ) } : { } ;
@@ -587,6 +587,7 @@ const setCleanStoreForStreamChange = (store: LogsStore) => {
587
587
totalPages : 0 ,
588
588
} ,
589
589
...updatedTimeRange ,
590
+ alerts
590
591
} ;
591
592
} ;
592
593
You can’t perform that action at this time.
0 commit comments