Pregunta

When viewing the preview data of a CSV the record limit is set by default at 1000, i can't find where do this parameter is set, is it possible to redifine it's value? if so, where is set?

Thanks

¿Fue útil?

Solución

I am not sure whether I have understood your question correctly and I am not sure which backend you are using but I assume that you could add

dataset.size = 2000;

to the first line of the function initializeDataExplorer in the preview_recline.js file (https://github.com/okfn/ckan/blob/master/ckanext/reclinepreview/theme/public/preview_recline.js#L104).

Otros consejos

You must edit these files:

  • /ckan/ckanext/reclinepreview/theme/public/vendor/recline/recline.js
  • /ckan/ckanext/reclinepreview/theme/public/vendor/recline/recline.min.js

In the recline.js, in the line 470, you can change the limit of 1000 lines:

  my.fetch = function(dataset) {
    var data = {
      url: dataset.url,
      'max-results':  dataset.size || dataset.rows || 1000,
      type: dataset.format || ''
    };

I changed 1000 to 2000.

  my.fetch = function(dataset) {
    var data = {
      url: dataset.url,
      'max-results':  dataset.size || dataset.rows || 2000,
      type: dataset.format || ''
    };

Remember do the same change in recline.min.js

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top