Wolfgang Bumiller
497be1a7ff
Merge remote-tracking branch 'cheiss/tui-installer' into tui
2023-06-16 11:50:13 +02:00
Thomas Lamprecht
aafb89528c
code cleanups
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-16 09:32:18 +02:00
Thomas Lamprecht
413ca90b02
buildsys: create complete cd-info for test
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-16 07:48:27 +02:00
Christoph Heiss
c66dfa8e7d
tui: add preliminary final install config serialization
...
Not fleshed out and rather crude; can/should be tweaked as necessary.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 13:30:32 +02:00
Christoph Heiss
ea15ca43bb
tui: read and save reboot-after-install checkbox into options
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 13:28:30 +02:00
Christoph Heiss
fbfd1838a6
tui: rename SetupInfo::product_cfg
-> ::config
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 13:10:52 +02:00
Christoph Heiss
81f9348c14
tui: add preliminary install progress dialog
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 12:58:41 +02:00
Christoph Heiss
82cc9fc480
tui: fix bootdisk dialog for zfs/btrfs
...
This was broken when adding the usage caveats at the top of the advanced
dialog; the wrong child views were selected.
Fixes: 7f27373
("tui: add notices for zfs/btrfs bootdisk and their caveats")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 12:18:01 +02:00
Christoph Heiss
1353d6cf91
tui: implement both PartialOrd
and Ord
for KeyboardMapping
...
Otherwise, clippy (correctly) complains that you should always implement
both if you implement one.
Fixes: 86dac56
("tui: use whole keyboard mapping in select view as value")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 12:09:17 +02:00
Christoph Heiss
5b9842244f
tui: apply keyboard layout immediately after selecting it
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 11:51:24 +02:00
Christoph Heiss
86dac562e8
tui: use whole keyboard mapping in select view as value
...
Thus all its values can easily be used later on. Involves making
`KeyboardMapping` partial-orderable, just use the human-readable name
here (as that's what displayed to the user).
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 11:49:55 +02:00
Christoph Heiss
cae155237b
tui: make test mode indicator into global installer state
...
This will later be needed in other parts of the installer as well.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 11:47:45 +02:00
Christoph Heiss
6ab6af4cb3
tui: track previous screens so that that each is only created once
...
Until now, if the user navigated back and then forward again, the screen
would be constructed & added again to the stack. This would result in
missing values and broken "Previous" button behaviour.
Fix it by tracking their screen ids and simply switch to them as needed.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:49:24 +02:00
Christoph Heiss
b107a892a8
tui: display proper keyboard layout name in summary
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:22:35 +02:00
Christoph Heiss
06908b6ff7
tui: implement proper keyboard layout selection
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:12:13 +02:00
Christoph Heiss
4e61d6cc83
tui: save user-selected country in options
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:04:14 +02:00
Christoph Heiss
e1a11f794b
tui: move timezone dialog into custom view
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:04:14 +02:00
Christoph Heiss
67c8d5d079
tui: rename LocaleInfo::country
-> ::countries
...
It's a map of all the countries, thus make the name plural too to match
its content.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:04:14 +02:00
Thomas Lamprecht
026620be2f
rename Env to ISOEnv
...
in preparation of adding a runtime env module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 13:26:38 +02:00
Christoph Heiss
90c0ea37be
tui: display correct logo & title depending on product info
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
d445e54aa3
tui: ignore testdir
here as well
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
a6e00ea66d
tui: rename InstallerData
-> InstallerState
...
It was kind of ambigous anyway - naming is hard.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
4296d2004c
tui: implement initial parsing for setup & locale info
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
7f273738d7
tui: add notices for zfs/btrfs bootdisk and their caveats
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
95c490081d
tui: introduce proper type for handling FQDNs
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
74e3a21e4a
tui: remove cargo lockfile
...
We don't commit that anywhere; so remove it here as well.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
130fb96a09
tui: add simple system cpu/memory check, similar to gui installer
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
b82fff5d48
tui: add some more field validation checks
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
b977af78c3
tui: fix target bootdisk display for zfs/btrfs
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
ce0b586528
tui: drop some unneeded type annotations
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
78eda7b55f
tui: drop now-obsolete form types
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
66baa275b4
tui: rewrite bootdisk & fstype selector to use FormView
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
d36c96af33
tui: rewrite zfs & btrfs bootdisk options dialog using FormView
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
cd6d2d240a
tui: rewrite LVM bootdisk dialog using FormView
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
617f25340b
tui: rewrite network dialog using new FormView
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
15832d1872
tui: rewrite password using new FormView
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
767843f940
tui: rewrite timezone dialog using new FormView
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
26cdaacff4
tui: introduce new FormView
compomenent to unify all form inputs
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
e95f4f1a2d
tui: error out in network dialog if option retrieval failed
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
ef4957e89a
tui: implement password dialog options retrieval and validation
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
ee1437bbfc
tui: refactor and unify btrfs and zfs bootdisk options view
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
56a304d59f
tui: implement btrfs bootdisk selection option
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
2a344f499d
tui: format disk size as GiB for now, instead of bytes
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
2a65d9f46e
tui: fix disksize-input unit
...
Previously, the size was displayed in MiB, although it should have been
GiB.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
7393ed8840
tui: implement zfs bootdisk selection option
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
2d6187f192
tui: implement FormInputViewGetValue
for custom NumericEditView
s
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
ed191e60dd
tui: refactor bootdisk dialog; advanced options into separate dialog
...
This also reworks the whole installer state. The main type is now
`InstallerData`, which holds info about the machine (such as info about
the disks), as well as all the user options.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
36c6b9bddd
tui: make FormInputViewGetValue<SelectView>
fully generic
...
`SelectView` can hold values of other types than string.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
13c919bb2a
tui: refactor some option bits
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
af0dfe0e72
tui: move bootdisk dialog into own module
...
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00