Revision 25b225a5
b/ui/static/snf/js/models.js | ||
---|---|---|
310 | 310 |
storage.vms.bind("add", _.bind(this.update_connections, this, "add")); |
311 | 311 |
storage.vms.bind("remove", _.bind(this.update_connections, this, "remove")); |
312 | 312 |
storage.vms.bind("reset", _.bind(this.update_connections, this, "reset")); |
313 |
|
|
313 | 314 |
this.bind("change:linked_to", _.bind(this.update_connections, this, "net:change")); |
314 | 315 |
this.update_connections(); |
315 | 316 |
this.update_state(); |
317 |
|
|
316 | 318 |
return ret; |
317 | 319 |
}, |
318 | 320 |
|
... | ... | |
321 | 323 |
this.set({state: "CONNECTING"}); |
322 | 324 |
return |
323 | 325 |
} |
326 |
|
|
324 | 327 |
if (this.vms.pending_for_removal.length) { |
325 | 328 |
this.set({state: "DISCONNECTING"}); |
326 | 329 |
return |
... | ... | |
459 | 462 |
'NORMAL': 'Private network', |
460 | 463 |
'CONNECTING': 'Connecting...', |
461 | 464 |
'DISCONNECTING': 'Disconnecting...', |
462 |
'FIREWALLING': 'Firewall update...' |
|
465 |
'FIREWALLING': 'Firewall update...', |
|
466 |
'DESTROY': 'Destroying...' |
|
463 | 467 |
} |
464 | 468 |
|
465 | 469 |
models.Network.STATES_TRANSITIONS = { |
b/ui/static/snf/js/ui/web/ui_networks_view.js | ||
---|---|---|
650 | 650 |
var el = $(this); |
651 | 651 |
el.closest(".confirm_single").hide(); |
652 | 652 |
el.parent().parent().find(".selected").removeClass("selected"); |
653 |
self.network.remove(function(){ |
|
653 |
self.network.remove(function() { |
|
654 |
self.network.set({state:"DESTROY"}); |
|
654 | 655 |
el.closest(".confirm_single").removeClass("in-progress"); |
655 | 656 |
}); |
656 | 657 |
el.closest(".confirm_single").addClass("in-progress"); |
... | ... | |
834 | 835 |
this.$(".spinner").hide(); |
835 | 836 |
this.$(".network-indicator").removeClass("in-progress"); |
836 | 837 |
} |
838 |
|
|
839 |
if (this.network.get("state") == "DESTROY") { |
|
840 |
this.$(".spinner").show(); |
|
841 |
this.$(".state").addClass("destroying-state"); |
|
842 |
} |
|
837 | 843 |
} |
838 | 844 |
}) |
839 | 845 |
|
Also available in: Unified diff