mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 21:24:01 +00:00
add discard option to qemu drive
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
eef43bbd50
commit
fdefb2cdfd
@ -33,6 +33,12 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
delete me.drive.backup;
|
||||
}
|
||||
|
||||
if (values.discard) {
|
||||
me.drive.discard = 'on';
|
||||
} else {
|
||||
delete me.drive.discard;
|
||||
}
|
||||
|
||||
if (values.cache) {
|
||||
me.drive.cache = values.cache;
|
||||
} else {
|
||||
@ -81,6 +87,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
values.nobackup = (drive.backup === 'no');
|
||||
values.diskformat = drive.format || 'raw';
|
||||
values.cache = drive.cache || '';
|
||||
values.discard = (drive.discard === 'on');
|
||||
|
||||
me.setValues(values);
|
||||
},
|
||||
@ -213,6 +220,12 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
name: 'nobackup'
|
||||
});
|
||||
|
||||
me.column2.push({
|
||||
xtype: 'pvecheckbox',
|
||||
fieldLabel: gettext('Discard'),
|
||||
name: 'discard'
|
||||
});
|
||||
|
||||
me.callParent();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user