Revision fa5e1f54 snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js | ||
---|---|---|
874 | 874 |
views.VMPortView = views.ext.ModelView.extend({ |
875 | 875 |
tpl: '#vm-port-view-tpl', |
876 | 876 |
classes: 'port-item clearfix', |
877 |
|
|
878 |
update_in_progress: function() { |
|
879 |
if (this.model.get("in_progress")) { |
|
880 |
this.set_in_progress(); |
|
881 |
} else { |
|
882 |
this.unset_in_progress(); |
|
883 |
} |
|
884 |
}, |
|
885 |
|
|
886 |
set_in_progress: function() { |
|
887 |
this.el.find(".type").hide(); |
|
888 |
this.el.find(".in-progress").show(); |
|
889 |
}, |
|
890 |
|
|
891 |
unset_in_progress: function() { |
|
892 |
this.el.find(".type").show(); |
|
893 |
this.el.find(".in-progress").hide(); |
|
894 |
}, |
|
895 |
|
|
896 |
disconnect_port: function(model, e) { |
|
897 |
e && e.stopPropagation(); |
|
898 |
var network = this.model.get("network"); |
|
899 |
this.model.actions.reset_pending(); |
|
900 |
this.model.disconnect(_.bind(this.disconnect_port_complete, this)); |
|
901 |
}, |
|
902 |
|
|
903 |
disconnect_port_complete: function() { |
|
904 |
}, |
|
905 |
|
|
877 | 906 |
get_network_name: function() { |
878 | 907 |
var network = this.model.get('network'); |
879 | 908 |
var name = network && network.get('name'); |
... | ... | |
903 | 932 |
}); |
904 | 933 |
|
905 | 934 |
views.VMPortIpView = views.ext.ModelView.extend({ |
906 |
tpl: '#vm-port-ip-tpl' |
|
935 |
tpl: '#vm-port-ip-tpl', |
|
936 |
css_classes: "clearfix" |
|
907 | 937 |
}); |
908 | 938 |
|
909 | 939 |
views.VMPortIpsView = views.ext.CollectionView.extend({ |
Also available in: Unified diff