Commit Graph

415 Commits

Author SHA1 Message Date
Dimitri John Ledkov 290c26d244 consoleconf: rewrite identity page. 2019-08-07 21:35:35 +01:00
Michael Hudson-Doyle 94df386a6c display a message when the user obstinately types in an unsuitable mount point 2019-07-24 13:03:04 +12:00
Michael Hudson-Doyle 619a92e252 always copy the options when creating a Selector
as I want to support mutating them after the fact
2019-07-24 11:27:29 +12:00
Dimitri John Ledkov dac6f12c0f Basic zdev view 2019-06-06 16:15:15 +01:00
Michael Hudson-Doyle 3bdca52ed4 Tweak the adjustment of table columns widths for cells with colspan > 1
When allocating space for a cell colspan > 1, preferentially
allocate space to columns that have no colspan = 1 cells. If you
have content like this (content padded to 10 and 20 chars to make
calculations easier):

[[(2, "longer content567890"), "shorter890"],
 ["shorter890", (2, "longer content567890")]]

Taking only colspan = 1 cells into account, the widths of the
columns are (10, 0, 10).

To fit the first longer content in, the current algorithm expands
the first two columns equally, so the widths become (15, 5, 10).

Then to fit the second longer content in, the second two columns
are widened equally (or nearly so), resulting in final widths
of (15, 8, 12) and a table layout like this:

    +-------------------------+--------------+
    | longer content567890    | shorter890   |
    +-----------------+-------+--------------+
    | shorter890      | longer content567890 |
    +-----------------+----------------------+

which is bizarrely asymmetrical given the input and wider than it
needs to be.

If instead we preferentially widen columns that have no width
from colspan = 1 columns, we get this layout:

    +----------------------+------------+
    | longer content567890 | shorter890 |
    +------------+---------+------------+
    | shorter890 | longer content567890 |
    +------------+----------------------+

Which is much more in line with my expectations.
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle e8423acd28 do storage probing in the background 2019-04-29 15:54:47 +12:00
Michael Hudson-Doyle 3384eb5c84 small fixes 2019-03-26 11:32:02 +13:00
Michael Hudson-Doyle b485cf487b make the re-dhcp on entry to the network screen a little more discreet 2019-03-26 10:59:50 +13:00
Michael Hudson-Doyle 099e658670 make applying changes less jarring for virtual devices 2019-03-26 10:59:50 +13:00
Michael Hudson-Doyle 23488a6f2e some fixes found in testing 2019-03-26 10:59:50 +13:00
Michael Hudson-Doyle b571b3d1a9 track and display DHCP status
Mark all devices with DHCP enabled as pending when the config is
applied, and mark them as timed out ten seconds later if they have not
received any addresses.
2019-03-26 10:57:36 +13:00
Michael Hudson-Doyle eae2497d41 auto disable inactive NICs
This disables any NIC that does not have a global address by the first
time the network screen is shown
2019-03-26 10:57:36 +13:00
Michael Hudson-Doyle 3bb9268974 apply network changes immediately, rather than when the "Done" is pressed
diff makes this change look more involved than really necessary :(
2019-03-26 10:57:33 +13:00
Michael Hudson-Doyle ff59de4a9c change "Done" button to "Continue without network" if there is no default route 2019-03-26 10:57:13 +13:00
Michael Hudson-Doyle c0f4a90179 refactor network view
The visible impact of this is that the addresses for a NIC are now
displayed underneath its name and a long "info line" (i.e. mac / model /
vendor) for a nic no longer distorts its table.

This lays the groundwork for better handling of NICs that fail to dhcp
and things like that.
2019-03-25 09:25:53 +13:00
Michael Hudson-Doyle d2349b0507 move spinner to subiquitycore 2019-03-21 14:48:48 +13:00
Michael Hudson-Doyle 756d923424 remove long disabled views for setting default route
as and when we add route configuration to subiquity, we will need new
views anyway.
2019-03-07 14:13:37 +13:00
Michael Hudson-Doyle d0c41469a7 remove login model/controller/view from subiquitycore
long ago subsumed into other code
2019-03-07 14:01:52 +13:00
Michael Hudson-Doyle 3b4d7a4266 move snap title into header 2019-02-27 15:56:02 +13:00
Michael Hudson-Doyle 2587b6dd02 fix some dodgy algebra in scrollbars 2019-02-27 14:28:05 +13:00
Michael Hudson-Doyle f25bb21c08 fix netdev info dialog 2019-02-19 14:40:19 +01:00
Michael Hudson-Doyle f4cf947b0a center the list of disks 2019-02-04 17:41:11 +13:00
Michael Hudson-Doyle fae9be9103 make the network view slightly less of a snowflake 2019-02-04 17:25:31 +13:00
Michael Hudson-Doyle 0b3d44f911 oops 2019-02-04 16:17:58 +13:00
Michael Hudson-Doyle 4e0af495df more 2019-02-04 14:47:00 +13:00
Michael Hudson-Doyle a553246a30 add a min_width of 96 to the content area of the "standard" view 2019-02-04 14:43:19 +13:00
Michael Hudson-Doyle 2eb9420a75 move ssh key fetching over to ssh view 2018-12-13 14:15:43 +13:00
Michael Hudson-Doyle 16a853107e add form fields to ssh view 2018-12-13 14:15:43 +13:00
Michael Hudson-Doyle bee1109a2d Much more fine grained answers support for networking. 2018-10-31 09:59:31 +13:00
Michael Hudson-Doyle 15b6bb1114 Major refactor of network model
The main thrust of this is to not create virtual interfaces until
applying the config.

This meant that the network model has to change a bit to be able to
represent interfaces that do not yet exist on the system. I did this
by ripping out most of the existing network device code: now a
NetworkDev is really just a wrapper for the config for a device and (if
it exists) the netlink data too. A few places had to adjust to checking
if the netlink info is available before accessing it but all in all it
was not that painful.

There are a few other refactorings in this commit that perhaps should be
split out (how the bond parameters are handled, some stuff about
resizing the table rows when interfaces are edited) but it doesn't
really seem worth it.
2018-10-31 09:58:56 +13:00
Michael Hudson-Doyle 7a86603539 prevent bonding of bonds
https://bugs.launchpad.net/bugs/1782397
2018-07-23 10:39:14 +12:00
Michael Hudson-Doyle 96ee3db409 make example CIDR form address family appropriate
https://bugs.launchpad.net/bugs/1782391
2018-07-23 10:38:06 +12:00
Michael Hudson-Doyle 7f766e93a1 forbid bonding of vlans
https://bugs.launchpad.net/bugs/1782351
2018-07-23 10:34:41 +12:00
Michael Hudson-Doyle 42b339605c make button labels more consistent
especially back vs cancel

for https://bugs.launchpad.net/subiquity/+bug/1781457
2018-07-16 22:45:36 +12:00
Michael Hudson-Doyle d95f089a04 add arrows at end of scrollbar
for https://bugs.launchpad.net/subiquity/+bug/1781460
2018-07-16 12:44:38 +12:00
Michael Hudson-Doyle 53fb81a65b correctly call wrapped lost_focus in _Validator.lost_focus
fixes https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1781429
2018-07-16 12:44:38 +12:00
Michael Hudson-Doyle 437f42b599 lint 2018-07-12 11:36:30 +12:00
Michael Hudson-Doyle f3b0d13fbe a proper multi-nic selector 2018-07-12 10:10:08 +12:00
Michael Hudson-Doyle 07ac05b6d3 view improvements 2018-07-11 22:02:52 +12:00
Michael Hudson-Doyle 46c0d598ad first cut at a bond form that handles devices too 2018-07-11 22:02:52 +12:00
Michael Hudson-Doyle 5e683dcc1f add create bond button 2018-07-11 22:02:52 +12:00
Michael Hudson-Doyle 2f149a8aac enable/disable bond options as bonding mode changes 2018-07-11 22:02:52 +12:00
Dimitri John Ledkov 87558f0074 lint 2018-07-11 22:02:52 +12:00
Dimitri John Ledkov 87ef3749e6 Finish bond master/slaves. 2018-07-11 22:02:52 +12:00
Dimitri John Ledkov e0d231f5d7 Create bond 2018-07-11 22:02:52 +12:00
Michael Hudson-Doyle 0457985208 fixup tests 2018-07-11 14:55:41 +12:00
Michael Hudson-Doyle 535a0f3b04 fix editing an interface 2018-07-11 09:43:58 +12:00
Michael Hudson-Doyle e91308e8b9 close any dialog open for an interface that is deleted 2018-07-11 09:36:14 +12:00
Michael Hudson-Doyle c69b89b4df expand a whinge about urwid's focus behaviour 2018-07-11 09:35:01 +12:00
Michael Hudson-Doyle 91def10468 improve message on vlan interfaces 2018-07-10 22:58:47 +12:00
Michael Hudson-Doyle 53a14e30ad make updates to network screen in response to netlink events more finegrained 2018-07-10 13:25:05 +12:00
Michael Hudson-Doyle 1701246d12 refactor how device row gets created a bit 2018-07-10 12:34:42 +12:00
Michael Hudson-Doyle b3636cfcd9 refactor how netdev action menu gets populated 2018-07-10 12:30:01 +12:00
Dimitri John Ledkov 8a0e94ccc7 Pacify flake8 2018-07-06 15:00:27 +01:00
Dimitri John Ledkov a4daae42d6 Fix crash, after deleting last vlan. 2018-07-06 14:33:34 +01:00
Dimitri John Ledkov 68b6b2a6b1 Implement information screen for the network interfaces. 2018-07-06 14:33:32 +01:00
Dimitri John Ledkov 92c53b29ae Vlan ui 2018-07-06 14:31:42 +01:00
Michael Hudson-Doyle d5f136c413 improve behaviour when a spanning column makes table want to be wider than view 2018-07-06 15:20:25 +12:00
Michael Hudson-Doyle e3e5c7f760 fix tests 2018-07-06 14:44:19 +12:00
Michael Hudson-Doyle ed09054928 fix lint 2018-07-06 14:17:27 +12:00
Michael Hudson-Doyle 29fe577013 delete more unused code 2018-07-06 14:13:30 +12:00
Michael Hudson-Doyle 830d89c735 unify "action menu row" creation 2018-07-06 13:57:55 +12:00
Michael Hudson-Doyle 7d15727b74 add wlan editing 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 2e281d00d4 delete gobs of old code 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 2251cac4ba trim back to existing functionality 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 805ad5f495 code motion 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 79a380f28f initialize manual form fields 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 58fd656aed small tweaks 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 834b5a1014 a bit better 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 89a30721a2 copy network manager a bit more directly 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 0fdd9721ce tweaks 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 08de48623f more 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 4c9ec9cf5e more 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle 6eb255c2e0 beginnings of an edit network device dialog 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle ad8d6c9086 skeleton of new view 2018-07-06 13:36:53 +12:00
Michael Hudson-Doyle e0eeeadd28 enable/disable a Toggleable via a property not methods 2018-07-04 11:47:44 +12:00
Michael Hudson-Doyle 38eccb8382 use the new variable table padding on filesystem views 2018-06-29 14:00:22 +12:00
Michael Hudson-Doyle 5e621a4780 allow for variable spacing between table columns 2018-06-29 13:40:58 +12:00
Michael Hudson-Doyle dbe07faa5c fix infinite loop in table width calculations 2018-06-29 09:24:12 +12:00
Michael Hudson-Doyle 91247c82c5
Merge pull request #373 from mwhudson/raid-the-fourth
Raid the fourth
2018-06-27 11:06:43 +12:00
Michael Hudson-Doyle 237290bbb3 fix rendering of long labels on guided disk selection screen 2018-06-26 14:20:41 +12:00
Michael Hudson-Doyle 9e4a66b628 add the raid view 2018-06-26 12:22:09 +12:00
Michael Hudson-Doyle edd6769a60 add ReadOnlyField (to be used for the size of a raid) 2018-06-26 12:19:47 +12:00
Michael Hudson-Doyle 1895d98ac4 tweak TableRow.selectable 2018-06-26 11:40:02 +12:00
Michael Hudson-Doyle 48666547f1 convert focusable things on filesystem view to "[ {stuff} ▸ ]" layout 2018-06-26 11:14:37 +12:00
Michael Hudson-Doyle 237611fda6 change " menu >" to "[ menu ▸ ]" 2018-06-26 10:19:57 +12:00
Michael Hudson-Doyle 1ae09926ca change button_pile to use widget_width 2018-06-26 10:12:09 +12:00
Michael Hudson-Doyle 8854e7aaaa move CursorOverride somewhere generic 2018-06-26 10:05:37 +12:00
Michael Hudson-Doyle 22ae45e99b move widget_width() to its own module
also allow our widget subclasses to specify their width
2018-06-26 09:59:48 +12:00
Michael Hudson-Doyle 5f3ce077ac
Merge pull request #372 from mwhudson/selector-tweaks
Selector tweaks
2018-06-26 09:10:46 +12:00
Michael Hudson-Doyle 8bb5621947
Merge pull request #371 from mwhudson/action-menu-tweaks
do not show > in the context menu for actions that do not open a dialog
2018-06-25 23:50:24 +12:00
Michael Hudson-Doyle 4501aee357 rework look of open selector to match 2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle 391b70cdf5 rework the look of the selector widget 2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle 7ab699716d make Selector.options a public interface 2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle 80bec75871 stop assigning to Selector.value emitting the "select" signal
for the avoidance of infinite recursion
2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle f08b6a42e5 make selector a WidgetWrap rather than a decoration 2018-06-25 23:10:39 +12:00
Michael Hudson-Doyle a6f54be22a fix stupid failure of arithmetic in stretchy 2018-06-25 22:57:57 +12:00
Michael Hudson-Doyle 8b9331e5be do not show > in the context menu for actions that do not open a dialog 2018-06-25 22:52:34 +12:00
Michael Hudson-Doyle 90d580a57e remove DummyView 2018-06-22 09:39:33 +12:00
Michael Hudson-Doyle 9cbaac4542 use our custom WidgetWrap everywhere 2018-06-22 09:38:18 +12:00