Michael Hudson-Doyle
33af65bde1
make --screen command line option do something again
2019-12-16 23:17:21 +13:00
Michael Hudson-Doyle
324dddac94
push debug_flag block probe crashing into Prober
2019-12-16 23:15:48 +13:00
Michael Hudson-Doyle
01e5261b3f
kill off other top level signals
2019-12-16 23:09:17 +13:00
Michael Hudson-Doyle
2765e6a773
replace next-screen/prev-screen signals with method calls
2019-12-16 23:02:03 +13:00
Michael Hudson-Doyle
7e7ca080f6
Merge pull request #604 from mwhudson/tab-cycling-oddity
...
fix tab-cycling between header and body
2019-12-16 21:37:20 +13:00
Michael Hudson-Doyle
7b697a1978
Merge pull request #602 from mwhudson/selector-non-text
...
allow Selector to have non-text entries
2019-12-16 21:36:45 +13:00
Michael Hudson-Doyle
b41560fc4c
fix tab-cycling between header and body
2019-12-16 21:32:25 +13:00
Michael Hudson-Doyle
9736825e32
simplify SubForm stuff a bit
2019-12-16 21:21:57 +13:00
Michael Hudson-Doyle
6913294de6
EXTREMELY OBSCURE fix
...
without this, selectors get skipped over when selecting the first element in a
pile if the label is some kind of container.
2019-12-16 21:15:46 +13:00
Michael Hudson-Doyle
9759957f36
allow Selector to have non-text entries
2019-12-16 13:28:42 +13:00
Michael Hudson-Doyle
de18cc977f
make SingleInstanceTask.start_sync set self.task synchronously
2019-12-16 12:33:19 +13:00
Michael Hudson-Doyle
5173e46b33
Merge pull request #600 from mwhudson/fix-probing-failures
...
stop block probing failures from crashing the process
2019-12-15 09:53:47 +13:00
Michael Hudson-Doyle
fe08311c19
stop block probing failures from crashing the process
...
There is a common problem in concurrent / asynchronous code of what to
do with unhandled exceptions. If a (conceptual) thread of execution
fails, there's no guarantee (and no way of telling) if there's anything
listening. By default, I chose to have a failing task propagate the
exception up to the run loop for two reasons:
1) Unhandled exceptions are generally bad
2) urwid.ExitMainLoop needs to be propagated to the run loop to have
any effect
But this means that tasks that are expected to fail (and have this
failure handled) like block probing crash the process, which is
obviously a Bad Thing. This branch adds a way to turn off exception
propagation per-task, which is a bit hackish but works ok it seems.
2019-12-15 09:45:14 +13:00
Michael Hudson-Doyle
bd3ede4c21
Merge pull request #595 from mwhudson/remove-run_in_bg
...
remove run_in_bg
the asyncioification is complete (apart from bug fixes)
2019-12-15 09:44:09 +13:00
Michael Hudson-Doyle
6d4ea2bf34
Merge pull request #596 from xnox/uc20
...
Unbreak console-conf in UC20 images
2019-12-15 09:04:03 +13:00
Michael Hudson-Doyle
ae5cd6268a
kill off run_in_bg and some related hacks
2019-12-15 08:53:37 +13:00
Michael Hudson-Doyle
a92b88ed9d
asyncioify run_command_in_foreground
2019-12-15 08:53:36 +13:00
Dimitri John Ledkov
d6689d9200
Merge pull request #594 from mwhudson/asyncio-ssh
...
asyncioify ssh
2019-12-14 16:48:55 +00:00
Dimitri John Ledkov
b4ff1bde70
Merge pull request #599 from mwhudson/radiobuttonfield
...
add a RadioButtonField for forms
2019-12-14 16:47:29 +00:00
Michael Hudson-Doyle
a2fc6da694
add a RadioButtonField for forms
2019-12-14 22:35:19 +13:00
Michael Hudson-Doyle
285eeee0ed
Merge pull request #598 from mwhudson/repeatedcontroller-index
...
fix RepeatedController
2019-12-14 22:16:07 +13:00
Michael Hudson-Doyle
0090aec3be
fix RepeatedController
...
a snap update was offered the second time even if it had been
offered already
2019-12-14 21:44:10 +13:00
Michael Hudson-Doyle
5571e1fab3
add a class for controllers with no ui
...
there will be a bunch of these coming for autoinstall
2019-12-14 21:27:39 +13:00
Dimitri John Ledkov
d19e405666
Unbreak console-conf in UC20 images
2019-12-14 03:00:17 +00:00
Michael Hudson-Doyle
05a61544fb
asyncio.create_subprocess_exec defaults stdin to None
2019-12-13 11:44:12 +13:00
Michael Hudson-Doyle
992e131b5f
squash all exceptions when cancelling the task in SingleInstanceTask
...
otherwise restarting a failed task just raises the exception from the previous
failure
2019-12-13 10:05:23 +13:00
Michael Hudson-Doyle
4e1afd60a4
do not always stop networkd
2019-12-13 10:04:57 +13:00
Michael Hudson-Doyle
b155d3eff0
have apply_config task exit as soon as all dhcp NICs have an address
2019-12-13 10:04:31 +13:00
Michael Hudson-Doyle
08e081415d
move async_helpers to subiquitycore
2019-12-13 10:04:02 +13:00
Michael Hudson-Doyle
5a7abd99b7
only run network answers once
2019-12-13 10:03:46 +13:00
Michael Hudson-Doyle
eb228ab7f3
introduce a helper for a restartable task
...
(there are going to be a few of these)
2019-12-13 10:03:32 +13:00
Michael Hudson-Doyle
2d1bd0011d
a little refactoring
2019-12-13 09:40:15 +13:00
Michael Hudson-Doyle
a260bebc0b
rip out TaskSequence
2019-12-13 09:39:48 +13:00
Michael Hudson-Doyle
19f8f91d29
asyncify network controller
2019-12-13 09:39:13 +13:00
Michael Hudson-Doyle
efed69ff7c
some asyncifying of network
2019-12-13 09:37:36 +13:00
Michael Hudson-Doyle
b65a8177a3
Merge pull request #591 from mwhudson/asyncio-installation
...
asyncioify installation
2019-12-13 09:14:13 +13:00
Michael Hudson-Doyle
4c84bb6494
add a form field that has another form as its widget
2019-12-12 23:20:12 +13:00
Michael Hudson-Doyle
05c4fa4403
add a way for a form field not to have space for help
2019-12-12 23:19:46 +13:00
Michael Hudson-Doyle
d8746ce75e
add a way for a form field to not have a caption
2019-12-12 23:19:09 +13:00
Michael Hudson-Doyle
f549883f80
tweak some log levels
2019-12-12 21:57:20 +13:00
Michael Hudson-Doyle
d08cce4970
create an INFO level log file too, unconditionally include it in error reports
2019-12-12 21:49:44 +13:00
Michael Hudson-Doyle
3d80f46225
asyncioify the installation
2019-12-12 15:19:22 +13:00
Michael Hudson-Doyle
297d7c2060
add Application.select_screen
...
SubiquityUI will want to override this for autoinstally things
2019-12-12 10:38:04 +13:00
Michael Hudson-Doyle
fb2f322544
tidy up next/prev_screen
2019-12-12 10:38:04 +13:00
Michael Hudson-Doyle
64378cdb95
refactor how controllers are stored a bit
2019-12-12 10:38:03 +13:00
Michael Hudson-Doyle
b3c013907b
Merge pull request #586 from mwhudson/restart-after-update
...
remove last-screen file before restarting subiquity
2019-12-12 09:19:54 +13:00
Michael Hudson-Doyle
411a78ccb3
steal the fix for https://github.com/urwid/urwid/issues/235
...
the symptom of the bug fixed is that exceptions that crash the process
do not get reported sensibly.
2019-12-11 23:21:11 +13:00
Michael Hudson-Doyle
932f703c7a
remove last-screen file before restarting subiquity
...
this fixes a crash loop when the users updates the subiquity snap
then hits an install failure and selects restart
2019-12-11 23:17:16 +13:00
Michael Hudson-Doyle
cac9cba8ec
asyncio.create_subprocess_exec does not support check=True
2019-12-11 15:02:18 +13:00
Michael Hudson-Doyle
f805a9d9dd
add a convenience wrapper
2019-12-11 14:39:48 +13:00
Michael Hudson-Doyle
864e09cc99
use asyncio event loop and a little asyncio api
2019-12-11 14:39:25 +13:00
Michael Hudson-Doyle
ac071ec9bf
Merge pull request #574 from mwhudson/error-report-ui
...
first cut at error report ui
2019-11-18 12:30:50 +13:00
Michael Hudson-Doyle
73b53f2bf3
stop caching probed storage data
...
A recent branch carefully called Prober.get_storage() whenever a udev
block device event was seen. But Prober.get_storage() cached the results
from probert rendering that useless. Rip the caching and some other
complexity out of the prober class.
2019-11-13 10:07:51 +13:00
Michael Hudson-Doyle
615dc1b1dd
show an unseen ui crash on startup
2019-11-08 13:36:30 +13:00
Michael Hudson-Doyle
6d3f014f7a
simple view of a crash report
2019-11-08 13:36:30 +13:00
Michael Hudson-Doyle
74ef2ad8f6
add a way to create a crash report
2019-11-07 14:47:18 +13:00
Michael Hudson-Doyle
54823e364c
remove signal sent after debug shell exits
2019-11-04 23:52:49 +13:00
Michael Hudson-Doyle
4798348740
Merge pull request #567 from mwhudson/restricted-saved-probing
...
implement restricted probing for canned probert data
2019-11-04 10:44:18 +13:00
Michael Hudson-Doyle
ca02972195
add a controlled way to make various things fail
...
In dry-run mode, treat SUBIQUITY_DEBUG as a comma-separated list of
things to fail:
* install-fail: curtin install fails
* copy-logs-fail: the postinstall copying of logs fails
* bpfail-full: full block device probing fails
* bpfail-restricted: restricted block device probing fails
In addition, control-u makes the UI crash in dry-run mode.
(This is all for testing of crash report generation but does not depend
on that).
2019-11-04 10:43:29 +13:00
Michael Hudson-Doyle
d56b72b35b
implement restricted probing for canned probert data
2019-10-31 13:39:01 +13:00
Michael Hudson-Doyle
a3734cda03
wrap actionmenu/selector popups in Color.body
...
this fixes a slight visual glitch in gnome-terminal
2019-10-16 12:50:44 +13:00
Michael Hudson-Doyle
f2918fa30b
Merge pull request #550 from mwhudson/reprobe-block-devices-on-shell-exit
...
Reprobe block devices on debug shell exit
2019-10-09 15:37:23 +13:00
Dimitri John Ledkov
3e39db4013
Asciify color pallete
2019-10-07 22:30:23 +01:00
Dimitri John Ledkov
3f548665e1
Add ASCII mode
2019-10-04 17:17:26 +01:00
Michael Hudson-Doyle
7a3a88ab0c
add a signal that is fired when a debug shell exits
2019-10-04 15:10:11 +13:00
Michael Hudson-Doyle
36cdf0effd
some better names
2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle
415db68e36
always use vt100 codes for white/black/default
...
For maximum compatibility in mono mode.
2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle
cea3a65ca1
refactor how palettes and colors and screens are set up
2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle
29c9e0c984
add a hot key (f4) for turning color on and off
2019-10-04 13:39:39 +13:00
Steve Langasek
d2f996732f
Don't mark a dash as translatable
2019-10-02 11:45:34 -07:00
Steve Langasek
34034e4a79
Don't mark 'DHCPv{v}' as translatable
2019-10-02 11:40:58 -07:00
Michael Hudson-Doyle
9ece5d2222
implement local documentation
2019-10-02 10:51:34 +13:00
Michael Hudson-Doyle
0c4d809c05
Have the help button open a help menu.
...
None of the items do anything yet though.
2019-10-02 10:48:58 +13:00
Michael Hudson-Doyle
70bb4ab5dd
add [ Help ] button to header
2019-10-02 10:48:35 +13:00
Michael Hudson-Doyle
3450078f4b
Merge pull request #542 from mwhudson/log-file-per-pid
...
create one log file per invocation
2019-10-02 10:29:25 +13:00
Michael Hudson-Doyle
93732dfb73
fix run_command_in_foreground to disconnect from stdin while in backgound
...
Not sure how I didn't notice this when implementing it for the first
time but well. This is all fairly confusing.
2019-09-30 16:26:24 +13:00
Michael Hudson-Doyle
fb6ea590a5
still create a subiquity-debug.log symlink
2019-09-30 16:21:42 +13:00
Michael Hudson-Doyle
7c1154b758
create one log file per invocation
...
Log to subiquity-debug.log.$PID instead of just subiquity-debug.log.
When we implement error reports we'll obviously attach the log to the
error report. There's no point adding log messages from previous runs of
subiquity.
2019-09-30 13:47:56 +13:00
Michael Hudson-Doyle
a2ccb0cd9e
remove all remaining footer-related things
2019-09-30 09:32:23 +13:00
Michael Hudson-Doyle
a96c5c8805
Make header narrower, move right_icon into header.
2019-09-30 09:32:07 +13:00
Michael Hudson-Doyle
d8d5b2e265
remove the footer
2019-09-27 14:31:34 +12:00
Michael Hudson-Doyle
c442a166ca
Merge pull request #537 from mwhudson/log-sanity
...
clean up logging a touch
2019-09-26 11:57:27 +12:00
Michael Hudson-Doyle
947f14a0af
move stretchy signals from overlay to stretchy itself
...
Also add overridable opened/closed hooks.
2019-09-12 21:36:40 +12:00
Michael Hudson-Doyle
d0151deec0
some more logging statements to follow user around the ui a little more
2019-09-09 15:33:45 +12:00
Michael Hudson-Doyle
b6bf3fcc42
a bit too much effort making one particular log statement look nice
2019-09-09 15:32:49 +12:00
Michael Hudson-Doyle
0eb4dcfdfb
more logging tweaks
2019-09-09 15:27:56 +12:00
Michael Hudson-Doyle
ca6ebf84f4
only call is_linux_tty once
2019-09-09 15:27:34 +12:00
Michael Hudson-Doyle
b24dbf7095
remove environment_check stuff
2019-09-09 15:27:29 +12:00
Michael Hudson-Doyle
5dca5e861e
remove some pointless wrapping of exceptions
2019-09-09 14:30:49 +12:00
Michael Hudson-Doyle
3d9cbeac95
light sanitization of log statements
2019-09-09 14:28:48 +12:00
Dimitri John Ledkov
25ed1e281f
Merge pull request #533 from mwhudson/app-specific-uis
...
allow the application to have a widget in the bottom right
2019-09-05 14:36:12 +01:00
Dimitri John Ledkov
0a1a9faa12
Merge pull request #534 from mwhudson/overlay-close-signal
...
define a 'closed' signal on StretchyOverlay
2019-09-05 14:34:38 +01:00
Michael Hudson-Doyle
ea258973fc
define a 'closed' signal on StretchyOverlay
...
And return the overlay from show_stretchy_overlay, so you can do things
when the overlay is closed.
Will be used by the help-showing stuff.
2019-09-05 12:30:03 +12:00
Michael Hudson-Doyle
3c2fd87e9b
Allow the UI to have a widget in the bottom right of the screen
...
This will be a help button in subiquity soon.
2019-09-05 12:22:56 +12:00
Michael Hudson-Doyle
3f8c005237
allow console_conf and subiquity to use different UI classes
...
Subiquity is going to grow some global UI elements that console_conf
does not want.
2019-09-05 11:58:25 +12:00
Michael Hudson-Doyle
c1e973fe1e
Add Controller.showing helper
2019-09-04 15:21:26 +12:00
Michael Hudson-Doyle
9a05653150
Tweak Controller API
...
* rename 'default' method to 'start_ui'
* add 'end_ui' hook
* add Application.cur_controller helper
2019-09-04 15:18:45 +12:00
Michael Hudson-Doyle
3605514d30
extract some methods out of Application.run
2019-09-03 13:14:17 +12:00
Michael Hudson-Doyle
43f414da1f
add a way to suspend the subiquity UI and run some other command
...
This will be used for the drop to shell functionality and also to allow
viewing an error report before we submit it to daisy.
It is almost but not quite surprisingly easy (I added a long-ish comment
about the difficulties).
2019-08-23 11:19:21 +12:00
Michael Hudson-Doyle
1947abcc5e
fix mismerge self.common["loop"] vs self.loop
2019-08-20 10:34:31 +12:00
Dimitri John Ledkov
1dfffbda01
Merge pull request #523 from mwhudson/run_in_bg-fd-leak
...
fix fd leak in run_in_bg
2019-08-19 11:30:52 +01:00
Michael Hudson-Doyle
f85fb6aac7
Merge pull request #525 from mwhudson/outermost-pile
...
Make the outermost widget an instance of Pile rather than Frame
2019-08-16 14:51:32 +12:00
Michael Hudson-Doyle
9e40dcbad6
Make the outermost widget an instance of Pile rather than Frame
...
Current plans involve putting a focusable widget (a help button) in the
footer, and Pile's behaviour is much more what we want than Frame for
this.
2019-08-16 14:31:03 +12:00
Michael Hudson-Doyle
b38f47bf42
Merge branch 'master' into core-cleanups
2019-08-16 14:24:56 +12:00
Michael Hudson-Doyle
9b7eb8883c
fix fd leak in run_in_bg
...
Notices this while debugging something entirely different.
2019-08-15 13:59:29 +12:00
Michael Hudson-Doyle
90d376fbbd
put the terminal into raw mode
...
For whatever reason, urwid puts the terminal into cbreak mode during
initialization. If we put the terminal into raw mode instead, then we
don't have to ignore SIGINT and SIGQUIT, which is good, because when we
support dropping to a subshell we don't want to run that subshell with
those signals ignored, because that is extremely confusing.
This also lets me dump the code that puts the terminal into raw mode
during keyboard detection.
2019-08-15 13:50:23 +12:00
Michael Hudson-Doyle
518e52e8e2
move "global" key handling to an unhandled_input handler
...
The only observable difference here is that ctrl-x now exits in dry-run
mode when a pop up is open.
2019-08-15 13:34:10 +12:00
Michael Hudson-Doyle
7096501a6d
reduce answers-related boilerplate
2019-08-15 13:34:10 +12:00
Michael Hudson-Doyle
81b9c883f3
do not copy so many things from app to controller in Controller.__init__
2019-08-15 13:34:09 +12:00
Michael Hudson-Doyle
98908e91b2
get rid of silly common dictionary that was passed around a bit everywhere
2019-08-15 13:33:38 +12:00
Dimitri John Ledkov
962fd3ebd3
NetDev: bring back actual_global_ip_addresses used by console_conf.
2019-08-08 15:02:39 +01:00
Dimitri John Ledkov
e755bf4b5f
console_conf/subiquity: split identitymodel, as it is not the same at all.
2019-08-08 15:02:39 +01:00
Dimitri John Ledkov
290c26d244
consoleconf: rewrite identity page.
2019-08-07 21:35:35 +01:00
Dimitri John Ledkov
be50b59dcd
Allow starting subiquity/console-conf without translations.
...
Set fallback=True on gettext.translation() call such that it returns
NullTranslation object. This means subiquity/console-conf can start,
even if .mo files are not build in the tree, or are outright missing.
2019-08-07 12:40:10 +01:00
Michael Hudson-Doyle
6bbe02774f
assume a default route on a down link has gone away
...
it seems netlink routing table messages are more of a notifications of
changes being explicitly made vs notifications of all changes to
routing.
for https://bugs.launchpad.net/subiquity/+bug/1837822
2019-07-25 17:37:41 +12: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
94de7dc522
Merge remote-tracking branch 'origin/pull/500/head'
...
Merge using existing partitions. Revert to using archive
curtin/deps/etc.
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
2019-07-02 13:18:46 +01:00
Dimitri John Ledkov
dac6f12c0f
Basic zdev view
2019-06-06 16:15:15 +01:00
Michael Hudson-Doyle
628758811e
support for editing existing partitions
2019-05-30 15:10:54 +12: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
Dimitri John Ledkov
e46de5def8
Drop Installpath
2019-05-14 15:09:55 +02:00
Michael Hudson-Doyle
bdf33a2adf
make SubiquityModel objects easier to construct
...
So I can write a unittest more easily.
This involves shuffling around how locale changes are done but as my new
design document says the "controller also manages the relationship
between the outside world and the model and views" this does make things
more consistent.
2019-05-10 09:44:01 +12:00
Dimitri John Ledkov
fee6fe6947
netplan.Config().config should initialize to a dict
...
Normally netplan.Config().config is a dict as produced by
yaml.safe_load(). However, on systems without any netplan configs that
is not true. The subiquity code that calls into this function expects
.config to be a dictionary. When it's not
subiquitycore/models/network.py produces traceback that "list does not
have get method" when trying to get 'network' key.
2019-05-02 15:22:23 +01:00
Michael Hudson-Doyle
6a72b229b1
try probing for blockdev only if probing fails; report failure to user
2019-04-29 15:58:19 +12:00
Michael Hudson-Doyle
e8423acd28
do storage probing in the background
2019-04-29 15:54:47 +12:00
Michael Hudson-Doyle
3e8bc81190
add some logging around moving between screens
...
my best guess at why CI is currently hanging sometimes is that the
'next-screen' signal is being sent too often / too early. add some
logging around this so that we will be able to confirm / deny this by
reading the logs.
2019-04-18 10:22:05 +12:00
Dimitri John Ledkov
488f6fd2c0
Lock answers file.
2019-04-12 17:36:12 +01:00
Michael Hudson-Doyle
7cc56a8b58
trying to debug edge ci failures
...
* add a bit more logging
* wait for initial network apply to finish before moving on from
network screen
2019-04-04 12:06:41 +13:00
Michael Hudson-Doyle
ec15929d60
Update to probert tip
...
The minimum required: it still only looks at the "blockdev" key in the
probe data, none of the exciting new stuff.
2019-04-02 13:43:09 +13: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
594db86618
have DownNetworkDevices do its work in a background thread
...
not that it should block, but no reason not to
2019-03-26 10:57:13 +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
680da7d299
rename/redefine default route waiter to watcher
...
the callbacks now get called whenever the set of default routes changes,
not just when one appears
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
bc1a1e7fe6
fix Signal.register to accommodate strange urwid behaviour
2019-03-14 09:55:03 +13:00
Michael Hudson-Doyle
b169d35316
display any error received when checking for updates
2019-03-12 11:49:03 +13:00
Michael Hudson-Doyle
b91c961165
implement screens up to the point of offering the update
...
don't display anything about check failures yet, or actually allow the
user to start the update
2019-03-12 11:49:03 +13:00
Michael Hudson-Doyle
9aea579027
support a controller being shown more than once
2019-03-12 11:48:58 +13:00
Michael Hudson-Doyle
a888ed222c
kick off snap list when a default route appears, not at startup
...
of course in the common case these are more or less the same time. but
this is conceptually nicer
2019-03-07 15:46:40 +13:00
Michael Hudson-Doyle
a51f04b02c
start network probing after all signals have been connected
2019-03-07 15:31:39 +13:00
Michael Hudson-Doyle
6e077ef457
move code for configuring snapd proxy out of snaplist controller
2019-03-07 15:18:34 +13:00
Michael Hudson-Doyle
1c5ce7c07a
remove no-longer-used code for stacking signals
2019-03-07 14:22:50 +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
9937ebe6e1
add a more systematic way for controllers to record their state
...
so we can return the point where the user left off on update
2019-03-06 15:55:15 +13:00
Michael Hudson-Doyle
98bf6a4254
add a way for a controller to be skipped
...
will need this for the refresh screen if there is no update
2019-03-06 15:32:31 +13:00
Michael Hudson-Doyle
53d1006a06
Make the code for talking to snapd more generic
...
In preparation for the self-refresh and snap enterprise proxy work, both
of which will require talking to the snapd API.
This also makes the "snaps-from-examples" fakery happen at a lower level.
2019-03-04 16:18:57 +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
b77aa9499e
make sure all delays during replaying answers repsect SUBIQUITY_REPLAY_TIMESCALE
2019-02-21 11:07:54 +01:00
Michael Hudson-Doyle
bc755cc953
fix a race condition in network answers support
2019-02-21 09:32:45 +01:00
Michael Hudson-Doyle
c571f58dcc
fix saving static network data with search domains
2019-02-21 08:35:19 +01: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
aebb0b2e2e
fill identity fields if you go back to that form
2018-12-13 14:49:55 +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
Dimitri John Ledkov
0d35fa613c
core: special case s390x vt220 console on /dev/ttysclp0, as it supports colors.
2018-11-23 01:24:34 +00:00
Michael Hudson-Doyle
bee1109a2d
Much more fine grained answers support for networking.
2018-10-31 09:59:31 +13:00
Michael Hudson-Doyle
5f8e3dc2a4
do not call next-screen from a background thread
2018-10-31 09:58:58 +13:00
Michael Hudson-Doyle
09bbe3ff19
Do not call the default route waiter repeatedly.
...
This can crash when multiple interfaces get routes.
2018-10-31 09:58:58 +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
f19a453e0e
mark interfaces that have dhcp enabled but did not get an address as optional
2018-07-12 14:17:20 +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
88b64ca7fd
Fix up bond netplan.
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
c21cec6fdc
fix logic around waiting for udev to settle to avoid busy loop
2018-07-11 09:41:56 +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
Michael Hudson-Doyle
db042eafa6
read vlan config from netlink
...
using support i just added to probert
2018-07-08 14:16:22 +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
Dimitri John Ledkov
173eac79a5
models/network: use same NetDev in both dictionaries
...
One can lookup interfaces by ifindex and by name. Ensure, both
dictionaries use the same NetDev object. This way, when config of
NetDev is updated, it is correctly reflected whichever way the NetDev
is accessed.
2018-07-06 14:30: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
7aac188a4b
grey out the background widget when an overlay is showing
2018-07-04 15:53:47 +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