]> git.proxmox.com Git - pve-manager.git/commitdiff
do not show monitor and console for templates
authorDietmar Maurer <dietmar@proxmox.com>
Sun, 28 Jun 2015 07:18:48 +0000 (09:18 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sun, 28 Jun 2015 07:18:48 +0000 (09:18 +0200)
www/manager/qemu/Config.js

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