public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 2/4] tui: bootdisk: align btrfs dialog interface with zfs equivalent
Date: Thu, 13 Jun 2024 13:53:11 +0200	[thread overview]
Message-ID: <20240613115318.842583-3-c.heiss@proxmox.com> (raw)
In-Reply-To: <20240613115318.842583-1-c.heiss@proxmox.com>

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 proxmox-tui-installer/src/views/bootdisk.rs | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs
index 1c7b2a4..29a2854 100644
--- a/proxmox-tui-installer/src/views/bootdisk.rs
+++ b/proxmox-tui-installer/src/views/bootdisk.rs
@@ -158,7 +158,7 @@ impl AdvancedBootdiskOptionsView {
                 view.add_child(ZfsBootdiskOptionsView::new(runinfo, zfs, &product_conf))
             }
             AdvancedBootdiskOptions::Btrfs(btrfs) => {
-                view.add_child(BtrfsBootdiskOptionsView::new(&runinfo.disks, btrfs))
+                view.add_child(BtrfsBootdiskOptionsView::new(runinfo, btrfs))
             }
         };
 
@@ -210,7 +210,7 @@ impl AdvancedBootdiskOptionsView {
                         &product_conf,
                     )),
                     FsType::Btrfs(_) => {
-                        view.add_child(BtrfsBootdiskOptionsView::new_with_defaults(&runinfo.disks))
+                        view.add_child(BtrfsBootdiskOptionsView::new_with_defaults(&runinfo))
                     }
                 }
             }
@@ -520,9 +520,9 @@ struct BtrfsBootdiskOptionsView {
 }
 
 impl BtrfsBootdiskOptionsView {
-    fn new(disks: &[Disk], options: &BtrfsBootdiskOptions) -> Self {
+    fn new(runinfo: &RuntimeInfo, options: &BtrfsBootdiskOptions) -> Self {
         let view = MultiDiskOptionsView::new(
-            disks,
+            &runinfo.disks,
             &options.selected_disks,
             FormView::new().child("hdsize", DiskSizeEditView::new().content(options.disk_size)),
         )
@@ -531,8 +531,11 @@ impl BtrfsBootdiskOptionsView {
         Self { view }
     }
 
-    fn new_with_defaults(disks: &[Disk]) -> Self {
-        Self::new(disks, &BtrfsBootdiskOptions::defaults_from(disks))
+    fn new_with_defaults(runinfo: &RuntimeInfo) -> Self {
+        Self::new(
+            runinfo,
+            &BtrfsBootdiskOptions::defaults_from(&runinfo.disks),
+        )
     }
 
     fn get_values(&mut self) -> Option<(Vec<Disk>, BtrfsBootdiskOptions)> {
-- 
2.44.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2024-06-13 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 11:53 [pve-devel] [PATCH installer 0/4] tui: make disk options view tabbed on small screens Christoph Heiss
2024-06-13 11:53 ` [pve-devel] [PATCH installer 1/4] tui: fix some comment typos Christoph Heiss
2024-06-13 11:53 ` Christoph Heiss [this message]
2024-06-13 11:53 ` [pve-devel] [PATCH installer 3/4] tui: views: add new TabbedView component Christoph Heiss
2024-06-13 11:53 ` [pve-devel] [PATCH installer 4/4] tui: bootdisk: use tabbed view for disk options on small screens Christoph Heiss
2024-07-02 16:49 ` [pve-devel] [PATCH installer 0/4] tui: make disk options view tabbed " Max Carrara
2024-07-04  9:05   ` Christoph Heiss
2024-07-04  9:28 ` [pve-devel] applied-series: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240613115318.842583-3-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal