Revision 5e66fc73 snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_networks_view.js
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_networks_view.js | ||
---|---|---|
317 | 317 |
|
318 | 318 |
disconnect_port: function(model, e) { |
319 | 319 |
e && e.stopPropagation(); |
320 |
var network = this.model.get("network"); |
|
320 | 321 |
this.model.actions.reset_pending(); |
321 | 322 |
this.model.disconnect(_.bind(this.disconnect_port_complete, this)); |
322 | 323 |
}, |
... | ... | |
446 | 447 |
|
447 | 448 |
status_display: function(status) { |
448 | 449 |
var status; |
449 |
if (this.model.id == "snf-combined-public-network") { |
|
450 |
return "Internet" |
|
451 |
} |
|
452 |
|
|
453 | 450 |
var cidr = this.model.get('cidr'); |
454 | 451 |
var status = this.model.get('ext_status'); |
455 | 452 |
if (status != 'REMOVING' && cidr) { |
456 | 453 |
return cidr |
457 | 454 |
} |
455 |
if (this.model.id == "snf-combined-public-network" && !_.contains( |
|
456 |
["CONNECTING", "DISCONNECTING"], status)) { |
|
457 |
return "Internet" |
|
458 |
} |
|
459 |
|
|
458 | 460 |
return this.status_map[status]; |
459 | 461 |
}, |
460 | 462 |
|
... | ... | |
528 | 530 |
model: this.combined_public |
529 | 531 |
}); |
530 | 532 |
this.add_model_view(this.combined_public_view, this.combined_public, 0); |
531 |
this.combined_public_view.$("i").hide(); |
|
532 | 533 |
this.public_added = true; |
533 | 534 |
} |
534 | 535 |
return views.NetworksCollectionView.__super__.add_model.call(this, m); |
Also available in: Unified diff