mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 23:36:58 +00:00
ui: qemu: disk edit: expose read-only flag as advanced option
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3f543d7ff7
commit
e4d8437819
@ -90,6 +90,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
PVE.Utils.propertyStringSet(me.drive, values.discard, 'discard', 'on');
|
||||
PVE.Utils.propertyStringSet(me.drive, values.ssd, 'ssd', 'on');
|
||||
PVE.Utils.propertyStringSet(me.drive, values.iothread, 'iothread', 'on');
|
||||
PVE.Utils.propertyStringSet(me.drive, values.readOnly, 'ro', 'on');
|
||||
PVE.Utils.propertyStringSet(me.drive, values.cache, 'cache');
|
||||
|
||||
var names = ['mbps_rd', 'mbps_wr', 'iops_rd', 'iops_wr'];
|
||||
@ -151,6 +152,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
values.discard = drive.discard === 'on';
|
||||
values.ssd = PVE.Parser.parseBoolean(drive.ssd);
|
||||
values.iothread = PVE.Parser.parseBoolean(drive.iothread);
|
||||
values.readOnly = PVE.Parser.parseBoolean(drive.ro);
|
||||
|
||||
values.mbps_rd = drive.mbps_rd;
|
||||
values.mbps_wr = drive.mbps_wr;
|
||||
@ -274,6 +276,17 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
disabled: '{!isVirtIO && !isSCSI}',
|
||||
},
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
name: 'readOnly', // `ro` in the config, we map in get/set values
|
||||
defaultValue: 0,
|
||||
fieldLabel: gettext('Read-only'),
|
||||
labelWidth: labelWidth,
|
||||
clearOnDisable: true,
|
||||
bind: {
|
||||
disabled: '{!isVirtIO && !isSCSI}',
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
advancedColumn2.push(
|
||||
|
Loading…
Reference in New Issue
Block a user