Change Ct restore rest call

this change will provide that it will be possibel to restore LXC and OVZ dumpfiles over the gui.
This commit is contained in:
Wolfgang Link 2015-07-22 12:41:21 +02:00 committed by Dietmar Maurer
parent 23dd427fb0
commit 1b23db6962
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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, {