If lots of disks are present and the available screen size is rather
small, it might be impossible for users to properly set all disks as
they want.
Fix it by making the view scrollable.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
previously the tui used `u64` internally to represent the disk size.
since the perl-based installer expects GiB as floats and that is also
what is displayed in the tui that meant a lot of converting back and
forth. it also lead to an error where the disk sizes that were set
seemed to not have been persisted, even though the sizes were
correctly set. this commit refactors the installer to convert the size
once in the beginning and then stick to `f64`.
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
Perl definitively acts very different with the while variant, it
seems it keeps the file handle open and reuses it in future calls,
even if the directory base of the glob is different
This reverts commit 90fb3d7615.
the for/foreach ones read everything in to build a list and then
iterate that, the while one is lazy and needs less memory.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
When the prompt abstraction got added in bc05a8f ("add basic UI
plugin infrastructure") it also inlined the check for the answer, as
that can be differently structured for each user interface, and
returns bool. But when switching over to this new infra, two sites
weren't updated to the simpler bool check and still checked with the
previous "equals 'ok'", which now was always false.
Fixes: 72bea99 ("switch prompt, error and message calls to new UI infra")
Reported-by: Alexander Zeidler <a.zeidler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
it's just safer to make the user look at the summary and avoid that a
stray enter hits of the installation.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
except the password dialog, since the user must provide input
to do that, we have to set the focus index on all relevant views
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
After eaa7d41 - which directs all stderr from the TUI to tty2 - this can
be safely done without interrupting the TUI.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Since we already handly non-present domain names, invalid names can be
handled the same way, as not to completely fail the installation.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
While this might look at it should it terminal emulators, in a raw tty
this can have different effects; e.g. being a bright blue/green and
nearly unreadable. For now, just remove the effect completely, the
semantics are still very much clear.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Otherwise, if anything is printed there, black bars appear at the
current cursor position in the TUI until after a refresh.
Also aligns it more closely. Might also be useful in the future for the
TUI to log some things.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Note that unlike the rest of the file, we connect to the response signal
instead of using Gtk3::Dialog->run, the reason is that run blocks the
main loop used by GTK and this undesirable to the point where
Gtk3::Dialog->run was removed for GTK 4.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Since we already handly non-present domain names, invalid names can be
handled the same way, as not to completely fail the installation.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Otherwise, the user would be blocked from continuing the the installer,
instead just being presented with an error.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
This definitively worked without that value when the functionality
was first added in dfc02f3 ("fix #3093: allow to automatically reboot
on installation success"), so possibly something new with the glib,
gtk, or the perl bindings in bookworm..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Similar to our actual battle proven get_ip_config, but as the TUI
uses this one, and switching to it rather more risk, make just
addresses optional, add skip for "lo" loopback and don't skip ifaces
that aren't UP in the current helper.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
with this you can type without removing the decimal places, but if
you type inside the decimal places it'll just move the cursor to the
end and do nothing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
e.g., due to having no network (no DHCP lease)
Reported-by: Christian Ebner <c.ebner@proxmox.com>
Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>