Commit Graph

2419 Commits

Author SHA1 Message Date
Adam Stokes d78b255b0b Extend string editor to clear out on error
During an input error the text field will be set
with the error of the validation performed.

When a user places the cursor anywhere on that error
and begins typing it will zero out the error and let
you type without having to do any previous deleting,
backspacing, etc.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 15:50:17 -04:00
Adam Stokes 6c18ad1697 Merge pull request #32 from CanonicalLtd/read_probert_data_from_file
Add new cli option to read machine probe data from file
2015-08-28 14:25:38 -04:00
Ryan Harper 8a0e9ebdfd Add new cli option to read machine probe data from file
Allow user to specify a probert machine configuration file to be
used during the installer.  If presented with the config file
no probing of the host will occur.

In the case that disks don't have a size in the data collected then
they'll be marked as USED.

Add a few example machines and update the README on how to specify.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-28 13:22:29 -05:00
Adam Stokes 810306b586 Work out ability to run curtin multiple times
Add additional signals to handle calling curtin
multiple times from additional input views

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 11:06:59 -04:00
Adam Stokes 0823db3b03 Replace additional buttons with menu_btn wrapper
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 10:33:25 -04:00
Adam Stokes 6a74160dcf Update add partition view to align up properly
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 10:12:27 -04:00
Adam Stokes 5c9f70c80c Remove unused module
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-28 09:44:11 -04:00
Adam Stokes 0100ed708c Merge pull request #29 from CanonicalLtd/fix_add_partition_default_values
Valid partition size input on AddPartition View
2015-08-28 09:40:03 -04:00
Adam Stokes 8ab7e2dd0f Merge pull request #30 from CanonicalLtd/drop_pyparted
Drop python3-parted use
2015-08-28 09:21:53 -04:00
Ryan Harper a16c301eed Drop python3-parted use
Using parted required root privileges since it opened the underlying device.
Instead create our own Disk model and use sysfs interface for extracting
size information.
This also clears the way for providing device data via probert input.  This
means we can feed subiquity a probert dump and have it present that to
the installer UI even if we're running on a different system.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-27 14:26:37 -05:00
Adam Stokes 89f2081e30 Cleanup identity view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-27 10:28:48 -04:00
Ryan Harper ba3b97f9d8 Valid partition size input on AddPartition View
- Ensure we don't explode on input for partition size
- Don't append error messages to input fields as it
  can DOS the input boxes.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-25 11:49:27 -05:00
Adam Stokes b10a9ade16 Merge pull request #28 from CanonicalLtd/dont_emit_boot_volume_in_storage_config
Filter out the disk the installer is running from so curtin doesn't f…
2015-08-24 22:53:04 -04:00
Ryan Harper 66ebf89944 Filter out the disk the installer is running from so curtin doesn't format the device during install preventing the reboot
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-24 17:34:55 -05:00
Adam Stokes 5aececa910 Update colors and button placements
To match specifications from design team.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-24 11:51:10 -04:00
Adam Stokes 092f330c8a Remove debug output of exec'd commands
Really just pollutes the log with results from the output
stream.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:58:40 -04:00
Adam Stokes 709ae2a51a Update install progress controller
Provide streaming updates to the UI during non blocking
commands. For the progress controller specifically this
is the output from curtin_wrap and subsequent curtin
execs.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:55:45 -04:00
Adam Stokes 57347582db Keep the bg color consistent
Doesn't alter the bg color for the body as it will
inherit whatever current color is.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:54:20 -04:00
Adam Stokes 1dbb837fd2 Add python3-tornado to geninstaller reqs
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:52:48 -04:00
Adam Stokes f0af14b8fc Add generic asynchronous/synchronous run command
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 23:49:51 -04:00
Adam Stokes 0b7f217339 Switch to Tornado's event loop
This provides us with several additional features the builtin
select() loop does not, such as:

- Chainable async actions via coroutines
- asyncio bridge

This will keep the code simpler and read more like a synchronous
application.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-23 18:48:52 -04:00
raharper d8a401447f Merge pull request #27 from CanonicalLtd/fix-nic-hang-wily
Fix psuedo-random hangs on make run
2015-08-21 15:03:10 -05:00
Ryan Harper 9836dd0cf2 Fix psuedo-random hangs on make run
Non-virtio nics get persistent names which require a 2 minute timeout
which slows the installer down.  Use net.ifnames=0 in grub config to
handle non virtio nics getting persistent names until a fix arrives.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-21 14:56:30 -05:00
Adam Stokes d6da4bec97 Merge pull request #26 from CanonicalLtd/filesystem_partition_fixes_rebased
Filesystem partition fixes rebased
2015-08-21 15:01:34 -04:00
Ryan Harper 0e05593897 Implement mountpoint checking
Don't let user pass the same mount twice.  TODO is to
include an error message widget and place the error
there instead of in the mountpoint widget value.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-21 13:49:45 -05:00
Ryan Harper dde90cd42d Implement auto-increment partition numbers
- Remove the (1-4) since GPT partition doesn't have a limit
- Calculate the lastpartition value and handle the case where
  we don't have any at first

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-21 13:36:19 -05:00
Adam Stokes 5ead10de47 add setuptools
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-21 14:15:04 -04:00
Ryan Harper dce4bcf7aa Fix Filesystem and AddPartition Views
- Remove the error when converting sizes between input and initial value
  there is a rounding error in the floating point convertion when
  passing values between humanize() and dehumanize().
- Fix the error when using the full size of the disk as the first
  partition and not accounting for the GPT bios size
- Implement percentage used in Filesystem Views
- Consolidate on unit keywords (single char only)
- use humanize() to append the correct unit size, remove all
  hard-coded sizes when fetching size
- fix bug in calculating total disk size by only asking for the
  largest available partition from parted.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-21 13:07:42 -05:00
Ryan Harper 922e9fce1a Humansize the entries in the displayed Filesystem table
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-21 11:45:53 -05:00
Ryan Harper d32abf0d93 Format filesystem table size as float value.
Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-21 11:43:18 -05:00
Adam Stokes f57d157722 Add identity view and controller
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 14:34:59 -04:00
Adam Stokes ba3e4bc762 Add identity model
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 12:50:58 -04:00
Adam Stokes 079098f749 Break out controllers into separate modules
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 12:29:56 -04:00
Adam Stokes dbf83a4edb Fix dryrun banner conditional output
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-18 09:24:03 -04:00
Adam Stokes c9f8b954cb Merge pull request #25 from CanonicalLtd/integrate_storage_v1
Updated partitioning template to match new config:
2015-08-17 09:22:47 -04:00
Wesley Wiedenmeier f8e67e95bd Updated partitioning template to match new config:
- storage config is now a dict, with "version: 1" and "config: <storage
   config>"
 - switched curtin branch to use to lp:curtin, because custom storage features
   are now available there
2015-08-12 12:15:31 -05:00
Adam Stokes 346ff1eecc Add futures/promises thread executors
Facility for non blocking async calls that provide a clean
way of handling exceptions/errors in threads without us
having to define a bunch of global exception handlers.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-10 09:57:43 -04:00
Adam Stokes ecc9db2ea5 Condense signal loader with model classes
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-10 09:52:50 -04:00
Adam Stokes 10a1c76d8f Revert organization
The previous organization was in place to reduce the number of open
files when working on getting the demo into shape. Since we've completed
the demo revert back to our MVC model incorporating the latest changes
that were made during that time leading up to the demo.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-10 09:42:19 -04:00
Adam Stokes 01bd932bee Dont chunk the data line
Was causing some formatting issues with python's builtin splitlines

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 16:10:20 -04:00
Adam Stokes e5915a3559 update installed finish text
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 15:42:37 -04:00
Adam Stokes 19c54709b2 a little better formatting of curtin output
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 15:28:52 -04:00
Adam Stokes 2a6d70ee4a expand box adapters height
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 11:53:32 -04:00
Adam Stokes 8e09338d59 Change orange/light_orange to more safe colors
Remove unused colors in palette

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 11:53:12 -04:00
Adam Stokes 8341f0fee4 lighten info_minor color palette
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 11:30:03 -04:00
Adam Stokes 12f7bea668 add install progress view
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-07-24 11:30:03 -04:00
Wesley Wiedenmeier feabaf8f18 Merge pull request #24 from CanonicalLtd/offline
Offline
2015-07-24 10:29:41 -05:00
Wesley Wiedenmeier 64ec2ae157 Merge branch 'master' of github.com:CanonicalLtd/subiquity into offline 2015-07-24 10:27:58 -05:00
Wesley Wiedenmeier c6ae4b1619 Fixed offline mode
- added apt-get update before installing packages
 - install all packages at once instead of looping over them
 - check for error from apt-get install
 - don't try to chroot if copying resolv.conf fails
2015-07-24 10:26:35 -05:00
Adam Stokes 0a9ba876bb Merge pull request #22 from CanonicalLtd/trivial-fixes
Some trivial fixes to help with initial development
2015-07-24 09:12:55 -04:00