cartodb-4.42/lib/assets/javascripts/dashboard/data/datasets-collection.js
2024-04-06 05:25:13 +00:00

24 lines
674 B
JavaScript

const VisualizationsCollection = require('dashboard/data/visualizations-collection');
const checkAndBuildOpts = require('builder/helpers/required-opts');
const REQUIRED_OPTS = [
'configModel'
];
module.exports = VisualizationsCollection.extend({
_ITEMS_PER_PAGE: 12,
initialize: function (models, opts) {
checkAndBuildOpts(opts, REQUIRED_OPTS, this);
VisualizationsCollection.prototype.initialize.apply(this, arguments);
},
url: function () {
const host = `${this._configModel.get('common_data_user')}.${this._configModel.get('account_host')}`;
const options = this._createUrlOptions();
return `//${host}/api/v1/viz/?${options}`;
}
});