@@ -174,7 +174,9 @@ export const NetflowTraffic: React.FC<{
174174 const [ match , setMatch ] = React . useState < Match > ( getMatchFromURL ( ) ) ;
175175 const [ reporter , setReporter ] = React . useState < Reporter > ( getReporterFromURL ( ) ) ;
176176 const [ layer , setLayer ] = React . useState < Layer > ( getLayerFromURL ( ) ) ;
177- const [ limit , setLimit ] = React . useState < number > ( getLimitFromURL ( ) ) ;
177+ const [ limit , setLimit ] = React . useState < number > (
178+ getLimitFromURL ( selectedViewId === 'table' ? LIMIT_VALUES [ 0 ] : TOP_VALUES [ 0 ] )
179+ ) ;
178180 const [ lastLimit , setLastLimit ] = useLocalStorage < number > ( LOCAL_STORAGE_LAST_LIMIT_KEY , LIMIT_VALUES [ 0 ] ) ;
179181 const [ lastTop , setLastTop ] = useLocalStorage < number > ( LOCAL_STORAGE_LAST_TOP_KEY , TOP_VALUES [ 0 ] ) ;
180182 const [ range , setRange ] = React . useState < number | TimeRange > ( getRangeFromURL ( ) ) ;
@@ -264,7 +266,7 @@ export const NetflowTraffic: React.FC<{
264266 match === 'any' ? groupFiltersMatchAny ( enabledFilters ) : groupFiltersMatchAll ( enabledFilters ) ;
265267 const query : FlowQuery = {
266268 filters : groupedFilters ,
267- limit : limit ,
269+ limit : LIMIT_VALUES . includes ( limit ) ? limit : LIMIT_VALUES [ 0 ] ,
268270 reporter : reporter ,
269271 layer : layer
270272 } ;
@@ -282,8 +284,7 @@ export const NetflowTraffic: React.FC<{
282284 if ( selectedViewId === 'topology' ) {
283285 query . groups = topologyOptions . groupTypes !== TopologyGroupTypes . NONE ? topologyOptions . groupTypes : undefined ;
284286 } else if ( selectedViewId === 'overview' ) {
285- //TODO: filter loki results like "metric":{} and sources equal to destinations from server side
286- query . limit = limit + 5 ;
287+ query . limit = TOP_VALUES . includes ( limit ) ? limit : TOP_VALUES [ 0 ] ;
287288 query . groups = undefined ;
288289 }
289290 const info = computeStepInterval ( range ) ;
0 commit comments