]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: qemu: update grid button status with events from correct store
authorOguz Bektas <o.bektas@proxmox.com>
Tue, 29 Oct 2019 14:50:17 +0000 (15:50 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 30 Oct 2019 08:00:50 +0000 (09:00 +0100)
as we noticed at the container side, we should use diffStore in order
to update the button status without delay.

Effectively alls ObjectGrids, and thus their descendants,
PendingObjectGrids use a DiffStore, where we have two effective
stores, a remote store and a local, in-memory, proxy store.

Co-developed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/qemu/HardwareView.js
www/manager6/qemu/Options.js

index 3d029411c73f83cc2c559c23ed236a2ca4474c74..29cdb68ce4598692840938b542889f1cf26dc12e 100644 (file)
@@ -754,9 +754,9 @@ Ext.define('PVE.qemu.HardwareView', {
        me.callParent();
 
        me.on('activate', me.rstore.startUpdate);
-       me.on('destroy', me.rstore.stopUpdate); 
+       me.on('destroy', me.rstore.stopUpdate);
 
-       me.mon(me.rstore, 'refresh', function() {
+       me.mon(me.getStore(), 'datachanged', function() {
            set_button_status();
        });
     }
index 1545e1c81cb9f7c710b941df215da863eb469c14..1ec79a953e9df71ef409575050518a64c25844de 100644 (file)
@@ -378,7 +378,7 @@ Ext.define('PVE.qemu.Options', {
        me.on('destroy', me.rstore.stopUpdate);
        me.on('deactivate', me.rstore.stopUpdate);
 
-       me.rstore.on('datachanged', function() {
+       me.mon(me.getStore(), 'datachanged', function() {
            set_button_status();
        });
     }