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'];
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;
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(