Commit Graph

979 Commits

Author SHA1 Message Date
Thomas Lamprecht
41f03d9036 tui: add some info to uknown UI messages
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 15:18:40 +02:00
Christoph Heiss
49d2f85044 tui: disable automatic text wrapping for form labels
This just causes weird layouts; such that labels and inputs do not line
up anymore.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-22 14:36:28 +02:00
Christoph Heiss
45082a3c1c tui: wrap multi-disk selection in scrollable view
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>
2023-06-22 14:36:28 +02:00
Stefan Sterz
f28043332a tui: switch to f64 for disk sizes
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>
2023-06-22 14:34:24 +02:00
Thomas Lamprecht
f61593857b bump version to 8.0.8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 10:48:18 +02:00
Thomas Lamprecht
59096f791f Revert "critic: lazily read directories via <> glob"
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.
2023-06-22 10:45:59 +02:00
Thomas Lamprecht
4d942895df bump version to 8.0.7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:39:23 +02:00
Thomas Lamprecht
87782341ac critic: drop useless return undefined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:38:05 +02:00
Thomas Lamprecht
90fb3d7615 critic: lazily read directories via <> glob
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>
2023-06-22 07:37:25 +02:00
Thomas Lamprecht
7d53c80701 critic: avoid $a, $b special package variables
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:35:56 +02:00
Thomas Lamprecht
ed68d1244d fix checking the now boolean prompt response
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>
2023-06-22 07:21:19 +02:00
Thomas Lamprecht
cb879145c3 bump version to 8.0.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 18:42:34 +02:00
Thomas Lamprecht
fcb51d7391 tui: avoid actively focusing start-install button on summary
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>
2023-06-21 18:39:30 +02:00
Dominik Csapak
1d8fcd721a tui: focus next button by default
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>
2023-06-21 18:28:24 +02:00
Stefan Hanreich
99a7fcf1fe tui: improve ipv6 handling
* fix detection of ipv6 addresses
* change input for CIDR to allow integers up until 128

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-06-21 17:35:21 +02:00
Thomas Lamprecht
a467ec47b8 add some more logging, especially at start up
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:56:35 +02:00
Thomas Lamprecht
dc6c1a80cc log: record when and that the log got initialized
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:39:36 +02:00
Thomas Lamprecht
63fb95ea37 buildsys: dump environment in all test cases
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:38:49 +02:00
Thomas Lamprecht
e1b7469635 run env: re-used cached version to speed up GUI installer start
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:33:16 +02:00
Thomas Lamprecht
11fd703fe3 move location of runtome env file into ISO env
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:32:12 +02:00
Thomas Lamprecht
97e1524df3 fix duplicate deserialize_invalid_value_as_none
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 15:16:22 +02:00
Dominik Csapak
298a4de044 tui: verify email with basic regex
regex copied from perl gui installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: add missing librust-regex-1+default-dev B-D ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 15:14:15 +02:00
Dominik Csapak
d09fe568b9 tui: always use mail@example.invalid as default email address
like the gui installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-21 15:11:32 +02:00
Christoph Heiss
0fd882c301 tui: forward stray messages from low-level installer to stderr
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>
2023-06-21 15:09:19 +02:00
Christoph Heiss
638479b904 tui: implement auto-reboot after installation
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 15:09:11 +02:00
Christoph Heiss
73574fee14 tui: do not fail completely on invalid domain names
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>
2023-06-21 15:09:06 +02:00
Wolfgang Bumiller
3fbd1dc9da tui: fix ability to type commas
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-21 15:07:39 +02:00
Christoph Heiss
859e3478a8 tui: clamp max LVM disk size to size of selected disk
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 14:25:07 +02:00
Christoph Heiss
cdba54ce86 tui: remove underline-effect from advanced disk setup titles
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>
2023-06-21 14:25:06 +02:00
Thomas Lamprecht
bd6a342405 bump version to 8.0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 13:46:36 +02:00
Christoph Heiss
7111932dcc tui: implement auto-reboot after installation
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 13:17:46 +02:00
Christoph Heiss
f81ba3edf2 tui: rename reboot option to autoreboot, to better align with GUI
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 13:17:46 +02:00
Christoph Heiss
ac5522a1b4 low level: simulate reboot in test session
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 13:17:46 +02:00
Christoph Heiss
e730b3fee4 tui: use non-slanted logo
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 13:17:45 +02:00
Christoph Heiss
6569493827 unconfigured: redirect TUI stderr output to tty2
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>
2023-06-21 13:15:19 +02:00
Christoph Heiss
347014eec9 UI: fix perl warning if no progress text is passed
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 13:15:19 +02:00
Christoph Heiss
a84f277b00 tui: make reboot-after-install checkbox default to enabled
Aligns it with the GUI installer.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 12:52:43 +02:00
Maximiliano Sandoval
85249554b9 gui: make abort button unsensitive on last panel
It makes no sense from a UX point of view to abort an install that's
already finished.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-21 12:49:29 +02:00
Christoph Heiss
d2b13ba7a1 tui: use correct index when retrieving DNS server address from view
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 12:34:51 +02:00
Maximiliano Sandoval
df19222d0b fix #4643: show a confirmation dialog when clicking abort
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>
2023-06-21 12:29:02 +02:00
Christoph Heiss
93f4fdfa2c tui: refresh summary view if it is switched back to
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 12:20:41 +02:00
Christoph Heiss
082f3a703d tui: make HVM extension not being present a non-fatal warning
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 12:20:41 +02:00
Christoph Heiss
f1df0957fa tui: assume that the installer is run from the repo root in debug mode
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 12:20:41 +02:00
Christoph Heiss
f0751a962f tui: do not fail completely on invalid domain names
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>
2023-06-21 12:20:41 +02:00
Christoph Heiss
a5eeb44377 tui: allow one-part FQDNs/domains
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>
2023-06-21 12:20:41 +02:00
Thomas Lamprecht
78a02c1176 gtk: return truthy for rescheduling the timer for autoreboot
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>
2023-06-21 12:10:09 +02:00
Thomas Lamprecht
5ea718f66d run env: make addresses optional, include all interfaces
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>
2023-06-21 11:54:41 +02:00
Wolfgang Bumiller
e12667524d tui: slight FloatEditView improvement
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>
2023-06-21 11:23:11 +02:00
Thomas Lamprecht
55c2fb999b config: avoid warning if no country was detected
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>
2023-06-21 10:45:31 +02:00
Thomas Lamprecht
e90bb4efa2 config: fix missing include of Log module
Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 10:44:40 +02:00