[pve-devel] [PATCH] Change Ct restore rest call
Wolfgang Link
w.link at proxmox.com
Wed Jul 22 12:41:21 CEST 2015
this change will provide that it will be possibel to restore LXC and OVZ dumpfiles over the gui.
---
www/manager/storage/ContentView.js | 4 ++--
www/manager/window/Restore.js | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/www/manager/storage/ContentView.js b/www/manager/storage/ContentView.js
index 1a715e3..55b11df 100644
--- a/www/manager/storage/ContentView.js
+++ b/www/manager/storage/ContentView.js
@@ -380,8 +380,8 @@ Ext.define('PVE.storage.ContentView', {
var vmtype;
if (rec.data.volid.match(/vzdump-qemu-/)) {
vmtype = 'qemu';
- } else if (rec.data.volid.match(/vzdump-openvz-/)) {
- vmtype = 'openvz';
+ } else if (rec.data.volid.match(/vzdump-openvz-/) || rec.data.volid.match(/vzdump-lxc-/)) {
+ vmtype = 'lxc';
} else {
return;
}
diff --git a/www/manager/window/Restore.js b/www/manager/window/Restore.js
index 9c37815..b341e8a 100644
--- a/www/manager/window/Restore.js
+++ b/www/manager/window/Restore.js
@@ -23,7 +23,7 @@ Ext.define('PVE.window.Restore', {
name: 'storage',
value: '',
fieldLabel: gettext('Storage'),
- storageContent: (me.vmtype === 'openvz') ? 'rootdir' : 'images',
+ storageContent: (me.vmtype === 'lxc') ? 'rootdir' : 'images',
allowBlank: true
});
@@ -88,8 +88,8 @@ Ext.define('PVE.window.Restore', {
};
var url;
- if (me.vmtype === 'openvz') {
- url = '/nodes/' + me.nodename + '/openvz';
+ if (me.vmtype === 'lxc') {
+ url = '/nodes/' + me.nodename + '/lxc';
params.ostemplate = me.volid;
params.restore = 1;
} else if (me.vmtype === 'qemu') {
@@ -118,7 +118,7 @@ Ext.define('PVE.window.Restore', {
submitBtn.setDisabled(!valid);
});
- var title = (me.vmtype === 'openvz') ? gettext('Restore CT') :
+ var title = (me.vmtype === 'lxc') ? gettext('Restore CT') :
gettext('Restore VM');
Ext.apply(me, {
--
2.1.4
More information about the pve-devel
mailing list