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

allow to use serial terminal as display

parent 6dc3c5c5
......@@ -187,7 +187,11 @@ Ext.define('PVE.Utils', { statics: {
std: 'Standard VGA',
vmware: 'VMWare compatible',
cirrus: 'Cirrus Logic GD5446',
qxl: 'SPICE'
qxl: 'SPICE',
serial0: 'Serial terminal 0',
serial1: 'Serial terminal 1',
serial2: 'Serial terminal 2',
serial3: 'Serial terminal 3'
},
render_kvm_language: function (value) {
......
Ext.define('PVE.qemu.DisplayEdit', {
extend: 'PVE.window.Edit',
vmconfig: undefined,
initComponent : function() {
var me = this;
var displayField;
var validateDisplay = function() {
var val = displayField.getValue();
if (me.vmconfig && val.match(/^serial\d+$/)) {
if (me.vmconfig[val] && me.vmconfig[val] === 'socket') {
return true;
}
return "Serial interface '" + val + "' is not correctly configured.";
}
return true;
};
displayField = Ext.createWidget('DisplaySelector', {
name: 'vga',
value: '',
fieldLabel: gettext('Graphic card'),
validator: validateDisplay
});
Ext.apply(me, {
subject: gettext('Display'),
width: 350,
items: {
xtype: 'DisplaySelector',
name: 'vga',
value: '',
fieldLabel: gettext('Graphic card')
}
items: displayField
});
me.callParent();
me.load();
me.load({
success: function(response, options) {
var values = response.result.data;
me.vmconfig = values;
me.setValues(values);
}
});
}
});
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