Michael Hudson-Doyle
7093006711
fix binding more than two tables
2018-06-21 20:48:08 +12:00
Michael Hudson-Doyle
88e23fce54
fix distribution of space when widening columns to accommodate a colspan>1 column
2018-06-21 16:07:00 +12:00
Michael Hudson-Doyle
f09696862a
add a column option to allow a column to take available space
2018-06-21 16:07:00 +12:00
Michael Hudson-Doyle
8eb21bce72
split Table into TablePile and TableListBox
...
and get rid of that confusing container_maker thing
2018-06-21 16:07:00 +12:00
Michael Hudson-Doyle
119f40b72d
Merge pull request #369 from mwhudson/form-simplify
...
simplify the way forms are turned into widgets
2018-06-21 16:06:47 +12:00
Michael Hudson-Doyle
f037ebd586
add lost_focus/gained_focus to our WidgetWrap
2018-06-21 15:39:14 +12:00
Michael Hudson-Doyle
99dd12f870
simplify how forms are built
2018-06-21 15:38:02 +12:00
Michael Hudson-Doyle
ed86028dd2
provide a way for a field to opt out of default styling
2018-06-21 15:37:19 +12:00
Michael Hudson-Doyle
19d43c19c7
make field an ABC
2018-06-21 15:37:19 +12:00
Michael Hudson-Doyle
ba809a9e97
simplify how form widgets get styled
2018-06-21 15:37:19 +12:00
Michael Hudson-Doyle
59da0e717b
make Toggleable simpler and more robust
2018-06-21 15:37:15 +12:00
Michael Hudson-Doyle
eee758d382
update STYLE_NAMES to match the styles that are currently defined
2018-06-21 12:09:40 +12:00
Michael Hudson-Doyle
76835c40ab
sort STYLE_NAMES constructor
2018-06-21 12:09:40 +12:00
Michael Hudson-Doyle
8680786da3
make inputs on keyboard and welcome page of consistent width
2018-06-20 09:17:49 +12:00
Michael Hudson-Doyle
9e33874a86
Merge pull request #366 from mwhudson/mwhudson/scrollbar-tweaks
...
make scrollbar less intrusive
2018-06-20 08:47:56 +12:00
Michael Hudson-Doyle
68c49e5135
add some super basic filesystem tests, fix partition tests
2018-06-19 11:43:59 +12:00
Michael Hudson-Doyle
de80a06f47
add actionmenu widget
2018-06-18 21:36:35 +12:00
Michael Hudson-Doyle
c0d66f5540
make scrollbar less intrusive
...
also pretty up its implementation a bit while I am here
2018-06-18 21:24:23 +12:00
Michael Hudson-Doyle
14ad092b9d
implement _select_first/last_selectable on our Columns
2018-06-15 12:26:02 +12:00
Michael Hudson-Doyle
3a59925265
work around a strange behaviour of Pile when contents is changed
2018-06-15 11:51:40 +12:00
Michael Hudson-Doyle
66578aff79
account for colspan>1 cells in width computations
...
I ran into that gotcha pretty quickly.
2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle
b34ca65aba
a slightly over-engineered table widget
...
that takes column widths from the contens of the cells, unlike
most things in urwid
2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle
2f184ce9a6
fix display of install progress in footer
2018-06-13 14:02:40 +12:00
Michael Hudson-Doyle
1ab495c0a8
fix refreshing network view on network changes
2018-06-13 13:38:03 +12:00
Michael Hudson-Doyle
d315751d60
add our own version of WidgetWrap
...
urwid doesn't know about the _select_first/last_selectable methods our
containers use to make tab-cycling work so its WidgetWrap doesn't
forward them along. So add a WidgetWrap that does, and use it in the one
place that it matters so far (more coming soon!).
2018-06-11 14:13:44 +12:00
Scott Moser
3e69673501
Fix writing of netplan configs
...
When user configures network with subiquity, it's rendered
netplan should be wholly definitive. So, we remove the other files
that may have config. This fixes a bug where running in an instance
when running on a system where cloud-init had rendered a 'match' with
'macaddress'.
When writing netplan we keep 'macaddress' match in place but drop
others. The others may just wildcard from the installer environment,
but macaddress are likely by cloud-init or otherwise intentionally
written.
Also add an atomic write in subiquitycore/file_util and move the
netplan code into subiquitycore/netplan.py, and add some unit test
helpers from cloud-init.
2018-06-07 11:46:34 -04:00
Michael Hudson-Doyle
270ba0992a
fix selectability in non-scrolling stretchy
2018-06-07 12:50:50 +12:00
Scott Moser
51a7169904
tox: Support running tests and flake8 in tox.
...
This puts into place a tox.ini for running unit tests without
a large amount of deps installed into the system. For example,
we did not want to need libnl-route-3-dev or build-essential installed
in the system in order to run unit tests.
In order avoid import errors in the modules due to these missing
dependencies, we have added a 'fake_deps/' directory that provides
mock'd objects of the dependencies that were used.
The only installed packages necessary for this to run should be
tox itself and its dependencies (pip and friends). From a clean new
container we can then do:
apt-get install tox
git clone ...
tox
Also along the way:
* adjust setup.py to only need the DistUtilsExtra during 'build'.
This means tox usage doesn't require python3-distutils-extra.
* drop use of lsb_release in favor of built-in parsing.
This python module wasn't doing much. We can parse /etc/lsb-release
ourselves with less footprint. Also part of the motivation for this
is that lsb_release was not on pypi.
* replace use of StorageInfo in test_partition.py with a FakeStorageInfo
* .gitignore: ignore only the top level 'probert' directory so that
we can track fake_deps/probert.
* fix a couple escape chars, by using raw strings (r'').
* adjust gettext to return un-modified strings rather than '_(string)',
but support old style if FAKE_TRANSLATE=mangle.
2018-06-05 17:59:46 -04:00
Michael Hudson-Doyle
eab0f668ff
use general machinery a little more
2018-05-31 10:28:29 +12:00
Michael Hudson-Doyle
ed5e1d86b5
fix lint
2018-05-25 10:43:55 +12:00
Ryan Harper
053a1c249d
pyflakes3 fixes for subiquitycore/__init__.py
2018-05-24 16:59:31 -05:00
Ryan Harper
d7c8b1111b
pep8 fixes for subiquitycore/core.py
2018-05-24 16:59:31 -05:00
Ryan Harper
d293c52152
pep8 fixes for subiquitycore/tasksequence.py
2018-05-24 16:59:31 -05:00
Ryan Harper
4c1b6e6fc9
pep8 fixes for subiquitycore/ui/buttons.py
2018-05-24 16:59:31 -05:00
Ryan Harper
080ac4c245
pep8 fixes for subiquitycore/ui/form.py
2018-05-24 16:59:31 -05:00
Ryan Harper
5b666294e5
pep8 fixes for subiquitycore/ui/utils.py
2018-05-24 16:59:31 -05:00
Ryan Harper
7dba257b3c
Drop mis-merged code from rebase
2018-05-24 16:59:31 -05:00
Ryan Harper
09d7398ec6
pep8 fixes for subiquitycore/__init__.py
2018-05-24 16:54:02 -05:00
Ryan Harper
5f233be9b1
pep8 fixes for subiquitycore/ui/views/network.py
2018-05-24 16:54:02 -05:00
Ryan Harper
c908115ee0
pep8 fixes for subiquitycore/ui/views/network_configure_manual_interface.py
2018-05-24 16:54:02 -05:00
Ryan Harper
c4c614860a
pep8 fix drop commented code in subiquitycore/controllers/network.py
2018-05-24 16:54:02 -05:00
Ryan Harper
5660d72cf1
pep8 fixes for subiquitycore/controller.py
2018-05-24 16:51:51 -05:00
Ryan Harper
9159cd0003
pep8 fixes for subiquitycore/core.py
2018-05-24 16:51:51 -05:00
Ryan Harper
dcc0cbc240
pep8 fixes for subiquitycore/i18n.py
2018-05-24 16:51:51 -05:00
Ryan Harper
02cbd2948c
pep8 fixes for subiquitycore/prober.py
2018-05-24 16:51:51 -05:00
Ryan Harper
bad0e9761f
pep8 fixes for subiquitycore/tasksequence.py
2018-05-24 16:51:51 -05:00
Ryan Harper
b328c3deed
pep8 fixes for subiquitycore/utils.py
2018-05-24 16:51:51 -05:00
Ryan Harper
cfc2c9d227
pep8 fixes for subiquitycore/view.py
2018-05-24 16:51:51 -05:00
Ryan Harper
69331754d9
pep8 fixes for subiquitycore/ui/anchors.py
2018-05-24 16:51:51 -05:00
Ryan Harper
df5ff9d48e
pep8 fixes for subiquitycore/ui/buttons.py
2018-05-24 16:51:51 -05:00
Ryan Harper
860edbc7b5
pep8 fixes for subiquitycore/ui/container.py
2018-05-24 16:51:51 -05:00
Ryan Harper
2d6cca8281
pep8 fixes for subiquitycore/ui/frame.py
2018-05-24 16:51:51 -05:00
Ryan Harper
7cbf8c2b69
pep8 fixes for subiquitycore/ui/form.py
2018-05-24 16:51:51 -05:00
Ryan Harper
4890d306fc
pep8 fixes subiquitycore/ui/selector.py
2018-05-24 16:51:51 -05:00
Ryan Harper
762f5f3008
pep8 fixes for subiquitycore/ui/stretchy.py
2018-05-24 16:51:51 -05:00
Ryan Harper
18406b70ef
pep8 fixes for subiquitycore/ui/utils.py
2018-05-24 16:51:51 -05:00
Ryan Harper
c99941f3c5
pep8 fixes for subiquitycore/ui/views/login.py
2018-05-24 16:51:51 -05:00
Ryan Harper
62ea440b3d
pep8 fixes for subiquitycore/ui/views/network.py
2018-05-24 16:51:51 -05:00
Ryan Harper
0fa5dcab28
pep8 fixes
2018-05-24 16:51:51 -05:00
Ryan Harper
c8d4c51ddd
pep8 fixes
2018-05-24 16:51:51 -05:00
Ryan Harper
ae9412159d
Don't use __name__ in getLogger
2018-05-24 16:51:51 -05:00
Ryan Harper
13ca352291
pep8 fixes for subiquitycore/ui/views/network_configure_wlan_interface.py
2018-05-24 16:51:51 -05:00
Ryan Harper
591be4ecbc
pep8 fixes for subiquitycore.ui.views.network_default_route
2018-05-24 16:51:51 -05:00
Ryan Harper
45fabd78f2
pep8 fixes for subiquitycore.ui.views.tests.test_network_configure_manual_interface
2018-05-24 16:51:51 -05:00
Ryan Harper
f2715a4735
pep8 fixes for subiquitycore.controllers.network
2018-05-24 16:51:51 -05:00
Ryan Harper
b7e60f7b91
pep8 fixes for subiquitycore.testing.view_hewlpers
2018-05-24 16:51:51 -05:00
Ryan Harper
40caacaca3
pep8 fixes for subiquitycore.models.network
2018-05-24 16:51:51 -05:00
Ryan Harper
a0bf68f3c4
pyflakes3 fixes
...
Add and enable pyflakes3 on console_conf, subiquity, subiquitycore and tests.
Replace NOQA markers with __all__ declarations for module imports.
Replace some obvious deadcode that voilates flake8, separate pass for removing
dead code rather than commenting will be handled later.
2018-05-24 16:51:51 -05:00
Michael Hudson-Doyle
bd48ed9b1d
remove SimpleList
...
and the Body widget, both utterly trivial
2018-05-25 09:35:25 +12:00
Ryan Harper
3c9b2e28c7
Drop commented out / dead code
2018-05-23 18:53:12 -05:00
Michael Hudson-Doyle
0fe1f5145c
sprinkle in some more ".base_widget"s
2018-05-23 13:40:14 +12:00
Michael Hudson-Doyle
7441cb6df6
convert ScrollBarListBox to decoration rather than subclass
...
for all the usual reasons why composition is better than inheritance,
but in particular because I want to have a listbox that has a scrollbar
but not our custom tab behaviour in another branch. decoration in urwid
is not as transparent as it sometimes seems it should be but luckily
there's only one view that does much with its listbox and it was due
for some cleanup anyway.
2018-05-23 13:14:00 +12:00
Michael Hudson-Doyle
626488e988
Merge pull request #334 from CanonicalLtd/mwhudson/move-excerpt-title-to-view
...
move excerpt, title and footer from controller to view
2018-05-22 22:38:39 +12:00
Ryan Harper
a84dd2b272
Encoding input when running commands
2018-05-21 13:35:26 -05:00
Ryan Harper
74ae9b9fde
Drop use of encoding kwarg to subprocess for python3.5 compat
2018-05-21 11:54:34 -05:00
Michael Hudson-Doyle
79208bc00b
trap a TaskSequence gotcha
2018-05-21 13:09:56 +12:00
Michael Hudson-Doyle
70ec850aad
Merge pull request #336 from CanonicalLtd/mwhudson/hack-ThreadPoolExecutor
...
hack to stop ThreadPoolExecutor blocking exit
2018-05-21 11:59:12 +12:00
Michael Hudson-Doyle
384dadc5ed
hack to stop ThreadPoolExecutor blocking exit
2018-05-21 11:58:10 +12:00
Michael Hudson-Doyle
f6f214125f
move TaskSequence somewhere more generic
...
I want to reuse it in my containerizing branch.
Improve API and docs a bit while I am looking at it.
2018-05-21 11:52:06 +12:00
Michael Hudson-Doyle
cbd5afe2c0
move imports of i18n higher so _ is always installed before tests are imported
2018-05-21 10:14:34 +12:00
Michael Hudson-Doyle
ac875751fb
fix installprogress
2018-05-18 16:27:05 +12:00
Michael Hudson-Doyle
11708703c9
move titles, footers, excerpts from controller to view
...
read title and footer from the view instance, make views respsonsible for rendering
the excerpt
adapts infrastructure, welcome, keyboard, network views
2018-05-18 15:55:49 +12:00
Michael Hudson-Doyle
80fffc723c
some self review
2018-05-18 13:53:51 +12:00
Michael Hudson-Doyle
7df7a4c1fa
fetch ssh keys in the identity screen, all a bit happy path though
2018-05-18 13:53:51 +12:00
Michael Hudson-Doyle
bdf3861e5c
some simplifications
2018-05-18 13:53:51 +12:00
Michael Hudson-Doyle
3d5efcaf9c
actually pass new defaults to run, oops
2018-05-18 13:53:25 +12:00
Michael Hudson-Doyle
1e4992a5e7
stop testing on xenial, we depend on python 3.6 now
2018-05-18 13:38:13 +12:00
Michael Hudson-Doyle
cb61144144
small tweaks
2018-05-18 13:21:38 +12:00
Michael Hudson-Doyle
488802fc8b
update users of run_command (i thought there was more than this)
2018-05-18 13:11:15 +12:00
Michael Hudson-Doyle
c6468982ae
Thin the wrappers around subprocess functions
...
Some of this stuff is not needed with modern Python.
Breaks everything of course, updates to follow.
2018-05-18 13:00:43 +12:00
Michael Hudson-Doyle
35c08f1d6f
up thread pool limit
...
otherwise we can only do one thing at once! many of the things
we do in the background do not really require an OS thread but oh well
2018-05-18 12:33:25 +12:00
Michael Hudson-Doyle
ad9f10a9ac
try to ensure that functions run in the background have "_bg_" in their name
2018-05-18 12:29:42 +12:00
Michael Hudson-Doyle
1efa265fc5
remove calls to set_alarm_in that were only there so that exceptions raised would be propagated
2018-05-18 12:25:47 +12:00
Michael Hudson-Doyle
03392a208d
stop swallowing exceptions raised by the callback passed to run_in_bg
...
it is just more confusing that it is worth, especially when doing
development
2018-05-18 12:17:18 +12:00
Michael Hudson-Doyle
13d7f13c42
fixes for stretchy where stretchy widget is selectable
2018-05-14 10:28:33 +12:00
Michael Hudson-Doyle
960f51ca91
remove view argument to Form.as_rows and friends
2018-05-07 10:57:35 +12:00
Michael Hudson-Doyle
0a0af0842b
fix stupid crash
2018-05-04 10:31:36 +12:00
Michael Hudson-Doyle
fa8f8d32f5
down all network links that have changed config before applying it
...
this means that if you enter a broken config, it breaks as it should
2018-05-03 12:14:06 +12:00
Michael Hudson-Doyle
92457e5724
Merge pull request #324 from CanonicalLtd/mwhudson/click-helper
...
add --click, --script arguments to subiquity-tui
2018-05-03 11:35:35 +12:00
Michael Hudson-Doyle
1ed27f1848
Merge pull request #322 from CanonicalLtd/mwhudson/no-create-user
...
stop creating the user in the live session
2018-05-01 13:01:08 +12:00
Michael Hudson-Doyle
5a6d0ac90f
a docstring
2018-05-01 13:00:27 +12:00
Michael Hudson-Doyle
acdd3bdec7
refactor a bit
2018-05-01 12:57:03 +12:00
Michael Hudson-Doyle
58d64eb419
over engineered way to delay command-line supplied script invocation
...
use this to allow click helper to wait for a button to appear
2018-05-01 12:49:39 +12:00
Michael Hudson-Doyle
db4d8a537e
add a way to specify actions to take in the UI on the command line
...
--script takes a little python snippet to run in a helpful namespace
--click is a wrapper around --script to click a button
2018-05-01 12:29:29 +12:00
Michael Hudson-Doyle
07438a1049
add support for Frames to find_with_pred in view_helpers
2018-05-01 12:17:53 +12:00
Michael Hudson-Doyle
fe671d8d9b
fix rendering of nic info if dhcp failed but has addresses of other family
...
This bug has been here forever! Oh well.
2018-04-27 14:56:30 +12:00
Michael Hudson-Doyle
dc17fcae4f
stop creating the user in the live session
...
there is no real reason to do this, and it lets me delete some code.
i also cleaned some other stuff up in the area
2018-04-27 14:16:37 +12:00
Michael Hudson-Doyle
7d704f83f0
mark even more strings as translatable
2018-04-19 13:09:00 +12:00
Michael Hudson-Doyle
78e6fea854
work around strange behaviour of _("")
2018-04-19 10:29:08 +12:00
Michael Hudson-Doyle
688a270c17
a round of marking strings as translatable and ensuring translations are actually displayed in the UI
2018-04-19 10:29:08 +12:00
Michael Hudson-Doyle
fdd3fae45a
fix crash on escape key
2018-04-19 09:57:11 +12:00
Michael Hudson-Doyle
2d3d500e34
a couple of tweaks to make more translated strings appear
2018-04-18 20:18:15 +12:00
Michael Hudson-Doyle
6396025964
Merge pull request #315 from CanonicalLtd/mwhudson/scollbar-focus
...
change scrollbar color if focused
2018-04-17 12:57:22 +12:00
Michael Hudson-Doyle
ba041718dc
Merge pull request #316 from CanonicalLtd/mwhudson/stretchy-overlay
...
add an overlay that has nicer resizing behaviour
2018-04-17 12:57:15 +12:00
Michael Hudson-Doyle
7eafa420fb
add show_stretch_overlay, simplify show_overlay
2018-04-17 12:23:11 +12:00
Michael Hudson-Doyle
6a76f8ad02
add a version of Overlay that copes with small and large screens better
...
See the docstring for the long version.
2018-04-17 12:22:00 +12:00
Michael Hudson-Doyle
e041260e2a
change scrollbar color if focused
2018-04-16 23:31:10 +12:00
Michael Hudson-Doyle
5a6ad92239
add some validation to URLEditor
2018-04-12 09:43:02 +12:00
Michael Hudson-Doyle
13eaa5c9dc
add a bare-bones proxy model/view/controller
2018-04-09 15:05:46 +12:00
Michael Hudson-Doyle
028914da97
another small helper
2018-04-09 14:37:26 +12:00
Michael Hudson-Doyle
a723d25a4c
create a helper to create a common screen layout
2018-04-09 14:30:59 +12:00
Michael Hudson-Doyle
0fc83c4bc1
simplify a bunch of views
...
i am slowly getting better at urwid...
2018-04-09 14:10:36 +12:00
Michael Hudson-Doyle
9d9c233dc4
bludgeon urwid into some kind of submissoin
2018-03-26 23:49:04 +13:00
Michael Hudson-Doyle
e61eb454cf
Merge pull request #299 from CanonicalLtd/mwhudson/disable-wifi-server
...
do not show wlan interfaces in server installer
2018-03-21 15:44:55 +13:00
Michael Hudson-Doyle
56c582a0d0
the way subiquity works it is better do consider a Pile selectable if any of its elements are selectable
...
Without this, if a non-selectable thing ends up focused, the net effect is that
all further input is ignored, which is bad.
2018-03-21 11:18:56 +13:00
Michael Hudson-Doyle
0c071f7b0d
form fields should not be validated on entry
2018-03-21 10:39:32 +13:00
Michael Hudson-Doyle
b3da7266b9
do not show wlan interfaces in server installer
2018-03-21 09:35:21 +13:00
Michael Hudson-Doyle
8287d695dc
fix live updates of network screen
2018-03-16 15:30:14 +13:00
Michael Hudson-Doyle
1f937090c0
update help text for address
2018-03-14 14:58:58 +13:00
Michael Hudson-Doyle
59a500c9e5
add more space between form rows, align help to the left
2018-03-14 14:58:58 +13:00
Michael Hudson-Doyle
ca953ea01f
improve scrolling experience
...
Before this change, subiquity has lots of ListBoxes that just contain a single
Pile containing all their contents. This is (a) a bit silly (b) make some parts
of the scrolling experience a bit poor, for example urwid tries to scroll all
of a ListBox element into view when it gets focus but this is defeated by
shoving all the elements into a Pile (this causes
https://bugs.launchpad.net/subiquity/+bug/1750058 and a few other strange
bits).
The fix for this is obvious (don't wrap ListBox elements in a Pile) but this
breaks some aspects of tab cycling (when you shift tab back into a listbox you
want the last element of the box to be both selected and scrolled into view,
that sort of thing). Fixing all these bits of broken behaviour required
rewriting the tab cycling implementation to the point of copy/paste/hack-ing
the Pile.keypress method. Rather than doing the same for Columns, I just
prevent the creation of Columns with more than 1 selectable, which as we want
subiquity to be navigable with up/down/return does not seem so bad.
As penitence for all this, I've added a bunch of commentary explaining what is
going on.
2018-03-14 14:35:27 +13:00
Michael Hudson-Doyle
c57f0057f3
simplifications
2018-03-14 14:20:53 +13:00
Michael Hudson-Doyle
9ba11aedb5
change how ssh import field works
...
This is the only place in subiquity today where we have selectable fields side
by side, which contradicts the goal to be able to navigate subiquity with up,
down and enter keys only. Replace the existing fancy widget with two fields,
one to select the import source and one to enter the username.
Also remove the "Ubuntu SSO" option as that has never worked.
2018-03-14 14:07:03 +13:00
Michael Hudson-Doyle
f77a861c38
pop up a little dialog while the keyboard config is applying
2018-03-13 20:58:33 +13:00
Michael Hudson-Doyle
0656d2b2bc
add a border to all overlays to make them more readable
2018-03-12 14:25:27 +13:00
Michael Hudson-Doyle
d15565bdf1
console_conf does not pass a hostname here
2018-03-08 18:06:34 +13:00
Michael Hudson-Doyle
8d8071de8d
nicer install progress reporting in the footer to start with
2018-02-28 13:49:24 +13:00
Michael Hudson-Doyle
b215ceaf7d
do not log wifi password when an interface appears
...
This can happen in particular when netplan re-plugs an interface.
2018-02-26 22:29:41 +13:00
Michael Hudson-Doyle
4a5e3b3815
stop showing >s on network config choices that do not lead to a new screen
2018-02-20 10:32:51 +13:00
Michael Hudson-Doyle
306978ee79
cursor positioning nerdery on network config screen
2018-02-20 10:29:24 +13:00
Michael Hudson-Doyle
a14b8debda
try different process for exit to shell
2018-02-13 15:38:55 +13:00
Michael Hudson-Doyle
1794ed53dd
implement keyboard selection ( #276 )
...
A new screen immediately after language.
2018-02-08 10:37:22 +13:00
Michael Hudson-Doyle
923df8d0b2
allow forms to override name of cancel button
2018-01-12 12:56:24 +13:00
Michael Hudson-Doyle
124b4e7f20
make the contents of a selector pop up dialog a listbox
...
the one for keyboard layout will need to scroll!
2018-01-12 10:27:44 +13:00
Michael Hudson-Doyle
c9f3bd3ae0
fix behaviour of "up" on views that have done initially focused
...
before this, if you press up on e.g. the network view, focus would go to the first nic
not the last as you might expect. this is pretty obscure but oh well. such is urwid.
2018-01-11 11:50:08 +13:00
Michael Hudson-Doyle
f972119126
beef up partition view tests a bit
2017-12-21 14:41:05 +13:00
Michael Hudson-Doyle
ad9c527b51
touch /run/casper-no-prompt if answers are supplied
2017-12-21 11:40:51 +13:00
Michael Hudson-Doyle
d77b4148ef
expand NetworkConfigureIPv4InterfaceView tests a bit
2017-12-11 09:52:36 +13:00
Michael Hudson-Doyle
67611165df
fix network manual view and add super simple test of it
2017-12-08 09:41:51 +13:00
Michael Hudson-Doyle
956342478a
move subiquity.ui.views.tests.helpers to subiquitycore.testing.view_helpers
2017-12-08 09:28:48 +13:00
Michael Hudson-Doyle
c60d37f275
some testing ideas
2017-11-27 21:51:39 +13:00
Michael Hudson-Doyle
94b4f550e3
update config to match probert changes
2017-11-27 09:54:11 +13:00
Michael Hudson-Doyle
ad95cdd4d7
Merge pull request #255 from CanonicalLtd/vorlon/fix-up-tests
...
fix tests slightly
2017-11-27 09:09:08 +13:00
Michael Hudson-Doyle
54a52015d6
tone down log spam a bit
2017-11-24 12:50:37 +13:00
Michael Hudson-Doyle
c5692c38f4
Merge pull request #271 from CanonicalLtd/mwhudson/colors
...
implement new color scheme from design
2017-11-24 12:13:03 +13:00
Michael Hudson-Doyle
fadd568323
Merge pull request #268 from CanonicalLtd/mwhudson/reorg-config-rendering
...
move curtin config rendering to a method on SubiquityModel
2017-11-24 12:12:37 +13:00
Michael Hudson-Doyle
b5c07497e8
make language and disk selection buttons use the done style
2017-11-24 11:19:01 +13:00
Michael Hudson-Doyle
ba8056768e
update to use colors from design
2017-11-22 14:10:03 +13:00
Michael Hudson-Doyle
c85602527e
stop any of the *_btn functions defining a label by default
2017-11-22 13:53:35 +13:00
Michael Hudson-Doyle
e211f67b72
permit myself one bit of clever code
2017-11-22 12:16:09 +13:00
Michael Hudson-Doyle
ab9e382387
remove some more leftover bits
2017-11-22 12:05:30 +13:00
Michael Hudson-Doyle
20d4e04efd
streamline a bit, add comments
2017-11-22 11:49:20 +13:00
Michael Hudson-Doyle
225a7637ca
move color scaffolding into core
2017-11-22 11:37:49 +13:00
Michael Hudson-Doyle
918a1979b3
stop modifying the xterm palette at all and use ISO 8613 3 codes instead
2017-11-22 11:26:47 +13:00
Michael Hudson-Doyle
cfbc4ffc0c
more precise color rendering in xterm-like terminals
2017-11-21 15:24:07 +13:00
Michael Hudson-Doyle
484239c060
do not move on from network screen inside callback
...
things get super confusing when there is an exception
2017-11-21 11:27:26 +13:00
Michael Hudson-Doyle
36bcc539c3
move curtin config rendering to a method on SubiquityModel
...
this moves to curtin's native netplan support as a side effect
2017-11-20 13:45:58 +13:00
Michael Hudson-Doyle
6919e5ce68
minimal implementation of canned answers
...
this allows automation of the enter-enter-enter flow, not much more than that
2017-11-17 13:25:16 +13:00
Michael Hudson-Doyle
e7afa9b0b3
correct _data_ready call when udev is not settled
2017-11-17 13:24:30 +13:00
Michael Hudson-Doyle
8086d5df81
move to a unified model instance
...
and stop having the controllers construct each model instance for itself
2017-11-16 12:48:20 +13:00
Michael Hudson-Doyle
947a65a3bb
changes following changes in probert
...
the only really visible effect of all this is to make --dry-run
--machine-config foo show the network config from foo, not the machine
running subiquity. (The existing configs won't work, though)
2017-11-15 14:27:24 +13:00
Michael Hudson-Doyle
4d0d48f2f5
add some comments
2017-10-25 21:52:43 +13:00
Michael Hudson-Doyle
94e58a0aaa
reduce padding around overlays
2017-10-25 21:27:31 +13:00
Michael Hudson-Doyle
c0889dfffc
add explicit entries in the palette for scrollbar parts
2017-10-25 21:09:49 +13:00
Michael Hudson-Doyle
3515961ac9
slightly lower level implementation of ScrollBarListBox.render
...
lower level and less reentrant, which is the main advantage
2017-10-25 21:01:03 +13:00
Michael Hudson-Doyle
0b4ae2b1a5
prevent scrollbox from getting squished to 0 rows
2017-10-25 20:50:53 +13:00
Michael Hudson-Doyle
08e51b87ae
move some listboxs inside their padding
2017-10-20 15:51:01 +13:00
Michael Hudson-Doyle
5405abecc3
Add a scrollbar to our custom listbox implementation.
...
It's pretty ugly for now.
2017-10-20 15:47:32 +13:00
Michael Hudson-Doyle
b6a27582c9
redo padding and layout of network views
2017-10-20 14:55:01 +13:00
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
Michael Hudson-Doyle
e77509b4dd
Merge branch 'master' into mwhudson/validation-improvements
2017-10-10 23:13:23 +13:00
Michael Hudson-Doyle
bf85eaf05f
do not overwrite the top 8 colors of the palette with black
2017-10-10 21:58:54 +13:00
Michael Hudson-Doyle
e3aadb195b
add a way to run console-conf or subiquity with a subset of the screens
2017-10-10 09:21:42 +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
aa564b9f6a
ACTUALLY let udev queue settle rather than just pretending to
2017-09-29 08:37:31 -04:00
Michael Hudson-Doyle
3221599cb1
default routes can appear via CHANGE as well as NEW
2017-09-29 08:37:24 -04:00
Michael Hudson-Doyle
393055622c
always super-call route_change
2017-09-29 08:37:19 -04: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
00c4fe935b
Setup orange for fbterm too
2017-09-12 14:28:08 +01: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
7a09db2cd4
ridiculous stuff to show ubuntu orange on the linux tty
2017-09-08 15:59:30 +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
a9de883e0b
tidy up palette definitions a bunch
2017-09-07 21:21:50 +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
ae5fee60c6
Merge pull request #207 from CanonicalLtd/cyphermox/snap
...
Add snapcraft.yaml and some fixes for working as a snap.
2017-04-06 12:40:45 +12:00
Michael Hudson-Doyle
9afd3cbc5a
have escape always remove an overlay view
2017-04-05 15:20:36 +12:00
Michael Hudson-Doyle
b3241d6b15
remove general clever escape handling
2017-04-05 15:16:30 +12:00
Michael Hudson-Doyle
395b30451e
stop being clever in handling of escape in network screens
2017-04-05 14:36:46 +12:00
Mathieu Trudel-Lapierre
d0976cd4da
Merge branch 'master' into cyphermox/snap
2017-03-23 11:49:18 -04: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
Mathieu Trudel-Lapierre
4987e741d7
Merge branch 'master' into cyphermox/snap
2017-03-22 08:58:48 -04: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
32578fb35e
make sure waiting for the default route times out properly
...
see https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1672803
2017-03-21 13:38:35 +13:00
Michael Hudson-Doyle
f1b97508fa
dry-run fix
2017-03-20 15:03:32 +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
3f425c9e05
make the netplan file name and path depend (very slightly) on subiquity vs console-conf
2017-03-16 22:52:05 +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
Mathieu Trudel-Lapierre
3098d108b2
Support special paths for environment check binaries in snaps.
2017-03-06 13:28:44 -05: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
19ec2b5c41
only suggest the user logs in via scope global addresses
2017-02-17 14:21:54 +13:00
Michael Hudson-Doyle
8af0639dd4
cope with probert API changes
2017-02-17 12:37:47 +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
2408dda6c7
remove references to firstboot (an old name for console-conf?)
2017-01-26 11:18:03 +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
78ca3c610f
make disable_subiquity work again
...
this makes selecting "quit installer" at the end of installation work
2017-01-25 14:38:03 +13:00
Michael Hudson-Doyle
58af7dbb3b
add some arrows to dropdown widget
2017-01-20 13:19:16 +13:00
Michael Hudson-Doyle
a4d6682478
simpler api for doing stuff in a background thread
2017-01-18 12:03:56 +13:00
Michael Hudson-Doyle
fa95fb55ad
make callfromthread functionality more available, use it in installprogress
2017-01-18 12:02:34 +13:00
Michael Hudson-Doyle
8ede2d730c
and with that, we no longer depend on tornado
2017-01-18 12:02:34 +13:00
Michael Hudson-Doyle
d75cbabb61
move subiquity welcome stuff out of subiquitycore
2017-01-17 12:04:15 +13:00
Michael Hudson-Doyle
e50ccb9c76
stop sharing WelcomeController
2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle
4e726495c3
move BaseIdentityController to become subiquity's IdentityController
2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle
b80145a99c
simplify some generic view code
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
9cb0c00271
remove some unused code from utils.py
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
ac7e7cd08b
remove BaseModel as it no longer does anything
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
bfba9f21b5
remove unused stuff from log.py
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
6febf16d22
clean up some silly stuff in core.py
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
17b943209e
remove subiquitycore/async.py
...
it was just a glorified global variable.
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
5c40c0eb19
remove meta.py, contains no code
2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle
60c6037a8a
move curtin.py from subiquitycore to subiquity
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
b9a990171c
identity: don't quit after subiquity/subiquitycore identity controller, it should be able to continue to the next screen.
2016-12-22 22:16:15 -05:00
Mathieu Trudel-Lapierre
87b8dc3ccc
Support conditional 'shell=True' calls, required for top's redirection, and not supported in curtin...
2016-12-22 22:15:02 -05:00
Mathieu Trudel-Lapierre
862684efbc
Fix stop calls for subiquity service.
2016-12-22 22:12:03 -05:00
Mathieu Trudel-Lapierre
d9f60688fc
Adapt curtin_install_cmd and run_command_sync calls to API changes in run_command()...
2016-12-22 08:52:21 -05:00
Michael Hudson-Doyle
df800bf8b3
fix header of WIFI config screen
...
See https://bugs.launchpad.net/bugs/1651119
2016-12-22 12:16:39 +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
87eb961586
Re-add get_configured_interfaces() for subiquity.
2016-12-20 15:42:37 -05:00
Mathieu Trudel-Lapierre
449688f9a1
Fix controller ordering and disable step for subiquity
2016-12-20 15:42:04 -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
65daafde05
fix run_command of a non-existent command
2016-11-22 21:31:51 +13:00
Michael Hudson-Doyle
bd9046ae9c
squash some more trivial uses of signals
...
And move the @view decorator and associated methods used by the network
stuff somewhere more general.
2016-11-22 16:09:51 +13:00
Michael Hudson-Doyle
9ba1c8feff
get subiquity to the point where it at least starts
2016-11-21 13:32:58 +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
7bef718e18
re-work logic, including having console-conf generate the file to show
2016-11-09 14:33:58 +13:00
Michael Hudson-Doyle
19081d53bc
reparse netplan configs after writing config
...
'netplan apply' can re-plug network interfaces, so it looked like we
forgot how an interface had been configured
2016-11-09 12:21:06 +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
d48a70973e
restore escape key behaviour
2016-11-02 12:44:04 +13:00
Michael Hudson-Doyle
f9de0818a8
fix C-x
2016-11-02 12:24:06 +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
019b5c4b3e
make properly sure that the wifi password does not get logged
...
Two of these were properly stupid :(
LP: #1636421 (again)
2016-10-28 13:14:05 +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
47af1de57e
remove setting of umask, redact wifi password from log file
...
The setting of umask was breaking configuring wifi :(
2016-10-26 11:02:23 +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
Mathieu Trudel-Lapierre
0ef1ec679b
models/network: move nameservers rendering to the interface rather than being global
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-10-20 15:18:19 -04:00
Michael Hudson-Doyle
7edcf3bcb7
UI for entering name servers/domains
2016-10-20 22:31:10 +13:00
Michael Hudson-Doyle
67f2ee4cda
include nameservers in device config
2016-10-20 21:59:34 +13:00
Michael Hudson-Doyle
262a7a4806
Merge pull request #172 from CanonicalLtd/mwhudson/render-gateway
...
render gateway4/gateway6 in network config
2016-10-20 13:22:25 +13:00
Michael Hudson-Doyle
d594b77f28
do not write the netplan config so the world can see it
2016-10-20 12:37:19 +13:00
Michael Hudson-Doyle
baf05ac5ad
render gateway4/gateway6 in network config
...
See https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1634540
2016-10-20 11:04:18 +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
23ff9fe1e8
controllers can have signals without models now.
2016-09-29 14:52:11 +13:00
Michael Hudson-Doyle
8020dd38c7
address review comments
2016-09-29 14:06:09 +13:00
Michael Hudson-Doyle
0bd33b7074
fix subiquity side again
2016-09-29 12:29:21 +13:00
Michael Hudson-Doyle
2f8c1aa5cf
move logic from identity/login views into identity controller
...
This was what I wanted to do before I got distracted by the other things.
2016-09-27 21:56:48 +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
2373837269
make fake network actions in dry-run mode a lot quicker
2016-09-27 20:53:17 +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
Mathieu Trudel-Lapierre
ba51edff75
models/network: don't render wifi devices that have no addresses and no DHCP.
...
Otherwise netplan, seeing the device half-rendered, also expects to set a
SSID we haven't set.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-09-23 15:21:32 -04:00
Michael Hudson-Doyle
cd2758cc90
do not override datefmt so we get seconds (and even microseconds) in the logs
2016-09-21 11:56:04 +12:00
Michael Hudson-Doyle
e765538c95
address some UI comments from Mark
2016-09-20 14:13:31 +12:00
Michael Hudson-Doyle
cbc6e97af7
use is_connected from probert
2016-09-19 11:27:12 +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
Michael Hudson-Doyle
682c81c289
Really probe (i.e. call into probert) every time we load the network screen.
...
Connected-ness of a link is something that can plausibly change over short
timescales.
2016-09-16 14:27:37 +12:00
Michael Hudson-Doyle
6161967459
Merge pull request #159 from CanonicalLtd/mwhudson/lp-1623756
...
Do not write any config for a wlan device that has not been given a ESSID
2016-09-16 09:59:31 +12:00
Michael Hudson-Doyle
fdd99e21f0
be more careful in BackgroundProcess.cancel
...
Someone sent me a traceback where cancel() was called before .proc was set. I
don't really understand how this happens, but there's no harm in being careful.
2016-09-15 21:35:48 +12:00
Michael Hudson-Doyle
36967e2309
Do not write any config for a wlan device that has not been given a ESSID
...
See https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1623756
2016-09-15 21:30:41 +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
Mathieu Trudel-Lapierre
d882666e2e
Merge pull request #155 from CanonicalLtd/mwhudson/fix-columns
...
fix scrolling with many interfaces
2016-09-09 14:52:43 -04:00
Michael Hudson-Doyle
bfbb876855
version from PPA
2016-09-05 21:21:05 +12: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
60b4262b07
remove gratuitous delta a bit
2016-09-05 16:39:58 +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
0e56b0cba0
Clean up systemd jobs.
...
The main visible effect of this is that if console-conf crashes or is killed
it restarts instantly rather than 90 seconds later. It also removes the flicker
where a getty gets started and then instantly killed during startup.
2016-09-01 22:33:00 +12:00
Michael Hudson-Doyle
98d5d1b8a3
Merge branch 'master' into mwhudson/config-location
2016-08-31 11:27:58 +12:00
Michael Hudson-Doyle
c6b17fdf43
Overwrite the netplan config that snap firstboot creates.
2016-08-31 11:22:23 +12:00
Michael Hudson-Doyle
0214912151
hide bonding UI
...
As the version of netplan we are currently using does not support it.
2016-08-31 11:16:36 +12:00
Michael Hudson-Doyle
d6cf8e1bcf
prevent C-c / C-x from exiting console conf
...
I've left C-x as a way to get out in dry-run mode as that's useful for
debugging.
2016-08-31 10:58:26 +12:00
Michael Hudson-Doyle
fedcb10560
add WaitForDefaultRouteTask, use it instead of networkd-wait-online
...
It polls though, sorry Mathieu!
2016-08-30 15:08:05 +12:00
Michael Hudson-Doyle
fe8f99fbec
an example of how to implement a task as python
2016-08-30 14:15:46 +12:00
Michael Hudson-Doyle
549c00279d
refactor network application code so that it does not assume all steps are subprocesses
2016-08-30 14:14:08 +12:00
Michael Hudson-Doyle
f79c82a367
use os.makedirs with exist_ok to create log directory
...
Should fix LP: #1617236
2016-08-30 10:50:20 +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
045f1e5159
Merge pull request #144 from CanonicalLtd/mwhudson/network-model-simplify
...
simplify network model code a bit
2016-08-23 09:48:47 +12:00
Michael Hudson-Doyle
9ce7116f36
a touch more logging
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
a734e84980
refactor a bit
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
efa8ef43d2
allow configuration to be canceled
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
c658da012d
factor some stuff out into an object
...
separation of concerns still pretty strange for now
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
ef01c7d291
break run_command in two
...
and use the two halves when applying network config (to allow cancellation)
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
24347f1843
use run_command_async
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
e0a7aded85
update UI while apply network steps are running
...
as a special hack, the first time you apply changes in dry run mode it will
fail
2016-08-22 17:02:42 +12:00
Michael Hudson-Doyle
7679296653
split NETDEV_IGNORED_IFACES into NETDEV_IGNORED_IFACE_NAMES and NETDEV_IGNORED_IFACE_TYPES
2016-08-22 16:06:35 +12:00
Michael Hudson-Doyle
aef546b8f0
make Networkdev devices eagerly
...
the flow is that get_all_interface_names is always called immediately after
probe_network, so being lazy does not save anything.
2016-08-19 11:34:46 +12:00
Michael Hudson-Doyle
f8db1314ad
simplify get_all_interfaces
2016-08-19 11:21:19 +12:00
Michael Hudson-Doyle
bcfce74a12
kill off NetworkModel.network_devices
...
it is redundant with .info
2016-08-19 11:18:08 +12:00
Mathieu Trudel-Lapierre
e02a4c8d55
Use netplan apply instead of restarting networkd ourselves.
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-08-18 16:17:22 -04: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
Michael Hudson-Doyle
9751b1a6b3
be more careful about checking exit statuses
2016-08-17 20:44:59 +12:00
Mathieu Trudel-Lapierre
ade3c8b93d
Only render dhcp if set to True
2016-08-16 22:23:39 -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
410ddf74d7
Drop 'match' for yaml rendering: it's unnecessary while we don't provide a way to rename interfaces.
2016-08-16 14:32:23 -04:00
Mathieu Trudel-Lapierre
10d06a73e4
Allow clearing IP configuration
2016-08-16 14:14:25 -04:00
Mathieu Trudel-Lapierre
682181ae62
We shouldn't render empty bits; also add rendering for IPv6 default route
2016-08-16 12:59:52 -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
1980c4e483
fake-merge mwhudson/network
2016-08-12 22:31:31 -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
Michael Hudson-Doyle
377bb841be
move netconfig into console_conf
2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle
5e3f808b36
some kind of NetworkConfig.from_probe_data
...
it's mostly lies but it'll do for now.
2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle
553cb3b8da
sketches
2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle
070a96bcc4
Write stamp file and logs to somewhere more sensible.
2016-08-05 14:41:50 +12: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
e4d5c7fa85
stuff
2016-07-28 11:13:19 +12:00
Michael Hudson-Doyle
95dc9664e5
Start at a login view.
2016-07-28 10:30:27 +12:00
Mathieu Trudel-Lapierre
1c7fbac977
Update paths to /writable for snappy
2016-07-27 22:16:26 +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
bf1e280276
Make create_user resilient to e.g. spaces in the password.
2016-07-27 15:24:44 +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
2c749d944c
Have console-conf and subiquity check differing environments.
...
This means that console-conf no longer needs to have hdparm installed.
I'm not sure console-conf needs to call this at all TBH.
2016-07-26 15:09:44 +12:00
Michael Hudson-Doyle
04a6d88ffe
rename ViewPolicy to BaseView
2016-07-26 14:21:24 +12:00
Michael Hudson-Doyle
809034728c
rename ModelPolicy to BaseModel
2016-07-26 14:20:10 +12:00
Michael Hudson-Doyle
f027382877
rename ControllerPolicy to BaseController
2016-07-26 14:17:30 +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
Michael Hudson-Doyle
e95daf25ba
Re-introduce 'subiquity' package for installer specific things.
...
Only move the Application object for now.
2016-07-25 12:51:39 +12:00
Michael Hudson-Doyle
173fdcb77f
rename subiquitycore.core.Controller to Application
...
Also CoreControllerError -> ApplicationError
2016-07-25 12:38:19 +12:00
Mathieu Trudel-Lapierre
8e6ff11fb7
curtin: note the need for --extrausers on snappy.
2016-07-09 13:07:52 -04:00
Mathieu Trudel-Lapierre
6235ae789e
Revert "XXX: adduser with extrausers database"
...
This is more meant for console-conf on snappy; doesn't quite apply
to standard subiquity.
This reverts commit 4695735d79
.
2016-07-09 13:05:26 -04:00
Mathieu Trudel-Lapierre
4695735d79
XXX: adduser with extrausers database
2016-07-09 13:04:42 -04: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
be0457f9ea
Don't filter logs at all.
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:51:46 -04:00
Mathieu Trudel-Lapierre
f6bb666c4d
Simplify defining core with only the general flow.
...
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:50:21 -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