[pve-devel] [pve-manager 3/4] USe PVE.qemu.OSDefaults statics to get defaults for NIC and Storage Controller

Emmanuel Kasper e.kasper at proxmox.com
Wed Jul 6 10:32:09 CEST 2016


---
 www/manager6/form/ControllerSelector.js | 2 +-
 www/manager6/qemu/NetworkEdit.js        | 2 +-
 www/manager6/qemu/OSDefaults.js         | 8 ++++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index 86e620e..9af3367 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -67,7 +67,7 @@ Ext.define('PVE.form.ControllerSelector', {
 		{
 		    xtype: 'pveBusSelector',
 		    name: 'controller',
-		    value: 'ide',
+		    value: PVE.qemu.OSDefaults.busType,
 		    noVirtIO: me.noVirtIO,
 		    noScsi: me.noScsi,
 		    allowBlank: false,
diff --git a/www/manager6/qemu/NetworkEdit.js b/www/manager6/qemu/NetworkEdit.js
index 8a4945d..0887356 100644
--- a/www/manager6/qemu/NetworkEdit.js
+++ b/www/manager6/qemu/NetworkEdit.js
@@ -127,7 +127,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
 		xtype: 'pveNetworkCardSelector',
 		name: 'model',
 		fieldLabel: gettext('Model'),
-		value: 'e1000',
+		value: 'PVE.qemu.OSDefaults.networkCard,',
 		allowBlank: false
 	    },
 	    {
diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js
index c213137..a76c6c9 100644
--- a/www/manager6/qemu/OSDefaults.js
+++ b/www/manager6/qemu/OSDefaults.js
@@ -18,4 +18,12 @@ Ext.define('PVE.qemu.l26Defaults', {
 	busType: 'virtio',
 	networkCard: 'virtio'
     }
+});
+
+// http://wiki.qemu.org/Windows2000
+Ext.define('PVE.qemu.w2kDefaults', {
+    extend: 'PVE.qemu.OSDefaults',
+    statics: {
+	networkCard: 'rtl8139'
+    }
 });
\ No newline at end of file
-- 
2.1.4





More information about the pve-devel mailing list