]> git.proxmox.com Git - pve-manager.git/commitdiff
lxc GUI: add tty and console options
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 20 Aug 2015 08:59:18 +0000 (10:59 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 20 Aug 2015 08:59:18 +0000 (10:59 +0200)
www/manager/lxc/Options.js

index 56b62920f765fd48c009b560405e0903200fab3d..638b8cd55be83447cbb33f033a965616a49feab8 100644 (file)
@@ -55,6 +55,52 @@ Ext.define('PVE.lxc.Options', {
                header: gettext('Root Disk'),
                defaultValue: 'no set'
            },
+           console: {
+               header: gettext('Enable /dev/console'),
+               defaultValue: 1,
+               renderer: PVE.Utils.format_boolean,
+               editor: caps.vms['VM.Config.Options'] ? {
+                   xtype: 'pveWindowEdit',
+                   subject: gettext('Enable /dev/console'),
+                   items: {
+                       xtype: 'pvecheckbox',
+                       name: 'console',
+                       uncheckedValue: 0,
+                       defaultValue: 1,
+                       deleteDefaultValue: true,
+                       checked: true,
+                       fieldLabel: gettext('Enable /dev/console')
+                   }
+               } : undefined
+           },
+           tty: {
+               header: gettext('TTY count'),
+               defaultValue: 2,
+               editor: caps.vms['VM.Config.Options'] ? {
+                   xtype: 'pveWindowEdit',
+                   subject: gettext('TTY count'),
+                   items: {
+                       xtype: 'numberfield',
+                       name: 'tty',
+                       decimalPrecision: 0,
+                       minValue: 0,
+                       maxValue: 6,
+                       value: 2,
+                       fieldLabel: gettext('TTY count'),
+                       allowEmpty: gettext('Default'),
+                       getSubmitData: function() {
+                           var me = this;
+                           var val = me.getSubmitValue();
+                           if (val !== null && val !== '' && val !== '2') {
+                               return { tty: val };
+                           } else {
+                               return { 'delete' : 'tty' };
+                           }
+                       }
+
+                   }
+               } : undefined
+           },
            cmode: {
                header: gettext('Console mode'),
                defaultValue: 'tty',