cartodb-4.42/lib/assets/javascripts/dashboard/data/datasets-collection.js

24 lines
674 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
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}`;
}
});