Commit 1b23db69 authored by Wolfgang Link's avatar Wolfgang Link Committed by Dietmar Maurer

Change Ct restore rest call

this change will provide that it will be possibel to restore LXC and OVZ dumpfiles over the gui.
parent 23dd427f
...@@ -380,8 +380,8 @@ Ext.define('PVE.storage.ContentView', { ...@@ -380,8 +380,8 @@ Ext.define('PVE.storage.ContentView', {
var vmtype; var vmtype;
if (rec.data.volid.match(/vzdump-qemu-/)) { if (rec.data.volid.match(/vzdump-qemu-/)) {
vmtype = 'qemu'; vmtype = 'qemu';
} else if (rec.data.volid.match(/vzdump-openvz-/)) { } else if (rec.data.volid.match(/vzdump-openvz-/) || rec.data.volid.match(/vzdump-lxc-/)) {
vmtype = 'openvz'; vmtype = 'lxc';
} else { } else {
return; return;
} }
......
...@@ -23,7 +23,7 @@ Ext.define('PVE.window.Restore', { ...@@ -23,7 +23,7 @@ Ext.define('PVE.window.Restore', {
name: 'storage', name: 'storage',
value: '', value: '',
fieldLabel: gettext('Storage'), fieldLabel: gettext('Storage'),
storageContent: (me.vmtype === 'openvz') ? 'rootdir' : 'images', storageContent: (me.vmtype === 'lxc') ? 'rootdir' : 'images',
allowBlank: true allowBlank: true
}); });
...@@ -88,8 +88,8 @@ Ext.define('PVE.window.Restore', { ...@@ -88,8 +88,8 @@ Ext.define('PVE.window.Restore', {
}; };
var url; var url;
if (me.vmtype === 'openvz') { if (me.vmtype === 'lxc') {
url = '/nodes/' + me.nodename + '/openvz'; url = '/nodes/' + me.nodename + '/lxc';
params.ostemplate = me.volid; params.ostemplate = me.volid;
params.restore = 1; params.restore = 1;
} else if (me.vmtype === 'qemu') { } else if (me.vmtype === 'qemu') {
...@@ -118,7 +118,7 @@ Ext.define('PVE.window.Restore', { ...@@ -118,7 +118,7 @@ Ext.define('PVE.window.Restore', {
submitBtn.setDisabled(!valid); submitBtn.setDisabled(!valid);
}); });
var title = (me.vmtype === 'openvz') ? gettext('Restore CT') : var title = (me.vmtype === 'lxc') ? gettext('Restore CT') :
gettext('Restore VM'); gettext('Restore VM');
Ext.apply(me, { Ext.apply(me, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment