Revision 2506f741

b/ui/static/snf/js/models.js
77 77

  
78 78
        remove: function() {
79 79
            this.api.call(this.api_path(), "delete");
80
        },
81

  
82
        changedKeys: function() {
83
            return _.keys(this.changedAttributes() || {});
84
        },
85

  
86
        hasOnlyChange: function(keys) {
87
            var ret = false;
88
            _.each(keys, _.bind(function(key) {
89
                if (this.changedKeys().length == 1 && this.changedKeys().indexOf(key) > -1) { ret = true};
90
            }, this));
91
            return ret;
80 92
        }
81 93

  
82 94
    })
b/ui/static/snf/js/ui/web/ui_list_view.js
31 31
            this.available_actions = [];
32 32
            this.multi_view = synnefo.ui.main.multiple_actions_view;
33 33
            this.hovered = false;
34

  
35
            this.update_actions = _.throttle(this.update_actions, 100);
34 36
        },
35 37

  
36 38
        set_handlers: function() {
......
148 150

  
149 151
            this.table_data = {};
150 152
            views.ListView.__super__.initialize.apply(this, arguments);
153

  
154
            this.update_layout = _.throttle(this.update_layout, 100);
151 155
        },
152 156
        
153 157
        reset: function() {
......
249 253
        // remove vm
250 254
        remove_vm: function(vm) {
251 255
            this.vm(vm).find("input[type=checkbox]").removeAttr("checked");
252
            var index = this.table_data["vm_" + vm.id].index;
256
            var vm_data = this.table_data["vm_" + vm.id];
257
            if (!vm_data) { return };
258
            var index = vm_data.index;
253 259
            this.table.fnDeleteRow(index);
254 260
            delete this.table_data["vm_" + vm.id];
255 261
            this.update_data();
......
375 381
        },
376 382

  
377 383
        post_update_vm: function(vm) {
384
            if (vm.hasOnlyChange(["pending_action", "stats"])) { return };
378 385
            var index = this.table_data["vm_" + vm.id].index;
379 386
            params = this.get_vm_table_data(vm);
380 387
            this.table_data["vm_" + vm.id].params = params;
b/ui/static/snf/js/ui/web/ui_main_view.js
43 43
            // for heavy resize/scroll window events
44 44
            // do it `like a boss` 
45 45
            this.fix_position = _.throttle(this.fix_position, 100);
46
            this.update_layout = _.throttle(this.update_layout, 100);
46 47
            this.show_limit = 1;
47 48
        },
48 49

  
b/ui/static/snf/js/ui/web/ui_vms_base_view.js
150 150
            this.__update_layout();
151 151
        },
152 152

  
153
        show: function() {
154
            views.VMListView.__super__.show.apply(this, arguments);
155
            this.update_vms(storage.vms.models);
156
        },
157

  
153 158
        // do update for provided vms, then update the view layout
154 159
        update_vms: function(vms) {
160
            if (!this.visible()) { return };
155 161
            _.each(vms, _.bind(function(vm){
156 162
                // vm will be removed
157 163
                // no need to update
b/ui/static/snf/js/views.js
84 84
                closeOnClick: false,
85 85
                mask: {
86 86
                    color: "#444",
87
                    loadSpeed: 200,
87
                    loadSpeed: snf.config.overlay_speed || 0,
88 88
                    opacity: 0.7
89
                }
89
                },
90
                speed: snf.config.overlay_speed || 200
90 91
            }
91 92
            
92 93
            this.tpl_selector = selector || this.tpl_selector;
b/ui/templates/home.html
556 556
            {% endif %}
557 557
            
558 558
            synnefo.config.update_interval = 5000 || {{ update_interval }};
559
            if ($.browser.mozilla && $.browser.version == "1.9.1") {
560
                synnefo.config.overlay_speed = 0;
561
            }
559 562
            synnefo.ui.init();
560 563

  
561 564
        })

Also available in: Unified diff