Revision c68ad72e snf-cyclades-app/synnefo/ui/static/snf/js/neutron.js
b/snf-cyclades-app/synnefo/ui/static/snf/js/neutron.js | ||
---|---|---|
104 | 104 |
storage_attrs: { |
105 | 105 |
'subnets': ['subnets', 'subnet', function(model, attr) { |
106 | 106 |
var subnets = model.get(attr); |
107 |
if (subnets.length) { return subnets[0] } |
|
107 |
if (subnets && subnets.length) { return subnets[0] }
|
|
108 | 108 |
}] |
109 | 109 |
}, |
110 | 110 |
|
... | ... | |
216 | 216 |
} |
217 | 217 |
}); |
218 | 218 |
this.set({ports: this.ports}); |
219 |
this.floating_ips = synnefo.storage.floating_ips; |
|
220 |
this.set({floating_ips: this.floating_ips}); |
|
221 |
|
|
222 |
this.available_floating_ips = new Backbone.FilteredCollection(undefined, { |
|
223 |
collection: synnefo.storage.floating_ips, |
|
224 |
collectionFilter: function(m) { |
|
225 |
return !m.get('port_id'); |
|
226 |
} |
|
227 |
}); |
|
228 |
this.set({available_floating_ips: this.available_floating_ips}); |
|
219 | 229 |
}, |
220 | 230 |
|
221 | 231 |
}) |
Also available in: Unified diff