Revision 5dad72ea
b/ui/static/snf/js/ui/web/ui_list_view.js | ||
---|---|---|
254 | 254 |
remove_vm: function(vm) { |
255 | 255 |
this.vm(vm).find("input[type=checkbox]").removeAttr("checked"); |
256 | 256 |
var vm_data = this.table_data["vm_" + vm.id]; |
257 |
|
|
258 |
// update triggered on removed vm, skipping |
|
257 | 259 |
if (!vm_data) { return }; |
260 |
|
|
258 | 261 |
var index = vm_data.index; |
259 | 262 |
this.table.fnDeleteRow(index); |
260 | 263 |
delete this.table_data["vm_" + vm.id]; |
... | ... | |
381 | 384 |
}, |
382 | 385 |
|
383 | 386 |
post_update_vm: function(vm) { |
387 |
|
|
388 |
// skip update for these changes for performance issues |
|
384 | 389 |
if (vm.hasOnlyChange(["pending_action", "stats"])) { return }; |
390 |
|
|
385 | 391 |
var index = this.table_data["vm_" + vm.id].index; |
386 | 392 |
params = this.get_vm_table_data(vm); |
387 | 393 |
this.table_data["vm_" + vm.id].params = params; |
b/ui/static/snf/js/ui/web/ui_vms_base_view.js | ||
---|---|---|
152 | 152 |
|
153 | 153 |
show: function() { |
154 | 154 |
views.VMListView.__super__.show.apply(this, arguments); |
155 |
this.update_vms(storage.vms.models); |
|
155 |
if (!snf.config.update_hidden_views) { |
|
156 |
this.update_vms(storage.vms.models); |
|
157 |
} |
|
156 | 158 |
}, |
157 | 159 |
|
158 | 160 |
// do update for provided vms, then update the view layout |
159 | 161 |
update_vms: function(vms) { |
160 |
if (!this.visible()) { return }; |
|
162 |
|
|
163 |
if (!this.visible() && !snf.config.update_hidden_views) { return }; |
|
164 |
|
|
161 | 165 |
_.each(vms, _.bind(function(vm){ |
162 | 166 |
// vm will be removed |
163 | 167 |
// no need to update |
b/ui/static/snf/js/views.js | ||
---|---|---|
305 | 305 |
|
306 | 306 |
}); |
307 | 307 |
|
308 |
snf.config.update_hidden_views = true; |
|
309 |
|
|
308 | 310 |
})(this); |
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") { |
|
559 |
|
|
560 |
// match <= 1.9.1 |
|
561 |
if ($.browser.mozilla && $.browser.version.substr(0,3) == "1.9") { |
|
560 | 562 |
synnefo.config.overlay_speed = 0; |
561 | 563 |
} |
564 |
|
|
565 |
synnefo.config.update_hidden_views = true; |
|
562 | 566 |
synnefo.ui.init(); |
563 | 567 |
|
564 | 568 |
}) |
Also available in: Unified diff