Commit Graph

214 Commits

Author SHA1 Message Date
Michael Hudson-Doyle d0c41469a7 remove login model/controller/view from subiquitycore
long ago subsumed into other code
2019-03-07 14:01:52 +13:00
Michael Hudson-Doyle 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 0d95adb89e
Merge pull request #360 from sil2100/console-conf-core-version
console-conf identity: do not hard-code the core version
2018-06-15 14:18:52 +12:00
Michael Hudson-Doyle 9ef56239f8 fix snap build
* use a different way to avoid depending on i18n in tox
 * add __init__.py files to new packages
2018-06-13 13:21:20 +12:00
Łukasz 'sil2100' Zemczak d5413fde2d Zyga is right - better to check the ID instead of NAME. 2018-06-12 17:14:37 +02:00
Łukasz 'sil2100' Zemczak 75bdbab36b Whoops, it was a real failure reported by flake8 - fix missing bracket. 2018-06-11 13:22:39 +02:00
Łukasz 'sil2100' Zemczak 32b724e608 Forgot the version string in one template. 2018-06-11 13:17:30 +02:00
Łukasz 'sil2100' Zemczak 17c6358320 console-conf identity: Reuse the login_details_tmpl_no_ip template in standalone, use os-release to determine the Ubuntu Core version as we now support both 16 and 18. 2018-06-08 21:21:02 +02:00
Scott Moser af94275618 Make tox and Makefile more similar.
This does a few things with the end goal of making simplifying and
making consistent tox and 'make' methods of test or check.

Things here:
 * move python programs out of bin and into their own main.  Use
   entry_points to get scripts written for them.  One gain here is
   that we no longer have python programs that are not named .py.
   flake8 and friends would not check those programs by default.
 * install scripts in bin/ using the setup.py scripts and adjust
   snapcraft.yaml and debian packaging for that.
 * declare and use PYTHON in Makefile to avoid repeating 'python3'
 * declare and use CHECK_DIRS in Makefile for list of dirs to check.
 * no longer run 'flake8' from 'make check' by default.
 * remove the old tests/ directory.
2018-06-05 22:19:17 -04:00
Ryan Harper dc5661ebd5 pyflakes fixes for console_conf/__init__.py 2018-05-24 16:59:31 -05:00
Ryan Harper 103fc1edda pep8 fixes for console_conf/ui/views/identity.py 2018-05-24 16:59:31 -05:00
Ryan Harper b1d9581b9a pep8 fixes for console_conf/ui/views/login.py 2018-05-24 16:59:31 -05:00
Ryan Harper a06c15bd28 pep8 fixes for console_conf/ui/views/welcome.py 2018-05-24 16:59:31 -05:00
Ryan Harper 1451bfc93b pep8 fixes for console_conf/models/console_conf.py 2018-05-24 16:59:31 -05:00
Ryan Harper 8743ff5200 pep8 fixes for console_conf/controllers/identity.py 2018-05-24 16:59:31 -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
Ryan Harper 3c9b2e28c7 Drop commented out / dead code 2018-05-23 18:53:12 -05: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 e1a6542d86 run_command returns a CalledProcess object, no 'output' attribute, but 'stdout' instead 2018-05-21 11:29:41 -05: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 488802fc8b update users of run_command (i thought there was more than this) 2018-05-18 13:11:15 +12:00
Michael Hudson-Doyle b3da7266b9 do not show wlan interfaces in server installer 2018-03-21 09:35:21 +13:00
Michael Hudson-Doyle d9091b12dc add __init__.py to console_conf/models/ 2018-03-16 15:29:50 +13:00
Michael Hudson-Doyle c31183ff13 change danger color to be #ff0000 2018-03-12 14:28:34 +13:00
Michael Hudson-Doyle 6f4a87101b flakes-- 2018-03-08 19:05:51 +13:00
Michael Hudson-Doyle 0273a3d110 "modernize" console-conf views 2018-03-08 18:51:39 +13:00
Michael Hudson-Doyle 1d4d5021ec fix button creation 2018-03-08 18:06:07 +13:00
Michael Hudson-Doyle 1d4fa36dee give console_conf its own palette definition 2018-03-08 18:03:51 +13:00
Michael Hudson-Doyle 386d44ee14 add ConsoleConf model and some other bits to get to point of starting the UI up 2018-03-08 16:39:03 +13:00
Michael Hudson-Doyle 68c15176ac some trivial stuff 2018-03-08 16:34:25 +13: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
Dimitri John Ledkov 648d7d4086
Buttons 2017-09-18 14:01:11 +01:00
Michael Hudson-Doyle 61a88fb422 add missing files 2017-09-08 13:00:18 +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 395b30451e stop being clever in handling of escape in network screens 2017-04-05 14:36:46 +12:00
Michael Hudson-Doyle 618c4e6e72 do not crash in final console-conf screen if no host keys are read (mostly dry-run mode) 2017-04-05 14:26:28 +12:00
Michael Hudson-Doyle 435ed77ade fix crash on startup with no ip address
console-conf-write-login-details would crash if it ran before the system
got an ip address. re-jig things a bit so that it displays an nice message
when there is no ip address but still checks for a new address every 5s until
it finds one.
2017-03-28 15:54:50 +13:00
Michael Hudson-Doyle 3facaab59e more care around how ttyname is displayed 2017-02-17 15:08:12 +13:00
Michael Hudson-Doyle e5847fb863 rewrite login screen per feedback 2017-02-17 14:43:16 +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 f44c37e0a3 fix cancel button in console-conf identity view 2017-02-17 14:18:58 +13:00
Michael Hudson-Doyle 8af0639dd4 cope with probert API changes 2017-02-17 12:37:47 +13:00
Michael Hudson-Doyle ce2bdae0bd simplify something now i know urwid a bit better 2017-02-14 15:22:43 +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 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 3c5ac3140f use new containers everywhere 2017-02-03 14:21:39 +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 d75cbabb61 move subiquity welcome stuff out of subiquitycore 2017-01-17 12:04:15 +13:00
Michael Hudson-Doyle 24c915ff17 simplify console_conf.controllers.WelcomeController 2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle ee51fda2f5 console_conf.views.welcome.WelcomeView no longer inherits from CoreWelcomeView 2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle e50ccb9c76 stop sharing WelcomeController 2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle 5f6be3c094 stop consoleconf's IdentityController inheriting from BaseIdentityController 2017-01-17 11:34:32 +13:00
Michael Hudson-Doyle d65b4191aa improve grammar in login-details.txt 2016-12-15 20:50:51 +13:00
Michael Hudson-Doyle 74dc27043b rewrite login-details.txt a bit
for https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1643930
2016-11-23 10:16:12 +13:00
Michael Hudson-Doyle 1317c8dd8a explain how to get an account
For LP: #1639799
2016-11-10 13:47:15 +13:00
Michael Hudson-Doyle 1862be5ef0 show fingerprints on login view 2016-11-10 13:38:09 +13:00
Michael Hudson-Doyle 7c7fc8218f shuffle things around so that it works for a user created via an assertion 2016-11-10 11:59:39 +13:00
Michael Hudson-Doyle e8850b4a74 tweaks 2016-11-10 10:39:03 +13:00
Michael Hudson-Doyle e8922d82b9 write a much nicer login-details.txt file 2016-11-09 14:57:35 +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 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 4861cedb34 one last emit_signal that came in via merge 2016-11-02 12:56:44 +13:00
Michael Hudson-Doyle d48a70973e restore escape key behaviour 2016-11-02 12:44:04 +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 e6a8cc07c7 address review comments 2016-10-12 13:17:14 +13:00
Mathieu Trudel-Lapierre e41e17f61a Fixup: don't side-effect checking for the device owner.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-10-12 13:13:14 +13:00
Mathieu Trudel-Lapierre a8dd559979 identity: implement an initial, dumb "is this device owned" check.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-10-12 13:13:14 +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 4ae64bc9db fix attribute error in user creation 2016-09-30 15:13:39 +13:00
Michael Hudson-Doyle 8020dd38c7 address review comments 2016-09-29 14:06:09 +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 e765538c95 address some UI comments from Mark 2016-09-20 14:13:31 +12:00
Michael Hudson-Doyle 051c41cf7b Mark firstboot complete as soon as we've called create-user
Otherwish if you reboot while still on the final screen you end up in
console-conf again.
2016-09-16 14:41:56 +12:00
Mathieu Trudel-Lapierre e92f184d40 Merge pull request #156 from CanonicalLtd/mwhudson/no-escape
prevent escape from leaving the finish screen
2016-09-09 14:49:35 -04:00
Michael Hudson-Doyle 96901f667e Enter now submits the email address on the identity view.
See https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1621304
2016-09-09 16:09:38 +12:00
Michael Hudson-Doyle 663535c287 prevent escape from leaving the finish screen
See https://bugs.launchpad.net/snappy/+bug/1621339
2016-09-09 15:58:11 +12:00
Mathieu Trudel-Lapierre 7d9d8b0199 Release 0.0.9:
* Release 0.0.9:
  - Probe network before showing Login screen.
2016-08-23 16:19:26 -04:00
Michael Hudson-Doyle 2a540e11c1 fix passing username to welcome view 2016-08-17 20:54:00 +12:00
Mathieu Trudel-Lapierre 60c58e6654 Merge branch 'cyphermox/network_v2' 2016-08-16 15:33:20 -04:00
Mathieu Trudel-Lapierre 2ffe10aaa7 Remove stray console_conf development drafts. 2016-08-16 11:01:18 -04:00
Mathieu Trudel-Lapierre cac89c30e9 Do bonding, dhcp toggle, and segregate IPv4 and IPv6 again. 2016-08-16 00:48:15 -04:00
Michael Hudson-Doyle c3907430fa adapt to new behavior of snap create-user. 2016-08-16 16:32:14 +12:00
Mathieu Trudel-Lapierre 0f82a12208 Allow setting IPs and rendering as yaml 2016-08-15 17:05:19 -04:00
Mathieu Trudel-Lapierre 1980c4e483 fake-merge mwhudson/network 2016-08-12 22:31:31 -04:00
Mathieu Trudel-Lapierre a23840411d Iterate all IPv4 addresses on an interface. 2016-08-12 14:58:21 -04:00
Michael Hudson-Doyle 55bc516959 forgot something 2016-08-12 16:49:30 +12:00
Michael Hudson-Doyle 12c0947bad hacking that might be enough to let you turn dhcp on for an interface 2016-08-12 16:38:53 +12:00
Michael Hudson-Doyle 2857cc90a3 give up on probert for now 2016-08-12 16:04:40 +12: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 959743aded start on configure interface view 2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle 724a99ac1a works so long as you do not actually want to change anything 2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle c0ce60f767 start network view 2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle 377bb841be move netconfig into console_conf 2016-08-09 11:03:10 +12:00
Michael Hudson-Doyle eec8adf6f8 Stop all console-conf processes when complete. 2016-08-05 14:59:25 +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 69cafa643a Merge branch 'mwhudson/demo' 2016-07-28 20:50:51 -04:00
Michael Hudson-Doyle dfb5eb6a15 oops 2016-07-29 12:48:53 +12: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 6112c441b0 final (?) version 2016-07-28 14:34:48 +12: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
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 9edb676a9b Remove unused copies of controllers from console_conf.
These were the same as the corresponding file from subiquitycore and not
in fact imported by anything.
2016-07-26 14:43:22 +12:00
Michael Hudson-Doyle f027382877 rename ControllerPolicy to BaseController 2016-07-26 14:17:30 +12:00
Michael Hudson-Doyle 1fdb035cdf Fix flake8 warnings in console_conf 2016-07-25 12:55:42 +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 62e70afd02 console_conf: make sure we're recognized as a package 2016-07-08 15:56:26 -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