Commit Graph

30 Commits

Author SHA1 Message Date
Didier Roche f8e90c894d Summary page to show immediately and update once the setup is done
Shows immediately the summary page. Before, this one was making a GET
request to the server, which was stuck on any long running command in
the controller.
Now, affect correctly the identity in memory and reuse it if needed.

Show a progress message while the configuration is happening and replace
it with a "completed" text on success.

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:48:03 +01:00
Didier Roche fa5721ce0a Allow waiting on summary page
We previously only went on this page when DONE or in ERROR state. Allow
now to be in any state as we switch to it as soon as possible.

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:33:38 +01:00
Patrick Wu c934268813 system_setup: changes and fixes
1. rebase with main and update autoinstall-system-setup.yml
2. provide a more unified indent style
3. update get_userandgroups() to the dropped one
4. fix the problematic os action
5. simply asignments
6. assign default_loader a default value
7. provide a type-to-file dict in wsl_conf
8. provide stderr info when providing error in creating user
9. update schema and example files
2021-10-06 22:13:15 +08:00
Patrick Wu 1a7274dbba system_setup: unify api names and simply WSLconfig class into function 2021-10-06 22:13:15 +08:00
Patrick Wu 365769c365 system_setup: update Summary code 2021-09-20 21:58:16 +08:00
Patrick Wu 1aac580dfd system_setup: update the detection logic 2021-09-20 21:58:16 +08:00
Patrick Wu 6303b5d6c5
system_setup: proper wsl_configuration UI setup
This fixes In wsl_configuration mode the UI shows ”base”/”advanced” screens.
2021-09-20 19:54:14 +08:00
Jean-Baptiste Lallement 717cb5b541 system-setup: finished removing duplicated fields
There was some remaining duplicated fields in the controllers and models
between base and advanced configuration, which made the code crash.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-10 12:07:55 +02:00
Jean-Baptiste Lallement ab161250e1 Removed the progress view.
On non systemd systems (ie WSL) the progress view is always empty. Thus
this view is removed and the summary (formerly overview) view becomes
the last page of the setup with the reboot button. This button is
displayed dynamically when setup is complete.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-01 19:06:50 +02:00
Jean-Baptiste Lallement 518cff3d3b Fixed linting 2021-08-31 15:52:03 +02:00
Jean-Baptiste Lallement ba6ce20d64 Do not use a file to share user name
Instead retrieve it from the server and store it in memory.
2021-08-31 15:52:03 +02:00
Jean-Baptiste Lallement 41945cb84c Renamed configuration pages
In order to make naming more explicit renamed wslconf1 to wslconfbase
and wslconf2 to wslconfadvanced.
2021-08-31 15:52:03 +02:00
Jean-Baptiste Lallement 57a2212c7b List of TODOs
This is the list of identified TODOs for the OOBE.
2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick eec135af26 system_setup: Pre fixes 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 6ba608b8f7 Use inheritance for IdentityForm
The previous composition version had some flaws due to multiple
instances of a given Field with different addresses when reinstalled in
the parent class. This caused the field validation validate_ to not work
as it was not taken the expected referenced values.

Instead of duplicating the code, we use an inherited version, taking and
overriding only our desired fields.

We still need to derive WSLIdentityView from the base class instead of
IdentityView, as this is what is instantiating the form.
(WSLIdentityForm instead of IdentityForm).

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick d217db86a2 Revert "system_setup: identity tui validation fix"
This reverts commit 2f3dc90b7e.
2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick f42f1d133e Reconfigure mode: WIP 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 3dccdddf39 system_setup: no longer require sudo for dryrun 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick aff93e5cda system_setup: PEP8 linting fixes 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 300161e0ea system_setup: Pre fixes 2021-08-31 15:52:03 +02:00
Didier Roche 1e52ab6374 Use inheritance for IdentityForm
The previous composition version had some flaws due to multiple
instances of a given Field with different addresses when reinstalled in
the parent class. This caused the field validation validate_ to not work
as it was not taken the expected referenced values.

Instead of duplicating the code, we use an inherited version, taking and
overriding only our desired fields.

We still need to derive WSLIdentityView from the base class instead of
IdentityView, as this is what is instantiating the form.
(WSLIdentityForm instead of IdentityForm).

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-08-31 15:52:03 +02:00
Didier Roche 74e5c47c25 Revert "system_setup: identity tui validation fix"
This reverts commit 2f3dc90b7e.
2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 9745fcc05f system_setup: identity tui validation fix 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 6bb86645ea system_setup: dryrun username 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick cc7a199371 Reconfigure mode: WIP 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick a97cc28ae6 Reconfigure mode: WIP 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 6cbe3e8a36 Generic Fixes 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 6e92218006 TUI: Add initial Overview Support 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 4672a1b772 TUI: Intergration Page 2021-08-31 15:52:03 +02:00
Didier Roche d8e0026df5 WSL identity controller and view
This controller and view inherits from the subiquity identity, but
remove the "hostname" field. We are using composition over inheritance
for identityController as the UI builder is basing on the order of
declared elements as class variable and we can’t override that in the
metaclass when inheriting.
2021-08-31 15:52:03 +02:00