Michael Hudson-Doyle
f6757af8d1
fix restarting after refresh
2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle
f5f8a8a75c
import the controllers module explicitly
2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle
ccd8c2382e
split urwid-using bits out of subiquitycore.core.Application
2020-08-23 23:18:26 +12:00
Michael Hudson-Doyle
bc1060eefa
make ControllerSet more re-usable
2020-08-23 22:59:39 +12:00
Michael Hudson-Doyle
63f5f57f30
Merge pull request #804 from mwhudson/screen-refactor
...
Move the code for setting up the screen to its own file
2020-08-23 22:43:42 +12:00
Tsunghan Liu (Robert Liu)
e798451c27
Ignore CAN and unknown interfaces (LP: #1890397 )
...
Add CAN and unknown interfaces to NETDEV_IGNORED_IFACE_TYPES, otherwise rander_config() will throw a KeyError exception when a unsupported interface shows up.
2020-08-07 21:04:05 +08:00
Michael Hudson-Doyle
210cdcb51b
Move the code for setting up the screen to its own file
...
Looking at this code thinking about the coming client / server split
made me realise that we could start by at least moving this
functionality to a more encapsulated place.
2020-07-27 23:40:17 +12:00
Michael Hudson-Doyle
6b26b668be
fix formatting of error message
2020-07-22 12:27:04 +12:00
Michael Hudson-Doyle
9271f17dd2
move subiquity.snapd to subiquitycore.snapd
2020-07-02 12:56:49 +12:00
Michael Hudson-Doyle
97b5c64805
do not crash in NetworkController._data_ready if ui.body is not a widgetwrap
...
for https://bugs.launchpad.net/subiquity/+bug/1881887
2020-06-12 15:01:58 +12:00
Michael Hudson-Doyle
a9dd3757f1
Merge pull request #761 from mwhudson/still-better-i18n
...
more work towards being able to provide good translations
2020-05-21 12:38:51 +12:00
Michael Hudson-Doyle
3e881df107
Merge pull request #778 from mwhudson/ascii-toggle
...
start in a super basic mode on serial, offer upgrade immediately
2020-05-21 12:05:47 +12:00
Dimitri John Ledkov
e2fe2a0693
Merge pull request #773 from xnox/snap-create-user-error
...
console_conf: fix showing error messages, when snap create-user fails
2020-05-21 01:02:31 +01:00
Michael Hudson-Doyle
0d267b320e
only allow downgrading color/ascii experience on serial
...
and collapse ascii/color choice to a single 'rich' toggle
2020-05-21 11:41:16 +12:00
Michael Hudson-Doyle
7bcfcba99b
Merge branch 'master' into still-better-i18n
2020-05-21 11:15:32 +12:00
Michael Hudson-Doyle
b85f8118b7
update the network view when wlan dialod is saved
2020-05-19 11:53:03 +12:00
Michael Hudson-Doyle
c523e21c34
update wlan dialog when scan results come in
2020-05-19 11:53:03 +12:00
Michael Hudson-Doyle
7236771d2f
correctly enable dhcp4 when configuring a ssid for a wlan interface
2020-05-19 11:53:03 +12:00
Michael Hudson-Doyle
acd6ee0032
Merge pull request #775 from mwhudson/logged-passwords-lp-1879381
...
do not log wifi passwords from existing configs
2020-05-19 11:25:44 +12:00
Michael Hudson-Doyle
e588d6475f
do not log wifi passwords from existing configs
2020-05-19 07:47:33 +12:00
Dimitri John Ledkov
debc34cb3c
Fix typo
2020-05-18 19:59:47 +01:00
Dimitri John Ledkov
6de8970560
console_conf: fix showing error messages, when snap create-user fails
2020-05-18 12:42:14 +01:00
Dimitri John Ledkov
da1477ba01
network: fix wifi screen
...
WiFi screen was broken since NetDev refactor. Unbreak it.
2020-05-18 12:00:42 +01:00
Michael Hudson-Doyle
812f33cab6
default to setting up LVM in guided storage screen
2020-05-13 16:34:35 +12:00
Michael Hudson-Doyle
24abf5dd4e
fix some lint found by new version of flake8
2020-05-12 10:41:54 +12:00
Michael Hudson-Doyle
a05b030085
fix lint
2020-05-08 15:44:07 +12:00
Michael Hudson-Doyle
21ed91d7d3
add comments, contexts for some translatable strings
...
from scanning though about one third of subiquity.pot
2020-05-08 15:40:59 +12:00
Michael Hudson-Doyle
59c47254e7
use pgettext in one place, add support for extracting it
2020-05-08 15:13:15 +12:00
Michael Hudson-Doyle
33bdc90780
copy gettext.py from python 3.8 and use it
2020-05-08 15:09:46 +12:00
Michael Hudson-Doyle
3060a03bd6
make some things slightly better
2020-05-08 15:06:24 +12:00
Michael Hudson-Doyle
2d65fe4f16
attempt to make providing a good translation easier
...
* annotate a few missed string literals with _()
* try to consistently use named placeholders when formatting strings
for display (i.e. _("frob the {thing}") not _("frob the {}")
* run selector values, form captions and form help through _() before
display
* use ngettext in one place. not sure if there need to be more...
* reduce cuteness about how strings are constructed in a few places
2020-05-06 21:16:24 +12:00
Michael Hudson-Doyle
4e3996f3f8
improve with_context helper a bit, use it more
...
the decorated function must now be called with keyword arguments
2020-05-05 16:20:03 +12:00
Michael Hudson-Doyle
4891d76aca
actually write the netplan from the autoinstall config to the target system
...
I got lost in a forest of similarly named methods :(
2020-05-04 19:37:43 +12:00
Michael Hudson-Doyle
bc37b2c628
add a helper to make it easier to next contexts appropriately
...
i want this to help debug another branch i am working on!
2020-05-04 18:44:47 +12:00
Michael Hudson-Doyle
d15e5f25fa
remove mistakenly added backup files
2020-05-01 13:45:59 +12:00
Michael Hudson-Doyle
5dc2895481
add the ability to remove a particular overlay, not just the top one
2020-05-01 12:46:45 +12:00
Michael Hudson-Doyle
7e9c1412b9
introduce and use a state_path helper for finding things in /run
2020-05-01 09:58:06 +12:00
Michael Hudson-Doyle
37a62f21aa
fix travis some more
2020-04-30 20:56:09 +12:00
Michael Hudson-Doyle
b66ad552f8
make default_netplan valid, for some reason this causes issues sometimes on travis
2020-04-30 20:25:14 +12:00
Michael Hudson-Doyle
6007b4dc41
do not crash in a terminal < 76 columns wide
...
for https://bugs.launchpad.net/ubuntu-z-systems/+bug/1874314
2020-04-28 21:32:46 +12:00
Michael Hudson-Doyle
88165ce5fd
use a cleaner way of attaching controllers to contexts
2020-04-24 14:45:20 +12:00
Michael Hudson-Doyle
9ff059eae7
put zdev rows directly in a listbox, not in a pile in a listbox
...
this required adding TableListRow.set_contents.
it fixes (partly by accident) a crash when a row becomes unselectable
after a refresh (https://bugs.launchpad.net/subiquity/+bug/1874114 ), it
also makes the home and end keys do something sane.
really this view should not rebuild every row on any change, but that's
something for another day.
2020-04-22 15:36:06 +12:00
Dimitri John Ledkov
760fbaa22f
Review comments
2020-04-16 00:22:52 +01:00
Dimitri John Ledkov
a70d309f6a
Use common palette.
...
Fixes header frindge colors in console-conf.
2020-04-09 12:20:16 +01:00
Dimitri John Ledkov
f3b1a70822
Merge pull request #692 from bboozzoo/bboozzoo/chooser-tweaks
...
console_conf: various recover chooser tweaks
2020-04-09 10:59:39 +01:00
Maciej Borzecki
a33a477324
subiquitycore/core: fix typo in comments
...
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-04-07 15:35:47 +02:00
Michael Hudson-Doyle
9a11e90719
attach a controller to most contexts
2020-04-07 21:51:11 +12:00
Michael Hudson-Doyle
246570314a
pass the context object to report_start_event / report_finish_event
2020-04-07 21:51:11 +12:00
Michael Hudson-Doyle
81b6f8a90a
if netplan apply fails show an error rather than crashing the ui
2020-04-07 12:16:53 +12:00
Michael Hudson-Doyle
00e33ae0e1
include ssh host key details in ssh help
2020-04-06 14:10:26 +12:00
Michael Hudson-Doyle
4101440814
a bigger hammer
2020-04-03 13:47:29 +13:00
Michael Hudson-Doyle
fa476d54cc
treat virtual network devices a bit more like physical ones
...
in particular: have subiquitycore.netplan understand them. The goal of
all this is to make the recent change to not delete virtual interfaces
if their configuration has not changed actually work.
2020-04-03 10:12:42 +13:00
Maciej Borzecki
9bcf507b7c
subiquitycore: do not assume that stdin is /proc/self/fd/0
...
The KeyCodesFilter assumed that /proc/self/fd/0 is actual stdin and proceeded to
toy with that fd. This broke the recovery mode chooser where console-conf is fed
a list of recovery systems over stdin. The `sys.stdin` is already correctly
updated to use the real tty and that should be used elsewhere instead of
hardcoding the fd number.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-04-02 13:08:16 +02:00
Michael Hudson-Doyle
a03a336bd7
translate concurrent.futures.CancelledError to asyncio.CancelledError
...
apparently cancelling something that is running in a thread leads to a different
exception class being raised...
2020-04-02 12:15:06 +13:00
Dimitri John Ledkov
590b4b8f23
Merge pull request #655 from bboozzoo/bboozzoo/uc20-recovery-chooser
...
console_conf: implement UC20 recovery chooser
2020-04-01 22:05:30 +01:00
Michael Hudson-Doyle
cab565304a
write netplan directly to the target
...
rather than via curtin and then cloud-init
2020-04-01 19:37:02 +13:00
Maciej Borzecki
93ac6b94a3
Merge remote-tracking branch 'upstream/master' into bboozzoo/uc20-recovery-chooser
2020-03-31 17:14:28 +02:00
Michael Hudson-Doyle
d717375d9c
apply network autoinstall config
2020-03-31 15:58:18 +13:00
Dimitri John Ledkov
d97bf081ea
Only delete virtual devices when config has changed
2020-03-26 21:26:34 +00:00
Maciej Borzecki
5d77d71499
subiquitycore: allow overriding input/output when creating screens
...
The interaction with snap-recovery-chooser happens over stdin/stdout. The early
setup code in console-conf will attempt to restore sys.stdin/sys.stdout and hook
them up to the current tty.
The patch allows passing input/output streams explicitly as parameters to the
constructors.
Also, default to sys.stdin/sys.stdout and pass both streams explicitly when
constructing urwid.raw_display.Screen(), to workaround the bug in their
constructor. THe constructor is defined as follows:
class Screen(BaseScreen, RealTerminal):
def __init__(self, input=sys.stdin, output=sys.stdout):
What means, that even if we override sys.stdout/sys.stdin globally in our setup
code, this will have no effect as `input` and `output` already got their values.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 13:32:52 +01:00
Michael Hudson-Doyle
3856a11186
fix deleting virtual network devices
2020-03-20 09:18:25 +13:00
Michael Hudson-Doyle
cc52bb62a5
fix enabling dhcp on a virtual interface
2020-03-20 09:17:29 +13:00
Michael Hudson-Doyle
7596e63a9f
pass **kw args to arun_command in run_command_in_foreground
...
this makes the debug shell run in / rather than /snap/subiquity/whatever
2020-03-17 12:23:06 +13:00
Michael Hudson-Doyle
b4ab4d8f1b
Only mark definitively seen screens as configured.
...
Mark a screen as configured if:
- last-screen is present
- the screen was before the screen last-screen indicates
2020-03-16 16:37:25 +13:00
Michael Hudson-Doyle
94611c58e2
remove last-screen file before restarting or exiting
...
unless we are restarting because of a snap refresh.
ths lead to all kinds of confusion after e.g. a ui crash after a snap refresh
2020-03-16 16:37:16 +13:00
Michael Hudson-Doyle
99218fbeb4
support early and late commands
2020-02-04 14:03:59 +13:00
Michael Hudson-Doyle
963cbaaafe
refactor how subiquity is exited after install
...
if we want to do things after install has completed (e.g.: run late
commands), we can't have the code that runs the install invoking
/sbin/reboot directly.
2019-12-20 13:54:34 +13:00
Michael Hudson-Doyle
f925c3fa2a
Merge pull request #622 from mwhudson/make_screen-method
...
make screen behaviour more configurable
2019-12-20 13:09:57 +13:00
Michael Hudson-Doyle
a40082a29b
Merge pull request #621 from mwhudson/controller-set-tweaks
...
tweak ControllerSet
2019-12-20 13:01:04 +13:00
Michael Hudson-Doyle
78d59de8c6
only call setraw if the screen is talking to a tty
2019-12-20 12:48:27 +13:00
Michael Hudson-Doyle
039b5313c4
move make_screen into a method
2019-12-20 12:47:37 +13:00
Michael Hudson-Doyle
ab6fdeb1b5
tweak ControllerSet
...
* add a way to load just one controller
* fetch the RepeatedController class from a projet specific location
neither used yet, but soon
2019-12-20 12:43:42 +13:00
Michael Hudson-Doyle
cb52ab75a2
use the asyncio loop object rather than the urwid loop almost everywhere
2019-12-20 12:04:38 +13:00
Michael Hudson-Doyle
cfc38e1c1b
make all subiquity controllers used inherit from SubiquityController
...
There is going to be a chunk of subiquity specific functionality coming
for autoinstalls, this gives us somewhere to put it.
2019-12-20 11:41:12 +13:00
Michael Hudson-Doyle
570472315d
Add SingleInstanceTask.wait
...
this can be called without having to worry about the task being
cancelled out from under you
2019-12-20 11:00:46 +13:00
Michael Hudson-Doyle
45478b68a4
add a way to change the default level of a context's children
2019-12-20 09:47:38 +13:00
Michael Hudson-Doyle
a91dff2b14
add a way to log a dialog open/close, use it for network dialogs
2019-12-20 09:47:38 +13:00
Michael Hudson-Doyle
4be25fc78f
log applying network config via context
2019-12-20 09:47:36 +13:00
Michael Hudson-Doyle
1f1937b03f
report progress through screens via context
2019-12-20 09:46:26 +13:00
Michael Hudson-Doyle
fa39f10651
fix answers
2019-12-20 09:46:26 +13:00
Michael Hudson-Doyle
5961b68b7d
introduce a Context object for logging start/stop events
2019-12-20 09:46:26 +13:00
Michael Hudson-Doyle
0c268f6c22
fix case where NIC does not get DHCP address
2019-12-19 16:06:56 +13:00
Dimitri John Ledkov
904c0e3179
Merge pull request #613 from mwhudson/model-events
...
stop using urwid signals to coordinate installation
2019-12-17 02:11:32 +00:00
Michael Hudson-Doyle
ca1635a1f9
a bit of refactoring
2019-12-17 15:05:17 +13:00
Dimitri John Ledkov
dce0f10c10
Merge guided method & disk selection into one screen. ( #588 )
...
Merge guided method & disk selection into one screen.
2019-12-17 12:59:03 +13:00
Michael Hudson-Doyle
29c9f0878b
indent a "raise" properly
2019-12-17 11:28:42 +13:00
Dimitri John Ledkov
4bcb0e5fd1
Merge pull request #609 from mwhudson/less-signalling
...
stop some pointless use of urwid signals
2019-12-16 19:38:45 +00:00
Dimitri John Ledkov
42343d665f
Merge pull request #601 from mwhudson/more-async-refresh
...
make the refresh view code use asyncio apis
2019-12-16 12:33:22 +00:00
Dimitri John Ledkov
c067e5e741
Merge pull request #606 from mwhudson/prober-fail-lower
...
push debug_flag block probe crashing into Prober
2019-12-16 12:27:16 +00:00
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