[pve-devel] [PATCH manager 2/8] ext6migrate: fix qemu snapshot panel
Dominik Csapak
d.csapak at proxmox.com
Fri Mar 18 14:36:05 CET 2016
changes id to itemid
make the snapshot info window a little bigger (for the bigger font)
changes the fireevent from datachanged to refresh
(for details see commit b26fe8189d81f955d6c65232f822314bfde84c8f)
and change show to activate event
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/qemu/Snapshot.js | 4 ++--
www/manager6/qemu/SnapshotTree.js | 9 ++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/www/manager6/qemu/Snapshot.js b/www/manager6/qemu/Snapshot.js
index 56729e3..d438d68 100644
--- a/www/manager6/qemu/Snapshot.js
+++ b/www/manager6/qemu/Snapshot.js
@@ -163,7 +163,7 @@ Ext.define('PVE.window.Snapshot', {
if (me.snapname) {
Ext.apply(me, {
width: 620,
- height: 400
+ height: 420
});
}
@@ -197,7 +197,7 @@ Ext.define('PVE.window.Snapshot', {
summarystore.add(kvarray);
summarystore.sort();
summarystore.resumeEvents();
- summarystore.fireEvent('datachanged', summarystore);
+ summarystore.fireEvent('refresh', summarystore);
form.findField('snaptime').setValue(new Date(data.snaptime));
form.findField('description').setValue(data.description);
diff --git a/www/manager6/qemu/SnapshotTree.js b/www/manager6/qemu/SnapshotTree.js
index 4e0899e..cd6dc4e 100644
--- a/www/manager6/qemu/SnapshotTree.js
+++ b/www/manager6/qemu/SnapshotTree.js
@@ -80,7 +80,10 @@ Ext.define('PVE.qemu.SnapshotTree', {
success: function(response, options) {
var res = response.result.data;
if (res.hasFeature) {
- Ext.getCmp('snapshotBtn').enable();
+ var snpBtns = Ext.ComponentQuery.query('#snapshotBtn');
+ snpBtns.forEach(function(item){
+ item.enable();
+ });
}
}
});
@@ -209,7 +212,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
});
var snapshotBtn = Ext.create('Ext.Button', {
- id: 'snapshotBtn',
+ itemId: 'snapshotBtn',
text: gettext('Take Snapshot'),
disabled: true,
handler: function() {
@@ -287,7 +290,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
],
columnLines: true, // will work in 4.1?
listeners: {
- show: me.reload,
+ activate: me.reload,
hide: me.load_task.cancel,
destroy: me.load_task.cancel,
itemdblclick: run_editor
--
2.1.4
More information about the pve-devel
mailing list