Commit 05b98f42 authored by Dietmar Maurer's avatar Dietmar Maurer

improve rate limit GUI

parent 0fe6353e
...@@ -102,10 +102,10 @@ Ext.define('PVE.qemu.HDInputPanel', { ...@@ -102,10 +102,10 @@ Ext.define('PVE.qemu.HDInputPanel', {
values.nobackup = (drive.backup === 'no'); values.nobackup = (drive.backup === 'no');
values.diskformat = drive.format || 'raw'; values.diskformat = drive.format || 'raw';
values.cache = drive.cache || ''; values.cache = drive.cache || '';
values.bps_rd = drive.bps_rd || 0; values.bps_rd = drive.bps_rd;
values.bps_wr = drive.bps_wr || 0; values.bps_wr = drive.bps_wr;
values.iops_rd = drive.iops_rd || 0; values.iops_rd = drive.iops_rd;
values.iops_wr = drive.iops_wr || 0; values.iops_wr = drive.iops_wr;
me.setValues(values); me.setValues(values);
}, },
...@@ -210,18 +210,19 @@ Ext.define('PVE.qemu.HDInputPanel', { ...@@ -210,18 +210,19 @@ Ext.define('PVE.qemu.HDInputPanel', {
me.column1.push(me.hdstoragesel); me.column1.push(me.hdstoragesel);
me.column1.push(me.hdfilesel); me.column1.push(me.hdfilesel);
me.column1.push(me.hdsizesel); me.column1.push(me.hdsizesel);
me.column2.push(me.formatsel); me.column1.push(me.formatsel);
} else { } else {
me.column1.push({ me.column1.push({
xtype: 'displayfield', xtype: 'textfield',
disabled: true,
submitValue: false,
fieldLabel: gettext('Disk image'), fieldLabel: gettext('Disk image'),
labelWidth: 50,
name: 'hdimage' name: 'hdimage'
}); });
} }
me.column2.push({ me.column1.push({
xtype: 'CacheTypeSelector', xtype: 'CacheTypeSelector',
name: 'cache', name: 'cache',
value: '', value: '',
...@@ -229,44 +230,52 @@ Ext.define('PVE.qemu.HDInputPanel', { ...@@ -229,44 +230,52 @@ Ext.define('PVE.qemu.HDInputPanel', {
}); });
if (!me.insideWizard) { if (!me.insideWizard) {
me.column2.push({ me.column1.push({
xtype: 'pvecheckbox', xtype: 'pvecheckbox',
fieldLabel: gettext('No backup'), fieldLabel: gettext('No backup'),
name: 'nobackup' name: 'nobackup'
}); });
} }
var width2 = 120;
me.bps_rd = Ext.widget('numberfield', { me.bps_rd = Ext.widget('numberfield', {
name: 'bps_rd', name: 'bps_rd',
minValue: 0, minValue: 1000,
value: '0', step: 1000,
fieldLabel: gettext('Read IO (byte/s)'), fieldLabel: gettext('Read limit') + ' (bytes/s)',
allowBlank: false labelWidth: width2,
emptyText: gettext('unlimited')
}); });
me.column2.push(me.bps_rd); me.column2.push(me.bps_rd);
me.bps_wr = Ext.widget('numberfield', { me.bps_wr = Ext.widget('numberfield', {
name: 'bps_wr', name: 'bps_wr',
minValue: 0, minValue: 1000,
value: '0', step: 1000,
fieldLabel: gettext('Write IO (byte/s)'), fieldLabel: gettext('Write limit') + ' (bytes/s)',
allowBlank: false labelWidth: width2,
emptyText: gettext('unlimited')
}); });
me.column2.push(me.bps_wr); me.column2.push(me.bps_wr);
me.iops_rd = Ext.widget('numberfield', { me.iops_rd = Ext.widget('numberfield', {
name: 'iops_rd', name: 'iops_rd',
minValue: 0, minValue: 1000,
value: '0', step: 1000,
fieldLabel: gettext('Read IO (ops/s)'), fieldLabel: gettext('Read limit') + ' (ops/s)',
allowBlank: false labelWidth: width2,
emptyText: gettext('unlimited')
}); });
me.column2.push(me.iops_rd); me.column2.push(me.iops_rd);
me.iops_wr = Ext.widget('numberfield', { me.iops_wr = Ext.widget('numberfield', {
name: 'iops_wr', name: 'iops_wr',
minValue: 0, minValue: 1000,
value: '0', step: 1000,
fieldLabel: gettext('Write IO (ops/s)'), fieldLabel: gettext('Write limit') + ' (ops/s)',
allowBlank: false labelWidth: width2,
emptyText: gettext('unlimited')
}); });
me.column2.push(me.iops_wr); me.column2.push(me.iops_wr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment