[pve-devel] [PATCH manager v2 16/17] disable discard for non-scsi disks

Dominik Csapak d.csapak at proxmox.com
Fri Jul 21 12:01:21 CEST 2017


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
added the missing 'reference' on the component
 www/manager6/qemu/HDEdit.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index aeac7dd0..db3c2e9a 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -18,6 +18,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
 	onControllerChange: function(field) {
 	    var value = field.getValue();
 	    this.lookup('iothread').setDisabled(!value.match(/^(virtio|scsi)/));
+	    this.lookup('discard').setDisabled(!value.match(/^scsi/));
 	},
 
 	control: {
@@ -197,6 +198,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
 	me.column2.push({
 	    xtype: 'pvecheckbox',
 	    fieldLabel: gettext('Discard'),
+	    reference: 'discard',
 	    name: 'discard'
 	});
 
-- 
2.11.0





More information about the pve-devel mailing list