Commit Graph

360 Commits

Author SHA1 Message Date
Michael Hudson-Doyle 1db8a1dc40 get rid of padding after header 2017-10-20 14:06:57 +13:00
Mathieu Trudel-Lapierre 491ca1e1c0 Indicate which network config method is active. 2017-10-12 11:01:33 -04:00
Michael Hudson-Doyle 5507fd0fbc clunky way of indicating which network config method is active 2017-10-11 21:35:10 +13:00
Steve Langasek ae1b8c2e66 Import i18n module before use. 2017-10-09 17:28:21 +00:00
Michael Hudson-Doyle 68b9f6f1be add a way to run console-conf or subiquity with a subset of the screens 2017-10-09 09:24:32 +13:00
Michael Hudson-Doyle f5637a717e a start at a more sophisticated ssh identity widget 2017-10-06 15:39:14 +13:00
Michael Hudson-Doyle b06d1a78c4 improve validation of hostname and username fields
not sure hostname validation makes perfect sense but at least it is a bit
more transparent now
2017-10-05 22:14:44 +13:00
Michael Hudson-Doyle 1bfb42c9b8 allow the same set of characters in realname as accepted by chfn -f 2017-10-05 16:33:26 +13:00
Michael Hudson-Doyle a73b76c7d2 clear any validation error as soon as the field becomes valid
this is why I changed size's validation to be side-effect free in the last
commit...
2017-10-05 16:19:31 +13:00
Michael Hudson-Doyle 876e2dc1b7 change partition size field to only modify user input explicitly on loss of focus 2017-10-05 16:16:31 +13:00
Michael Hudson-Doyle eafd614ce9 simplify things a bit by removing the ability to pass validator= and cleaner= to form fields 2017-10-05 15:45:16 +13:00
Michael Hudson-Doyle 35988f2fd9 change form machinery to always have space for validation error
and display help, if present, there by default
2017-10-05 15:08:10 +13:00
Michael Hudson-Doyle d35a7e08d8 Merge pull request #248 from CanonicalLtd/mwhudson/better-colors
color tweaks
2017-09-28 17:28:42 -04:00
Michael Hudson-Doyle 2c6fb9ed99 hide network error if showing before starting config again 2017-09-28 16:00:35 -04:00
Michael Hudson-Doyle cd85358a1b overwrite more of the console palette 2017-09-28 09:58:09 -04:00
Michael Hudson-Doyle 86ac32905b change the progress bar to show x / y rather than a %age
Also make its progress more automatic.
2017-09-26 09:01:22 -04:00
Michael Hudson-Doyle b60c0d33f5 have enter advance to the next focus item in piles and listboxes 2017-09-21 15:30:50 +12:00
Dimitri John Ledkov 785b4d5568
Fix up more fixed layouts with button_pile(). 2017-09-20 14:01:42 +01:00
Michael Hudson-Doyle 14fa3cd107 use button_pile helper everywhere 2017-09-20 15:20:32 +12:00
Michael Hudson-Doyle f000fc24eb add a helper to pad a pile of buttons just enough 2017-09-20 14:55:02 +12:00
Dimitri John Ledkov 790a1bf213
Fixup the merge due to changes on master. 2017-09-18 17:31:43 +01:00
Michael Hudson-Doyle 9356501aa7
change cancel buttons to back buttons where appropriate
and also some "Done" buttons become "Save" buttons.
2017-09-18 17:19:27 +01:00
Dimitri John Ledkov a6413ed87f
Refresh Button labels upon init. 2017-09-18 14:20:13 +01:00
Dimitri John Ledkov 693f3e7c7d
Barebones i18n setup. 2017-09-18 14:14:39 +01:00
Dimitri John Ledkov 648d7d4086
Buttons 2017-09-18 14:01:11 +01:00
Michael Hudson-Doyle a0fd94c0c4 remove connect_signal wrapper 2017-09-15 11:48:07 +12:00
Michael Hudson-Doyle ef54021b21 convert identity view 2017-09-15 11:04:38 +12:00
Michael Hudson-Doyle 91d57c50f2 a slightly different approach 2017-09-15 10:40:11 +12:00
Michael Hudson-Doyle 183e7f88b7 start process of using more semantic palette names
also make button helpers apply the palette by default
2017-09-14 14:51:56 +12:00
Dimitri John Ledkov 7c5e55e0b2
Update color palette
Create palette for traffic light buttons: green (default), amber and
red. Color-code most buttons.

Make all progressbars orange for the completed part.
2017-09-12 12:05:44 +01:00
Michael Hudson-Doyle e2b0dfa495 Merge branch 'master' into mwhudson/screen-review 2017-09-11 09:37:57 +12:00
Michael Hudson-Doyle 32261c3905 Merge branch 'master' into mwhudson/guided-partitioning
Fixing a few conflicts.
2017-09-11 09:26:09 +12:00
Michael Hudson-Doyle 1b328dbb61 work around urwid crash
see https://github.com/urwid/urwid/issues/253
2017-09-08 12:36:44 +12:00
Michael Hudson-Doyle e0f75ba013 tweaks to network views
1) move the done / cancel buttons (and error display) out of scrolling region
2) focus done by default
3) update footer texts to make sense
4) use a bit more of the horizontal space to show interface information
2017-09-08 09:48:41 +12:00
Michael Hudson-Doyle 977459ea62 pretty up and colorify subiquity a bit 2017-09-07 22:47:56 +12:00
Michael Hudson-Doyle 34f1e67d49 make it possible for subiquity and console_conf to use different colours 2017-09-07 21:37:48 +12:00
Michael Hudson-Doyle 44b9334a28 allow editing partitions
there is some wonky stuff around mount point validation, to be fixed next
2017-09-05 14:25:21 +12:00
Michael Hudson-Doyle 4a54ca9e50 start making the partition form usable in other views 2017-09-05 11:58:49 +12:00
Michael Hudson-Doyle 923044be7e move Selector widget to its own file and create a class for its Options
I wanted this so I can enable/disable options after creating the widget.
2017-09-05 09:43:45 +12:00
Michael Hudson-Doyle 641f437fd7 do not ask guided/manual on re-entering config screen if any configuration has been done 2017-08-29 09:24:29 +12:00
Michael Hudson-Doyle 9afd3cbc5a have escape always remove an overlay view 2017-04-05 15:20:36 +12:00
Michael Hudson-Doyle 395b30451e stop being clever in handling of escape in network screens 2017-04-05 14:36:46 +12:00
Michael Hudson-Doyle c49b810336 have IntegerEditor.value return an integer, fixing broken partition numbers in the curtin config 2017-03-23 09:02:37 +13:00
Michael Hudson-Doyle f8211b56fb clean up wifi config view code a bunch
(this was the first complicated urwid code i wrote)
2017-03-21 14:47:01 +13:00
Michael Hudson-Doyle 62ad81d690 make sure wifi psk is between 8 and 63 characters long 2017-03-21 14:39:23 +13:00
Michael Hudson-Doyle 26c1af8328 allow the gateway to be empty for an interface 2017-03-20 14:51:41 +13:00
Michael Hudson-Doyle 0d48ef1836 avoid wrapping captions in forms 2017-03-13 11:52:19 +13:00
Michael Hudson-Doyle 8cd4b020ee finish formatting/mounting available partitions 2017-03-10 15:46:21 +13:00
Michael Hudson-Doyle 66c1d94a4b consolidate mountpoint validation a bit 2017-03-07 21:10:03 +13:00
Michael Hudson-Doyle ad2a92a67d protection against empty containers when tabbing 2017-03-07 20:37:38 +13:00
Michael Hudson-Doyle ff75b7a7fe fix crash on disappearing network interface
By being more careful about accessing self.focus in FocusTrackingMixin.

Fixes https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1667829
2017-03-02 21:34:12 +13:00
Michael Hudson-Doyle 404ca627da use evilnick's wording on the network page 2017-03-02 13:52:20 +13:00
Michael Hudson-Doyle 2a1fbcd6fe remove some help leftovers 2017-02-16 12:36:26 +13:00
Michael Hudson-Doyle 693ca3d9bf fix a widget with no selectable widgets losing focus 2017-02-16 11:26:38 +13:00
Michael Hudson-Doyle 308a29c75b move help to an overlay 2017-02-14 16:16:19 +13:00
Michael Hudson-Doyle 65f9d1ef62 move show_overlay to BaseView 2017-02-14 16:16:19 +13:00
Michael Hudson-Doyle b00378304c I simplified RestrictedEditor a bit too much 2017-02-14 16:07:36 +13:00
Michael Hudson-Doyle 69f2b08684 simplify RestrictedEditor a whole bunch more 2017-02-14 15:27:25 +13:00
Michael Hudson-Doyle a6954b49e2 the various editor classes' caption argument is optional now 2017-02-14 15:19:56 +13:00
Michael Hudson-Doyle 906af4d41a simplify forms and edit widgets a bit 2017-02-14 15:16:12 +13:00
Michael Hudson-Doyle 3353c851ee make help appear in same place on identity view as before 2017-02-13 15:50:39 +13:00
Michael Hudson-Doyle a2062aaf57 convert identity view to use new validation stuff
help looks different though
2017-02-13 15:37:29 +13:00
Michael Hudson-Doyle 1e8322b05f remove old validation stuff 2017-02-13 15:14:20 +13:00
Michael Hudson-Doyle e58697a29c simplify api around enabling form fields 2017-02-13 15:12:04 +13:00
Michael Hudson-Doyle 1bd00a843a allow form fields to be enabled or disabled 2017-02-13 14:59:25 +13:00
Michael Hudson-Doyle 00c807dc9e convert add_partition view to new world
no enabling/disabling yet though
2017-02-13 14:48:53 +13:00
Michael Hudson-Doyle ee966f7039 rewrite validation stuff into something like a form library
This is inspired by the sort of design e.g. Django uses for its forms.
2017-02-13 14:21:26 +13:00
Michael Hudson-Doyle 472339a62b fixes for tabbing into/out of list boxes 2017-02-13 13:52:17 +13:00
Michael Hudson-Doyle af2bfc40ef fix mismerge 2017-02-10 15:42:43 +13:00
Michael Hudson-Doyle 9854d5ccce Merge remote-tracking branch 'origin/master' into mwhudson/ipv4-validation 2017-02-08 16:10:36 +13:00
Michael Hudson-Doyle f0eb2cdf70 make Color.button etc apply the corresponding focus map
about 1e6 times more readable
2017-02-08 15:37:18 +13:00
Michael Hudson-Doyle ebddb50483 better validation for manual network view 2017-02-08 13:18:20 +13:00
Michael Hudson-Doyle 0627bfe9f4 start to add validation to manual network view 2017-02-08 13:18:20 +13:00
Michael Hudson-Doyle 50b927fcc2 the start of an excessively general way of validating input 2017-02-07 14:02:07 +13:00
Michael Hudson-Doyle 1a9f0dc5dd make the mount point editing stuff into a single widget
and use it on "format entire disk" page
2017-02-07 10:28:56 +13:00
Michael Hudson-Doyle d372f0e306 respect _command_map 2017-02-06 22:12:38 +13:00
Michael Hudson-Doyle 9b94b567d6 refactor TabCyclingListBox to resemble TabCyclingMixin 2017-02-06 22:11:04 +13:00
Michael Hudson-Doyle abbc21c5fa simplify TabCyclingMixin a whole bunch 2017-02-06 22:05:16 +13:00
Michael Hudson-Doyle c8c468ff8e make some names less cryptic, add license info, docstrings 2017-02-06 21:38:19 +13:00
Michael Hudson-Doyle 3c5ac3140f use new containers everywhere 2017-02-03 14:21:39 +13:00
Michael Hudson-Doyle 3d2d2c79ea custom versions of urwid containers that support tab-cycling 2017-02-03 14:19:37 +13:00
Michael Hudson-Doyle 0aae936d63 remove previous tab "support" 2017-02-03 14:15:54 +13:00
Michael Hudson-Doyle 6426369fcb allow Selector to have disabled entries 2017-02-02 14:34:59 +13:00
Michael Hudson-Doyle 8524e2bfe9 recommend some common mount points per spec 2017-01-25 16:39:28 +13:00
Michael Hudson-Doyle f00b60342c tweak Selector to be more ascii and close on escape 2017-01-25 16:20:46 +13:00
Michael Hudson-Doyle 58af7dbb3b add some arrows to dropdown widget 2017-01-20 13:19:16 +13:00
Michael Hudson-Doyle d75cbabb61 move subiquity welcome stuff out of subiquitycore 2017-01-17 12:04:15 +13:00
Michael Hudson-Doyle b80145a99c simplify some generic view code 2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle 0caf13181e Do not say a netdev is not configured when there is no configuration 2017-01-11 15:42:16 +13:00
Michael Hudson-Doyle ae05b66a47 rewrite Selector to work like an HTML <select> widget
This was way way harder than it seemed like it should be, but it seems a lot
nicer to me.

For https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1654387
2017-01-09 16:11:32 +13:00
Mathieu Trudel-Lapierre 09b8235b07 Fix displaying IPs for login view in subiquitycore. 2016-12-21 17:18:08 -05:00
Mathieu Trudel-Lapierre 01c42205f0 Fix identity controller for subiquity; correctly process done signal and displaying local user info. 2016-12-20 15:40:28 -05:00
Michael Hudson-Doyle 21d3f78c9c use a IPv6 example address on manual ipv6 screen 2016-12-15 14:17:49 +13:00
Michael Hudson-Doyle 38c600528b remove some of the ip-version-in-method-name methods 2016-12-12 15:58:41 +13:00
Michael Hudson-Doyle 4de99bd41e use the ip version as a parameter a bunch more 2016-12-12 15:54:33 +13:00
Michael Hudson-Doyle 2a716df0ad add and use NetworkConfigureIPv6InterfaceView 2016-12-12 15:45:45 +13:00
Michael Hudson-Doyle 8582e2bc02 network_configure_manual_interface.py -> network_configure_ipv4_interface.py 2016-12-12 15:41:30 +13:00
Michael Hudson-Doyle be69509efa parameterize NetworkConfigureIPv4InterfaceView 2016-12-12 15:40:07 +13:00
Michael Hudson-Doyle 1efaed7648 add network model interfaces that take ip version as a parameter 2016-12-12 15:34:59 +13:00
Michael Hudson-Doyle 15bb9afcc2 move identityview to subiquity
subiquity and console-conf do not share any view code any more
2016-11-23 09:54:36 +13:00
Michael Hudson-Doyle 7c90a9e4da Fix crash when an interface has more than one IP address of the same family. 2016-11-11 11:29:57 +13:00
Michael Hudson-Doyle 344b177f16 validate user input a lot more thoroughly in the static ipv4 view 2016-11-08 11:07:20 +13:00
Michael Hudson-Doyle a7bfef3646 show error message from netplan generate when it fails 2016-11-08 10:39:54 +13:00
Michael Hudson-Doyle 8a44befe2a remove UI for customizing default route, not supported by netplan
Yet, anyway.
2016-11-08 10:39:05 +13:00
Michael Hudson-Doyle 31b21799b7 remove dependency on netifaces 2016-11-07 16:56:36 +13:00
Michael Hudson-Doyle c4fdf5cb72 allow choosing from visible networks when configuring wifi 2016-11-07 16:56:36 +13:00
Michael Hudson-Doyle cacd456a6a Adapt to netlink event driven version of probert. 2016-11-07 16:56:32 +13:00
Michael Hudson-Doyle 82b11dbd69 reorganize the network model and make the UI a bit more consistent
The main change here is to separate the state a network device is in and the
state we want it to be in. So it now parses the netplan config on a system as
well as probing the state of via probert.

The UI is changed to make this distintion too, and be IMO a bit more
consistent. Somewhere in this I've removed the display of whether the
probed address was found via DHCP or not, possibly that should be put
back if it doesn't make things too cluttered.

In dry-run mode, we now still write the config and feed it to netplan, but
in a way that doesn't affect the system we are running it on.
2016-11-07 15:15:46 +13:00
Michael Hudson-Doyle 6b99559819 oops 2016-11-02 12:14:01 +13:00
Michael Hudson-Doyle 91e42e37bd Merge branch 'master' into mwhudson/kill-some-signals 2016-11-02 12:00:47 +13:00
Michael Hudson-Doyle 74be6a382a launchpad allows = in emails too 2016-10-27 09:28:52 +13:00
Michael Hudson-Doyle ef0da85568 allow + in email addresses 2016-10-27 09:24:21 +13:00
Michael Hudson-Doyle 6318de27cf make sure selecting dhcp after manual configuration clears out gateway & nameserver config 2016-10-21 08:59:34 +13:00
Michael Hudson-Doyle 6d93221a43 do not add empty strings to nameservers or search_domains 2016-10-21 08:59:09 +13:00
Michael Hudson-Doyle 7edcf3bcb7 UI for entering name servers/domains 2016-10-20 22:31:10 +13:00
Michael Hudson-Doyle f603207d94 remove most trivial use of signals from console-conf's flow 2016-10-11 12:48:28 +13:00
Michael Hudson-Doyle e348207597 Remove most use of signals from welcome and network views. 2016-10-10 16:47:42 +13:00
Michael Hudson-Doyle 0bd33b7074 fix subiquity side again 2016-09-29 12:29:21 +13:00
Michael Hudson-Doyle d9095336e5 do not have controllers (or view code!!) know the order of the screens 2016-09-27 21:35:47 +13:00
Michael Hudson-Doyle dad0e10912 completely separate menu -> signal and signal -> method mappings
and put the signal -> method mapping into the controller

this breaks the subiquity part even more than before, but it's pretty broken
already.
2016-09-27 20:53:17 +13:00
Michael Hudson-Doyle e765538c95 address some UI comments from Mark 2016-09-20 14:13:31 +12:00
Michael Hudson-Doyle f78cae64bd Show if a link is not connected.
At least as well as ip(8) does it.
2016-09-16 14:28:40 +12:00
Mathieu Trudel-Lapierre e608362b34 Merge pull request #154 from CanonicalLtd/mwhudson/wifi-ui
Add a basic UI for entering wifi config details.
2016-09-09 15:33:48 -04:00
Michael Hudson-Doyle bf827db28d fix scrolling with many interfaces 2016-09-05 21:07:56 +12:00
Michael Hudson-Doyle 313b4d86db add a word 2016-09-05 20:17:05 +12:00
Michael Hudson-Doyle 97171f6b71 improve UI a bit 2016-09-05 16:55:09 +12:00
Michael Hudson-Doyle f58d2aa7c0 refactor a bit 2016-09-05 16:38:26 +12:00
Michael Hudson-Doyle 9451d69076 actually do something with the inputted data 2016-09-05 16:25:45 +12:00
Michael Hudson-Doyle f9668b8802 more low quality UI work 2016-09-05 15:36:59 +12:00
Michael Hudson-Doyle bf3384596e a start a configure-wifi ui 2016-09-05 12:03:06 +12:00
Michael Hudson-Doyle 806e3fb86d do not crash when enabling DHCP on an interface with an address
Fixes #141
2016-08-23 13:48:47 +12:00
Michael Hudson-Doyle 0a2546b3bd do not probe network on returning from network sub-screen
otherwise we overwrite our settings with the probed data!
2016-08-23 12:47:55 +12:00
Michael Hudson-Doyle efa8ef43d2 allow configuration to be canceled 2016-08-22 17:02:42 +12:00
Mathieu Trudel-Lapierre 958ab1a339 Show decent error messages on failure.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-08-18 16:15:28 -04:00
Mathieu Trudel-Lapierre 0c8deeece4 Update padding sizes for prettier output; account for future translations. 2016-08-16 22:15:41 -04:00
Mathieu Trudel-Lapierre 0e93ab3e61 Check we're online, display network error otherwise. 2016-08-16 15:25:58 -04:00
Mathieu Trudel-Lapierre 0e92883a83 Make it a little more obvious where labels are in fact buttons or menus 2016-08-16 15:01:51 -04:00
Mathieu Trudel-Lapierre 10d06a73e4 Allow clearing IP configuration 2016-08-16 14:14:25 -04:00
Mathieu Trudel-Lapierre 11782ced12 Improve handling of the default routes. 2016-08-16 12:59:19 -04:00
Mathieu Trudel-Lapierre df5e0fcb4c Try to do something sane to set a default gateway 2016-08-16 01:09:28 -04:00
Mathieu Trudel-Lapierre cac89c30e9 Do bonding, dhcp toggle, and segregate IPv4 and IPv6 again. 2016-08-16 00:48:15 -04:00
Mathieu Trudel-Lapierre 0f82a12208 Allow setting IPs and rendering as yaml 2016-08-15 17:05:19 -04:00
Mathieu Trudel-Lapierre 18c7e93cc2 WIP: Remove actions, port to an approximation of network yaml v2. 2016-08-13 00:13:22 -04:00
Mathieu Trudel-Lapierre d73ef34774 Display IPv6 addresses. 2016-08-12 17:55:03 -04:00
Mathieu Trudel-Lapierre 6754a15c93 Allow more than one IPv4 address on an interface, and leave room for IPv6. 2016-08-09 15:11:02 -04:00
Mathieu Trudel-Lapierre 046d3774ba Revert "Temporary unbreak, but nerf the user logins with email address."
This reverts commit 89c9e70501.
2016-07-28 20:51:48 -04:00
Mathieu Trudel-Lapierre 89c9e70501 Temporary unbreak, but nerf the user logins with email address. 2016-07-28 20:40:14 -04:00
Michael Hudson-Doyle 95dc9664e5 Start at a login view. 2016-07-28 10:30:27 +12:00
Michael Hudson-Doyle ec5f94bf7d entirely custom identity view for console-conf 2016-07-27 22:15:22 +12:00
Michael Hudson-Doyle ac06f25abd Refactor identity stuff to avoid dep on curtin in console-conf case.
A bit verbose perhaps, but works. Now console-conf only depends on curtin for
the network stuff.
2016-07-27 16:05:47 +12:00
Michael Hudson-Doyle dc11c6a27c Move function for creating a user to its own file. 2016-07-27 14:52:16 +12:00
Michael Hudson-Doyle d9f596c994 Move disk and install things from subiquitycore to subiquity. 2016-07-26 16:00:36 +12:00
Michael Hudson-Doyle 04a6d88ffe rename ViewPolicy to BaseView 2016-07-26 14:21:24 +12:00
Michael Hudson-Doyle 264f698299 Fix flake8 warnings in subiquitycore.
Except for line length warnings, because life is too short of that.

A few of these are real bugs.
2016-07-25 14:44:51 +12:00
Mathieu Trudel-Lapierre 1d8c5b3cdb Deal with the fact there may be no default route for an IP family. 2016-07-06 18:30:43 -04:00
Mathieu Trudel-Lapierre 0205423133 Do a slightly better job at showing default gateways. 2016-07-06 18:14:13 -04:00
Mathieu Trudel-Lapierre 73d73dff94 NetworkView: rework layout for network info based on review.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 17:24:31 -04:00
Mathieu Trudel-Lapierre e85859fa62 WelcomeView: update UI to Mark's review: welcome string and button caption
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:35:19 -04:00
Mathieu Trudel-Lapierre 848ccabc7d console_conf: start initial console-conf tree with a custom controller story
And a custom Welcome screen to boot; to show the overriding of settings.

Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:18:54 -04:00
Mathieu Trudel-Lapierre e1970b6477 Rename subiquity to subiquitycore -- will serve as base classes for everything
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:17:01 -04:00