From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C10041FF09C for ; Mon, 02 Nov 2026 13:49:56 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 75FAC21946; Mon, 02 Nov 2026 13:48:38 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Subject: [PATCH installer v4 27/30] gui: network: split advanced options dialog into tabs Date: Mon, 2 Nov 2026 13:45:33 +0100 Message-ID: <20261102124539.1008075-28-c.heiss@proxmox.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261102124539.1008075-1-c.heiss@proxmox.com> References: <20261102124539.1008075-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793623681008 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.186 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: VGZLVEPMLIU34YHT7VHBN2RJEH7DEWK4 X-Message-ID-Hash: VGZLVEPMLIU34YHT7VHBN2RJEH7DEWK4 X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: With the bond and VLAN options, the advanced network options dialog stacks three sections, and both the pinning and the bond section list every physical network interface. Servers with six or more ports, for example two each of 1G, 10G and 100G, are not unusual, which makes the dialog taller than smaller screen resolutions can show. Put each section on its own tab and limit the page height relative to the screen height, so that a page with many interfaces scrolls instead of pushing the dialog buttons off the screen. If an input is invalid, switch to the tab that contains it before showing the error, as it could otherwise be on a page that is not visible. Originally-by: Thomas Lamprecht Signed-off-by: Christoph Heiss --- Changes v3 -> v4: * no changes Changes v2 -> v3: * new patch proxinstall | 80 ++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/proxinstall b/proxinstall index 079b227..6b8c7e8 100755 --- a/proxinstall +++ b/proxinstall @@ -381,13 +381,10 @@ my $create_label_widget_grid = sub { return $grid; }; -my sub create_network_interface_pin_frame { +my sub create_network_interface_pin_page { my ($on_enable_changed) = @_; - my $frame = Gtk3::Frame->new('Interface Name Pinning'); - my $vbox = Gtk3::Box->new('vertical', 5); - $frame->add($vbox); $vbox->set_margin_start(10); $vbox->set_margin_end(10); $vbox->set_margin_top(5); @@ -468,14 +465,11 @@ my sub create_network_interface_pin_frame { Proxmox::Install::Config::set_network_interface_pin_map(\%new_mapping); }; - return ($frame, $on_done); + return ($vbox, $on_done); } -my sub create_network_bond_frame { - my $frame = Gtk3::Frame->new('Management Bond'); - +my sub create_network_bond_page { my $vbox = Gtk3::Box->new('vertical', 5); - $frame->add($vbox); $vbox->set_margin_start(10); $vbox->set_margin_end(10); $vbox->set_margin_top(5); @@ -483,7 +477,7 @@ my sub create_network_bond_frame { my $enable_checkbox = Gtk3::CheckButton->new('Enable bonding for management interface'); $enable_checkbox->set_active($gtk_state->{network_bonding_enabled}); - $vbox->pack_start($enable_checkbox, 1, 0, 5); + $vbox->pack_start($enable_checkbox, 0, 0, 5); my $bond_opts = Proxmox::Install::Config::get_mngmt_bond_opt(); my $interfaces = Proxmox::Install::RunEnv::get()->{network}->{interfaces}; @@ -639,14 +633,11 @@ my sub create_network_bond_frame { Proxmox::Install::Config::set_mngmt_bond_opt('primary_interface', $primary_mac); }; - return ($frame, $refresh_if_names, $on_done); + return ($vbox, $refresh_if_names, $on_done); } -my sub create_network_vlan_frame { - my $frame = Gtk3::Frame->new('Management VLAN'); - +my sub create_network_vlan_page { my $vbox = Gtk3::Box->new('vertical', 5); - $frame->add($vbox); $vbox->set_margin_start(10); $vbox->set_margin_end(10); $vbox->set_margin_top(5); @@ -654,7 +645,7 @@ my sub create_network_vlan_frame { my $enable_checkbox = Gtk3::CheckButton->new('Enable VLAN setup on management interface'); $enable_checkbox->set_active($gtk_state->{network_vlan_enabled}); - $vbox->pack_start($enable_checkbox, 1, 0, 5); + $vbox->pack_start($enable_checkbox, 0, 0, 5); my $vlan_opts = Proxmox::Install::Config::get_mngmt_vlan_opt(); @@ -697,7 +688,7 @@ my sub create_network_vlan_frame { Proxmox::Install::Config::set_mngmt_vlan_opt('enabled', 1); }; - return ($frame, $on_done); + return ($vbox, $on_done); } my sub create_network_advanced_options_view { @@ -709,37 +700,46 @@ my sub create_network_advanced_options_view { my $content = $dialog->get_content_area(); - my $scrolled_window = Gtk3::ScrolledWindow->new(); - $scrolled_window->set_hexpand(1); - $scrolled_window->set_vexpand(1); - $scrolled_window->set_propagate_natural_height(1); - $scrolled_window->set_policy('never', 'automatic'); - $scrolled_window->set_min_content_height(200); + my ($bond_page, $bond_refresh, $bond_on_done) = create_network_bond_page(); + my ($pin_page, $pin_on_done) = create_network_interface_pin_page($bond_refresh); + my ($vlan_page, $vlan_on_done) = create_network_vlan_page(); - my $hbox = Gtk3::Box->new('vertical', 0); + # leave room for the title, tabs and buttons, so the dialog also fits smaller screens + my $max_page_height = Gtk3::Gdk::Screen::get_default()->get_height() - 250; + $max_page_height = 200 if $max_page_height < 200; - my ($bond_frame, $bond_refresh, $bond_on_done) = create_network_bond_frame(); - my ($pin_frame, $pin_on_done) = create_network_interface_pin_frame($bond_refresh); - my ($vlan_frame, $vlan_on_done) = create_network_vlan_frame(); + my $notebook = Gtk3::Notebook->new(); + my @pages = ( + ['Interface Name Pinning', $pin_page, $pin_on_done], + ['Management Bond', $bond_page, $bond_on_done], + ['Management VLAN', $vlan_page, $vlan_on_done], + ); + for my $page (@pages) { + my ($title, $widget) = $page->@*; - $hbox->pack_start($pin_frame, 0, 0, 10); - $hbox->pack_start($bond_frame, 0, 0, 10); - $hbox->pack_start($vlan_frame, 0, 0, 10); + my $scrolled_window = Gtk3::ScrolledWindow->new(); + $scrolled_window->set_hexpand(1); + $scrolled_window->set_vexpand(1); + $scrolled_window->set_propagate_natural_height(1); + $scrolled_window->set_policy('never', 'automatic'); + $scrolled_window->set_min_content_height(200); + $scrolled_window->set_max_content_height($max_page_height); + $scrolled_window->add($widget); - $scrolled_window->add($hbox); - $content->pack_start($scrolled_window, 1, 1, 10); + $notebook->append_page($scrolled_window, Gtk3::Label->new($title)); + } + $content->pack_start($notebook, 1, 1, 10); my $inputs = {}; $dialog->signal_connect( response => sub { - eval { - $pin_on_done->(); - $bond_on_done->(); - $vlan_on_done->(); - }; - if ($@) { - Proxmox::UI::message($@, $dialog); - return; + for my $i (0 .. $#pages) { + eval { $pages[$i]->[2]->() }; + if (my $err = $@) { + $notebook->set_current_page($i); + Proxmox::UI::message($err, $dialog); + return; + } } $dialog->destroy(); -- 2.55.0