Revision 4792afbe

b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js
626 626

  
627 627
        get_connectable_vms: function() {
628 628
            return storage.vms.filter(function(vm){
629
                return !vm.in_error_state();
629
                return !vm.in_error_state() && !vm.is_building();
630 630
            })
631 631
        },
632 632

  
......
2017 2017
            
2018 2018
            this.set({'pending_firewall': value});
2019 2019
            this.set({'pending_firewall_sending': true});
2020
            this.set({'pending_firewall_from': this.get('firewallProfile')});
2020 2021

  
2021 2022
            var success_cb = function() {
2022 2023
                if (callback) {
......
2034 2035

  
2035 2036
        reset_pending_firewall: function() {
2036 2037
            this.set({'pending_firewall': false});
2038
            this.set({'pending_firewall': false});
2037 2039
        },
2038 2040

  
2039 2041
        check_firewall: function() {
2040 2042
            var firewall = this.get('firewallProfile');
2041 2043
            var pending = this.get('pending_firewall');
2044
            var previous = this.get('pending_firewall_from');
2045
            if (previous != firewall) { this.get_vm().require_reboot() };
2042 2046
            this.reset_pending_firewall();
2043 2047
        }
2044 2048
        
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_networks_view.js
818 818
                } else {
819 819
                    this.cancel_destroy();
820 820
                }
821
            }, this))
821
            }, this));
822
            
823

  
824
            // reset pending destory action after successful removal
825
            self.network.bind("remove", _.bind(function(net){
826
                net.get("actions").remove_all("destroy");
827
            }));
822 828

  
823 829
            this.$(".net-actions button.no").click(function(e){
824 830
                e.preventDefault();
......
1030 1036
            }
1031 1037

  
1032 1038
            if (synnefo.config.network_strict_destroy) {
1033
                if (this.network.get_nics().length == 0) {
1039
                if (this.network.get_nics().length == 0 && 
1040
                        !this.network.in_progress()) {
1034 1041
                    this.el.removeClass("disable-destroy");
1035 1042
                } else {
1036 1043
                    this.el.addClass("disable-destroy");
......
1190 1197
            if (this.private_list.find(".network").length == 0) {
1191 1198
                this.private_list.hide();
1192 1199
            }
1200
            
1193 1201
        },
1194 1202

  
1195 1203
        network_added: function(net) {
b/snf-cyclades-app/synnefo/ui/templates/partials/networks.html
51 51
                  virtual machines. {% endblocktrans %}
52 52
            </p>
53 53
            </div>
54
            <div class="form-field fixpos" id="network-create-dhcp-fields">
55
              <label for="network-type">Network subnet:</label>
56
              <select id="network-create-subnet">
57
                <option selected class="auto" value="auto">Auto</option>
58
                <option value="custom" class="manual">Manual...</option>
59
              </select>
60
            </div>
61
            <div class="form-field">
62
              <label class="hidden" for="network-custom-subnet">Custom subnet:</label>
63
              <input type="text" id="network-create-subnet-custom"/>
54
            <div id="network-create-dhcp-fields">
55
              <div class="form-field fixpos">
56
                <label for="network-type">Network subnet:</label>
57
                <select id="network-create-subnet">
58
                  <option selected class="auto" value="auto">Auto</option>
59
                  <option value="custom" class="manual">Manual...</option>
60
                </select>
61
              </div>
62
              <div class="form-field">
63
                <label class="hidden" for="network-custom-subnet">Custom subnet:</label>
64
                <input type="text" id="network-create-subnet-custom"/>
65
              </div>
64 66
            </div>
65 67
          </div>
66 68
            <div class="form-actions plain clearfix">

Also available in: Unified diff