Commit 3c657abe authored by Dietmar Maurer's avatar Dietmar Maurer

GUI: use lxc instead of openvz

parent 04a567a6
......@@ -10,7 +10,7 @@ JSSRC= \
qemu/SendKeyMenu.js \
qemu/CmdMenu.js \
qemu/TemplateMenu.js \
openvz/CmdMenu.js \
lxc/CmdMenu.js \
VNCConsole.js \
data/TimezoneStore.js \
data/reader/JsonObject.js \
......@@ -139,16 +139,10 @@ JSSRC= \
qemu/SnapshotTree.js \
qemu/Config.js \
qemu/CreateWizard.js \
openvz/StatusView.js \
openvz/Summary.js \
openvz/RessourceEdit.js \
openvz/RessourceView.js \
openvz/Options.js \
openvz/Network.js \
openvz/DNS.js \
openvz/BeanCounterGrid.js \
openvz/Config.js \
openvz/CreateWizard.js \
lxc/StatusView.js \
lxc/Summary.js \
lxc/Config.js \
lxc/CreateWizard.js \
pool/StatusView.js \
pool/Summary.js \
pool/Config.js \
......
......@@ -924,9 +924,9 @@ Ext.define('PVE.Utils', { statics: {
},
openConsoleWindow: function(viewer, vmtype, vmid, nodename, vmname) {
// kvm, openvz, shell, upgrade
// kvm, lxc, shell, upgrade
if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'openvz')) {
if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'lxc')) {
throw "missing vmid";
}
......@@ -942,8 +942,8 @@ Ext.define('PVE.Utils', { statics: {
if (vmtype === 'kvm') {
url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'openvz') {
url = '/nodes/' + nodename + '/openvz/' + vmid.toString() + '/spiceproxy';
} else if (vmtype === 'lxc') {
url = '/nodes/' + nodename + '/lxc/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'shell') {
url = '/nodes/' + nodename + '/spiceshell';
......@@ -970,7 +970,7 @@ Ext.define('PVE.Utils', { statics: {
openVNCViewer: function(vmtype, vmid, nodename, vmname, novnc) {
var url = Ext.urlEncode({
console: vmtype, // kvm, openvz, upgrade or shell
console: vmtype, // kvm, lxc, upgrade or shell
novnc: novnc ? 1 : 0,
vmid: vmid,
vmname: vmname,
......
......@@ -393,9 +393,9 @@ Ext.define('PVE.KVMConsole', {
}
});
Ext.define('PVE.OpenVZConsole', {
Ext.define('PVE.LxcConsole', {
extend: 'PVE.VNCConsole',
alias: ['widget.pveOpenVZConsole'],
alias: ['widget.pveLxcConsole'],
initComponent : function() {
var me = this;
......@@ -408,7 +408,7 @@ Ext.define('PVE.OpenVZConsole', {
throw "no VM ID specified";
}
var baseUrl = "/nodes/" + me.nodename + "/openvz/" + me.vmid;
var baseUrl = "/nodes/" + me.nodename + "/lxc/" + me.vmid;
var vm_command = function(cmd, params, reload_applet) {
PVE.Utils.API2Request({
......
......@@ -132,13 +132,13 @@ Ext.define('PVE.ConsoleWorkspace', {
vmname: param.vmname,
toplevel: true
};
} else if (consoleType === 'openvz') {
} else if (consoleType === 'lxc') {
me.title = "CT " + param.vmid;
if (param.vmname) {
me.title += " ('" + param.vmname + "')";
}
content = {
xtype: 'pveOpenVZConsole',
xtype: 'pveLxcConsole',
novnc: param.novnc,
vmid: param.vmid,
nodename: param.node,
......@@ -288,14 +288,14 @@ Ext.define('PVE.StdWorkspace', {
root: 'PVE.dc.Config',
node: 'PVE.node.Config',
qemu: 'PVE.qemu.Config',
openvz: 'PVE.openvz.Config',
lxc: 'PVE.lxc.Config',
storage: 'PVE.storage.Browser',
pool: 'pvePoolConfig'
};
if (selected.length > 0) {
var n = selected[0];
comp = {
comp = {
xtype: tlckup[n.data.type || 'root'] ||
'pvePanelConfig',
layout: { type: 'fit' },
......@@ -342,7 +342,7 @@ Ext.define('PVE.StdWorkspace', {
text: gettext("Create CT"),
disabled: !caps.vms['VM.Allocate'],
handler: function() {
var wiz = Ext.create('PVE.openvz.CreateWizard', {});
var wiz = Ext.create('PVE.lxc.CreateWizard', {});
wiz.show();
}
});
......
......@@ -2,7 +2,7 @@ Ext.define('PVE.button.ConsoleButton', {
extend: 'Ext.button.Split',
alias: 'widget.pveConsoleButton',
consoleType: 'shell', // one of 'shell', 'kvm', 'openvz', 'upgrade'
consoleType: 'shell', // one of 'shell', 'kvm', 'lxc', 'upgrade'
consoleName: undefined,
......
......@@ -39,7 +39,7 @@ Ext.define('PVE.data.ResourceStore', {
hidden: true,
convert: function(value, record) {
var info = record.data;
if (info.type === 'qemu' || info.type === 'openvz' || info.type === 'node') {
if (info.type === 'qemu' || info.type === 'lxc' || info.type === 'node') {
return (Ext.isNumeric(info.uptime) && (info.uptime > 0));
} else {
return false;
......@@ -65,7 +65,7 @@ Ext.define('PVE.data.ResourceStore', {
text = info.pool;
} else if (info.type === 'storage') {
text = info.storage + ' (' + info.node + ')';
} else if (info.type === 'qemu' || info.type === 'openvz') {
} else if (info.type === 'qemu' || info.type === 'lxc') {
text = String(info.vmid);
if (info.name) {
text += " (" + info.name + ')';
......
......@@ -27,6 +27,10 @@ Ext.define('PVE.grid.BackupView', {
filterFn = function(item) {
return item.data.volid.match(':backup/vzdump-openvz-');
};
} else if (vmtype === 'lxc') {
filterFn = function(item) {
return item.data.volid.match(':backup/vzdump-lxc-');
};
} else if (vmtype === 'qemu') {
filterFn = function(item) {
return item.data.volid.match(':backup/vzdump-qemu-');
......
......@@ -203,8 +203,8 @@ Ext.define('PVE.grid.ResourceGrid', {
menu = Ext.create('PVE.qemu.TemplateMenu', {
pveSelNode: record
});
} else if (record.data.type === 'openvz') {
menu = Ext.create('PVE.openvz.CmdMenu', {
} else if (record.data.type === 'lxc') {
menu = Ext.create('PVE.lxc.CmdMenu', {
pveSelNode: record
});
} else {
......
......@@ -35,8 +35,8 @@ Ext.define('PVE.panel.NotesView', {
if (vmtype === 'qemu') {
me.url = '/api2/extjs/nodes/' + nodename + '/qemu/' + vmid + '/config';
} else if (vmtype === 'openvz') {
me.url = '/api2/extjs/nodes/' + nodename + '/openvz/' + vmid + '/config';
} else if (vmtype === 'lxc') {
me.url = '/api2/extjs/nodes/' + nodename + '/lxc/' + vmid + '/config';
} else {
throw "unknown vm type '" + vmtype + "'";
}
......
......@@ -20,9 +20,9 @@ Ext.define('PVE.tree.ResourceTree', {
iconCls: 'x-tree-node-computer',
text: gettext('Virtual Machine')
},
openvz: {
lxc: {
iconCls: 'x-tree-node-openvz',
text: gettext('OpenVZ Container')
text: gettext('LXC Container')
}
}
},
......@@ -46,7 +46,7 @@ Ext.define('PVE.tree.ResourceTree', {
// numeric compare for VM IDs
// sort templates after regular VMs
if (v1 === 'qemu' || v1 === 'openvz') {
if (v1 === 'qemu' || v1 === 'lxc') {
if (n1.template && !n2.template) {
return 1;
} else if (n2.template && !n1.template) {
......@@ -340,8 +340,8 @@ Ext.define('PVE.tree.ResourceTree', {
menu = Ext.create('PVE.qemu.TemplateMenu', {
pveSelNode: record
});
} else if (record.data.type === 'openvz') {
menu = Ext.create('PVE.openvz.CmdMenu', {
} else if (record.data.type === 'lxc') {
menu = Ext.create('PVE.lxc.CmdMenu', {
pveSelNode: record
});
} else {
......@@ -393,7 +393,7 @@ Ext.define('PVE.tree.ResourceTree', {
}
},
checkVmMigration: function(record) {
if (!(record.data.type === 'qemu' || record.data.type === 'openvz')) {
if (!(record.data.type === 'qemu' || record.data.type === 'lxc')) {
throw "not a vm type";
}
......
......@@ -924,9 +924,9 @@ Ext.define('PVE.Utils', { statics: {
},
openConsoleWindow: function(viewer, vmtype, vmid, nodename, vmname) {
// kvm, openvz, shell, upgrade
// kvm, lxc, shell, upgrade
if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'openvz')) {
if (vmid == undefined && (vmtype === 'kvm' || vmtype === 'lxc')) {
throw "missing vmid";
}
......@@ -942,8 +942,8 @@ Ext.define('PVE.Utils', { statics: {
if (vmtype === 'kvm') {
url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'openvz') {
url = '/nodes/' + nodename + '/openvz/' + vmid.toString() + '/spiceproxy';
} else if (vmtype === 'lxc') {
url = '/nodes/' + nodename + '/lxc/' + vmid.toString() + '/spiceproxy';
PVE.Utils.openSpiceViewer(url, params);
} else if (vmtype === 'shell') {
url = '/nodes/' + nodename + '/spiceshell';
......@@ -970,7 +970,7 @@ Ext.define('PVE.Utils', { statics: {
openVNCViewer: function(vmtype, vmid, nodename, vmname, novnc) {
var url = Ext.urlEncode({
console: vmtype, // kvm, openvz, upgrade or shell
console: vmtype, // kvm, lxc, upgrade or shell
novnc: novnc ? 1 : 0,
vmid: vmid,
vmname: vmname,
......
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