Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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}`;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user