ui: qemu: update grid button status with events from correct store

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>
This commit is contained in:
Oguz Bektas 2019-10-29 15:50:17 +01:00 committed by Thomas Lamprecht
parent 6976163d1b
commit 141aba6b62
2 changed files with 3 additions and 3 deletions

View 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();
});
}

View 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();
});
}