/dashboard/app/scripts/collections/pool-collection.js
JavaScript | 21 lines | 16 code | 3 blank | 2 comment | 2 complexity | 5cad3186faa38100b7449544e625462e MD5 | raw file
Possible License(s): Apache-2.0
- /*jshint -W106*/
- /*global define*/
- define(['underscore', 'backbone', 'models/application-model'], function(_, Backbone, models) {
- 'use strict';
- var PoolCollection = Backbone.Collection.extend({
- cluster: 1,
- url: function() {
- return '/api/v1/cluster/' + this.cluster + '/pool';
- },
- initialize: function(models, options) {
- if (options && options.cluster) {
- this.cluster = options.cluster;
- }
- },
- model: models.PoolModel
- });
- return PoolCollection;
- });