@@ -4,8 +4,8 @@ Vuex module for the climate stations and related selections
44
55import axios from 'axios'
66
7- // temporary hard limit
8- const OAPIFEATURES_LIMIT = 500
7+ // Limit for pagination
8+ const OAPI_FEATURES_LIMIT = 10000
99
1010// initial state
1111const state = {
@@ -314,8 +314,8 @@ const actions = {
314314
315315 // Paginate requests based on totalStations
316316 const requests = [ ]
317- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
318- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
317+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
318+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
319319 cancelToken : state . cancelSourceStation . token
320320 } )
321321 requests . push ( request )
@@ -366,8 +366,8 @@ const actions = {
366366
367367 // Paginate requests based on totalStations
368368 const requests = [ ]
369- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
370- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
369+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
370+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
371371 cancelToken : state . cancelSourceStation . token
372372 } )
373373 requests . push ( request )
@@ -406,8 +406,8 @@ const actions = {
406406
407407 // Paginate requests based on totalStations
408408 const requests = [ ]
409- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
410- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
409+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
410+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
411411 cancelToken : state . cancelSourceStation . token
412412 } )
413413 requests . push ( request )
@@ -446,8 +446,8 @@ const actions = {
446446
447447 // Paginate requests based on totalStations
448448 const requests = [ ]
449- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
450- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
449+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
450+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
451451 cancelToken : state . cancelSourceStation . token
452452 } )
453453 requests . push ( request )
@@ -486,8 +486,8 @@ const actions = {
486486
487487 // Paginate requests based on totalStations
488488 const requests = [ ]
489- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
490- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
489+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
490+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
491491 cancelToken : state . cancelSourceStation . token
492492 } )
493493 requests . push ( request )
@@ -526,8 +526,8 @@ const actions = {
526526
527527 // Paginate requests based on totalStations
528528 const requests = [ ]
529- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
530- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
529+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
530+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
531531 cancelToken : state . cancelSourceStation . token
532532 } )
533533 requests . push ( request )
@@ -566,8 +566,8 @@ const actions = {
566566
567567 // Paginate requests based on totalStations
568568 const requests = [ ]
569- for ( let offset = 0 ; offset < totalStations ; offset += OAPIFEATURES_LIMIT ) {
570- const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPIFEATURES_LIMIT } ` , {
569+ for ( let offset = 0 ; offset < totalStations ; offset += OAPI_FEATURES_LIMIT ) {
570+ const request = axios . get ( `${ url } &offset=${ offset } &limit=${ OAPI_FEATURES_LIMIT } ` , {
571571 cancelToken : state . cancelSourceStation . token
572572 } )
573573 requests . push ( request )
0 commit comments