Commit 9accd5cf authored by Dietmar Maurer's avatar Dietmar Maurer

do not show monitor and console for templates

parent 1c487ce3
...@@ -14,6 +14,8 @@ Ext.define('PVE.qemu.Config', { ...@@ -14,6 +14,8 @@ Ext.define('PVE.qemu.Config', {
if (!vmid) { if (!vmid) {
throw "no VM ID specified"; throw "no VM ID specified";
} }
var template = me.pveSelNode.data.template;
var caps = Ext.state.Manager.get('GuiCap'); var caps = Ext.state.Manager.get('GuiCap');
...@@ -153,7 +155,7 @@ Ext.define('PVE.qemu.Config', { ...@@ -153,7 +155,7 @@ Ext.define('PVE.qemu.Config', {
] ]
}); });
if (caps.vms['VM.Monitor']) { if (caps.vms['VM.Monitor'] && !template) {
me.items.push({ me.items.push({
title: gettext('Monitor'), title: gettext('Monitor'),
itemId: 'monitor', itemId: 'monitor',
...@@ -177,7 +179,7 @@ Ext.define('PVE.qemu.Config', { ...@@ -177,7 +179,7 @@ Ext.define('PVE.qemu.Config', {
}); });
} }
if (caps.vms['VM.Console']) { if (caps.vms['VM.Console'] && !template) {
me.items.push({ me.items.push({
title: gettext('Console'), title: gettext('Console'),
itemId: 'console', itemId: 'console',
...@@ -215,7 +217,6 @@ Ext.define('PVE.qemu.Config', { ...@@ -215,7 +217,6 @@ Ext.define('PVE.qemu.Config', {
me.statusStore.on('load', function(s, records, success) { me.statusStore.on('load', function(s, records, success) {
var status; var status;
var qmpstatus; var qmpstatus;
var template;
var spice = false; var spice = false;
if (!success) { if (!success) {
......
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