diff --git a/pkg/storaged/stratis/pool.jsx b/pkg/storaged/stratis/pool.jsx index e9a77a86bac1..c678270fd690 100644 --- a/pkg/storaged/stratis/pool.jsx +++ b/pkg/storaged/stratis/pool.jsx @@ -92,28 +92,35 @@ function create_fs(pool) { { validate: name => validate_fs_name(null, name, filesystems) }), - CheckBoxes("size_options", _("Manage virtual size"), + CheckBoxes("set_custom_size", _("Stratis filesystem"), { value: { - custom_size: !pool.Overprovisioning, - custom_limit: false, + enabled: !pool.Overprovisioning, }, fields: [ - { tag: "custom_size", title: _("Specify initial virtual filesystem size") }, - { tag: "custom_limit", title: _("Limit virtual filesystem size") }, + { tag: "enabled", title: _("Set initial size") }, ] }), - SizeSlider("size", _("Initial virtual size"), + SizeSlider("size", "", { - visible: vals => vals.size_options.custom_size, + visible: vals => vals.set_custom_size.enabled, min: fsys_min_size, max: pool.Overprovisioning ? stats.pool_total : stats.pool_free, allow_infinite: pool.Overprovisioning, round: 512 }), - SizeSlider("limit", _("Virtual size limit"), + CheckBoxes("set_custom_limit", "", { - visible: vals => vals.size_options.custom_limit, + value: { + enabled: false, + }, + fields: [ + { tag: "enabled", title: _("Limit size") }, + ] + }), + SizeSlider("limit", "", + { + visible: vals => vals.set_custom_limit.enabled, min: fsys_min_size, max: pool.Overprovisioning ? stats.pool_total : stats.pool_free, allow_infinite: true, @@ -136,9 +143,9 @@ function create_fs(pool) { Variants: action_variants, action: async function (vals) { let size_spec = [false, ""]; let limit_spec = [false, ""]; - if (vals.size_options.custom_size) + if (vals.set_custom_size.enabled) size_spec = [true, vals.size.toString()]; - if (vals.size_options.custom_limit) + if (vals.set_custom_limit.enabled) limit_spec = [true, vals.limit.toString()]; const result = await pool.CreateFilesystems([[vals.name, size_spec, limit_spec]]).then(std_reply); if (result[0]) diff --git a/test/verify/check-storage-stratis b/test/verify/check-storage-stratis index 7bb5681bdfee..34ed72ce39f0 100755 --- a/test/verify/check-storage-stratis +++ b/test/verify/check-storage-stratis @@ -432,7 +432,7 @@ systemctl restart stratisd b.click(self.card_button("Stratis filesystems", "Create new filesystem")) self.dialog_wait_open() - self.dialog_wait_val('size_options.custom_size', val=True) + self.dialog_wait_val('set_custom_size.enabled', val=True) self.dialog_set_val('name', 'fsys1') self.dialog_apply_secondary() self.dialog_wait_close() @@ -463,7 +463,7 @@ systemctl restart stratisd b.click(self.card_button("Stratis filesystems", "Create new filesystem")) self.dialog_wait_open() - self.dialog_wait_val('size_options.custom_size', val=False) + self.dialog_wait_val('set_custom_size.enabled', val=False) self.dialog_cancel() self.dialog_wait_close() @@ -501,9 +501,9 @@ systemctl restart stratisd b.click(self.card_button("Stratis filesystems", "Create new filesystem")) self.dialog_wait_open() self.dialog_set_val('name', 'fsys1') - self.dialog_set_val('size_options.custom_size', val=True) + self.dialog_set_val('set_custom_size.enabled', val=True) self.dialog_set_val('size', 800) - self.dialog_set_val('size_options.custom_limit', val=True) + self.dialog_set_val('set_custom_limit.enabled', val=True) self.dialog_set_val('limit', 1600) self.dialog_apply_secondary() self.dialog_wait_close()