@@ -6,6 +6,7 @@ import {shallowEqual} from 'react-redux';
66import { ResponseError } from '../../../../components/Errors/ResponseError' ;
77import { TableIndexInfo } from '../../../../components/InfoViewer/schemaInfo' ;
88import { Loader } from '../../../../components/Loader' ;
9+ import { selectAutoRefreshInterval } from '../../../../store/reducers/autoRefreshControl' ;
910import { olapApi } from '../../../../store/reducers/olapStats' ;
1011import { overviewApi } from '../../../../store/reducers/overview/overview' ;
1112import { selectSchemaMergedChildrenPaths } from '../../../../store/reducers/schema/schema' ;
@@ -31,14 +32,15 @@ interface OverviewProps {
3132}
3233
3334function Overview ( { type, tenantName} : OverviewProps ) {
34- const { autorefresh, currentSchemaPath} = useTypedSelector ( ( state ) => state . schema ) ;
35+ const autoRefreshInterval = useTypedSelector ( selectAutoRefreshInterval ) ;
36+ const { currentSchemaPath} = useTypedSelector ( ( state ) => state . schema ) ;
3537
3638 const schemaPath = currentSchemaPath || tenantName ;
3739 const olapParams =
3840 isTableType ( type ) && isColumnEntityType ( type ) ? { path : schemaPath } : skipToken ;
3941 const { currentData : olapData , isFetching : olapIsFetching } = olapApi . useGetOlapStatsQuery (
4042 olapParams ,
41- { pollingInterval : autorefresh } ,
43+ { pollingInterval : autoRefreshInterval } ,
4244 ) ;
4345 const olapStatsLoading = olapIsFetching && olapData === undefined ;
4446 const { result : olapStats } = olapData || { result : undefined } ;
@@ -65,7 +67,7 @@ function Overview({type, tenantName}: OverviewProps) {
6567 isFetching,
6668 error : overviewError ,
6769 } = overviewApi . useGetOverviewQuery ( paths , {
68- pollingInterval : autorefresh ,
70+ pollingInterval : autoRefreshInterval ,
6971 } ) ;
7072 const overviewLoading = isFetching && currentData === undefined ;
7173 const { data : rawData , additionalData} = currentData || { } ;
0 commit comments