PageRenderTime 36ms CodeModel.GetById 10ms RepoModel.GetById 1ms app.codeStats 0ms

/dashboard/app/scripts/collections/pool-collection.js

https://github.com/hnuzhoulin/calamari-clients
JavaScript | 21 lines | 16 code | 3 blank | 2 comment | 2 complexity | 5cad3186faa38100b7449544e625462e MD5 | raw file
Possible License(s): Apache-2.0
  1. /*jshint -W106*/
  2. /*global define*/
  3. define(['underscore', 'backbone', 'models/application-model'], function(_, Backbone, models) {
  4. 'use strict';
  5. var PoolCollection = Backbone.Collection.extend({
  6. cluster: 1,
  7. url: function() {
  8. return '/api/v1/cluster/' + this.cluster + '/pool';
  9. },
  10. initialize: function(models, options) {
  11. if (options && options.cluster) {
  12. this.cluster = options.cluster;
  13. }
  14. },
  15. model: models.PoolModel
  16. });
  17. return PoolCollection;
  18. });