[pve-devel] [PATCH manager 1/5] ext6migrate: Qemu Bios Selector fixes

Dominik Csapak d.csapak at proxmox.com
Mon Mar 21 10:53:09 CET 2016


add render function for Qemu Bios,
and change data to comboItems and '' to '__default__'

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/Utils.js                 | 12 ++++++++++++
 www/manager6/form/QemuBiosSelector.js |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 131f367..bb755b2 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -146,6 +146,18 @@ Ext.define('PVE.Utils', { statics: {
 	    PVE.Utils.unknownText;
     },
 
+    render_qemu_bios: function(value) {
+	if (!value) {
+	    return PVE.Utils.defaultText + ' (SeaBIOS)';
+	} else if (value === 'seabios') {
+	    return "SeaBIOS";
+	} else if (value === 'ovmf') {
+	    return "OVMF (UEFI)";
+	} else {
+	    return value;
+	}
+    },
+
     render_scsihw: function(value) {
 	if (!value) {
 	    return PVE.Utils.defaultText + ' (LSI 53C895A)';
diff --git a/www/manager6/form/QemuBiosSelector.js b/www/manager6/form/QemuBiosSelector.js
index 5fda02e..faa70e5 100644
--- a/www/manager6/form/QemuBiosSelector.js
+++ b/www/manager6/form/QemuBiosSelector.js
@@ -5,8 +5,8 @@ Ext.define('PVE.form.QemuBiosSelector', {
     initComponent: function() {
 	var me = this;
 
-        me.data = [
-	    ['', PVE.Utils.render_qemu_bios('')],
+        me.comboItems = [
+	    ['__default__', PVE.Utils.render_qemu_bios('')],
 	    ['seabios', PVE.Utils.render_qemu_bios('seabios')],
 	    ['ovmf', PVE.Utils.render_qemu_bios('ovmf')]
 	];
-- 
2.1.4





More information about the pve-devel mailing list