Commit Graph

1052 Commits

Author SHA1 Message Date
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
Christoph Heiss
c6f81714a1 tui: only focus summary table if it can be scrolled
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 10:35:13 +02:00
Christoph Heiss
79ae84dea9 tui: set detected keyboard layout at installer launch
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 10:26:07 +02:00
Christoph Heiss
00268c0cb8 tui: make auto-deteced routes optional
If, for some reason, the network is not properly configured (due to
e.g. no DHCP server being present on the network), there will be no
routes in the runtime environment as well. So do not depend on that,
otherwise the installer fails at the start.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:31:50 +02:00
Christoph Heiss
cc82d42e8d tui: skip serializing empty fields for install config
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:22:56 +02:00
Christoph Heiss
409fc0fdb0 tui: make disk swap-, max-root-, max-data- and min-lvm-free-size optional
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:21:53 +02:00
Christoph Heiss
7cfaf5608e tui: allow numeric & disk size edit views to be empty
Bit of a retro-fit I guess, could maybe get improved in the future.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:20:59 +02:00
Christoph Heiss
4a8f0a1c50 tui: run rustfmt
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:42:59 +02:00
Christoph Heiss
5ab640a142 low level: fix test-session progress
In a8fbe0ff, the protocol was changed; such that the TUI now multiplies
the value by 100. Thus divide it here by 100 before sending it off.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:37:13 +02:00
Christoph Heiss
c070637464 tui: simplify test-mode evaluation
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:30:02 +02:00
Christoph Heiss
1936156eee tui: drop unneeded parameter from InstallerBackgroundView::new()
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:09:29 +02:00
Christoph Heiss
0cdcf336a2 tui: drop useless gitattributes file
Since the cargo lockfile was removed from the repo in 74e3a21, this
became useless.

Fixes: 74e3a21 ("tui: remove cargo lockfile")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 07:52:34 +02:00
Christoph Heiss
5e6eca8489 gitignore: merge TUI .gitignore into top-level
Since the TUI was put into a top-level workspace, the `target` folder
and lockfile exist too on that level.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 07:50:13 +02:00
Thomas Lamprecht
1de369c519 bump version to 8.0.4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 22:03:01 +02:00
Thomas Lamprecht
62824106e5 proxinstall: re-add Encode module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 22:02:13 +02:00
Thomas Lamprecht
7e85b1e5b3 bump version to 8.0.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:37:12 +02:00
Thomas Lamprecht
1d594e1d2f tui: avoid using domain as FQDN, hard-code product as workaround
Using the product is actually fine, but we should derive it from the
ISO env, not hard-coding "pve", but for now ok enough.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:36:23 +02:00
Thomas Lamprecht
b7ad1ad4c2 gtk: fix initial default for FQDN
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:25:07 +02:00
Thomas Lamprecht
e3e27c9cbb low level: drop extra exit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:08:58 +02:00
Thomas Lamprecht
beb25c36a6 tui: fix passing disk selection, use index
Currently the installer depends on the index to derive the selected
disks, so use that instead of a wishing-how-it-could-be approach.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:07:04 +02:00
Thomas Lamprecht
e4a899304d install: fix passing missing root volume name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:03:16 +02:00
Thomas Lamprecht
a8fbe0ff55 add Finished UI² message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:02:53 +02:00
Thomas Lamprecht
f9edca42a7 install module: move over ZFS and BTRFS device getters
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 20:03:58 +02:00
Thomas Lamprecht
9a2d64977f tui: disk view: partition sizes are in GB
The proxinstall takes a GB float here and multiplies it up to KB for
most parts, which is then passed to various tools, passing bytes here
makes this go bonkers and try to create a 4 EiB swap partition.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 18:15:01 +02:00
Thomas Lamprecht
23632414c2 tui: lvm: crudely fix calculation mismatch
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 18:14:09 +02:00
Thomas Lamprecht
5ad2f28c8d tui: use plain Proxmox ascii figlet in header
If, one would need to write the full product name, and as that is
already written in the "inner" dialogue header, lets just drop it
from the outer.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 18:12:48 +02:00
Thomas Lamprecht
b6e671a6db low-level: report errors and implement autor-reboot
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 17:39:32 +02:00
Christoph Heiss
3285f0ad2f tui: add initial implementation of low-level installer transport
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00