[pve-devel] [PATCH manager 3/3] add container move volume to gui
Dominik Csapak
d.csapak at proxmox.com
Mon May 7 14:10:14 CEST 2018
this reuses the vm HDMove window to move volumes
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/lxc/Resources.js | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index 676ad340..4e38042a 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -144,6 +144,23 @@ Ext.define('PVE.lxc.RessourceView', {
});
};
+ var run_move = function(b, e, rec) {
+ if (!rec) {
+ return;
+ }
+
+ var win = Ext.create('PVE.window.HDMove', {
+ disk: rec.data.key,
+ nodename: nodename,
+ vmid: vmid,
+ type: 'lxc'
+ });
+
+ win.show();
+
+ win.on('destroy', me.reload, me);
+ };
+
var edit_btn = new Proxmox.button.Button({
text: gettext('Edit'),
selModel: me.selModel,
@@ -182,6 +199,14 @@ Ext.define('PVE.lxc.RessourceView', {
handler: run_remove
});
+ var move_btn = new Proxmox.button.Button({
+ text: gettext('Move Volume'),
+ selModel: me.selModel,
+ disabled: true,
+ dangerous: true,
+ handler: run_move
+ });
+
var set_button_status = function() {
var rec = me.selModel.getSelection()[0];
@@ -208,6 +233,7 @@ Ext.define('PVE.lxc.RessourceView', {
remove_btn.setDisabled(!isDisk || rec.data.key === 'rootfs');
resize_btn.setDisabled(!isDisk);
+ move_btn.setDisabled(!isDisk);
};
@@ -239,7 +265,8 @@ Ext.define('PVE.lxc.RessourceView', {
},
edit_btn,
remove_btn,
- resize_btn
+ resize_btn,
+ move_btn
],
rows: rows,
editorConfig: {
--
2.11.0
More information about the pve-devel
mailing list