[master/f19-branch][PATCH] Add some more details to disk list in storage spoke. (#965592)
David Lehman
dlehman at redhat.com
Thu May 30 19:36:44 UTC 2013
On Thu, 2013-05-30 at 13:40 -0400, Samantha N. Bueno wrote:
> Personally I think it would be nice to see this in f19-branch but not
> entirely necessary; it is not a very big/invasive change though.
This is a definite improvement. I'd say it's appropriate for f19-branch.
>
> ====
>
> Instead of sda, sdb, etc. emulate the GUI and use friendly names
> to list disks and size.
>
> Preview of how disks appear in storage spoke with this change (ignoring
> how old this boot.iso is, eesh):
> http://sbueno.fedorapeople.org/images/965592.png
> ---
> pyanaconda/ui/tui/spokes/storage.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
> index 68c6663..4dfd68c 100644
> --- a/pyanaconda/ui/tui/spokes/storage.py
> +++ b/pyanaconda/ui/tui/spokes/storage.py
> @@ -22,7 +22,7 @@
> # which has the same license and authored by David Lehman <dlehman at redhat.com>
> #
>
> -from pyanaconda.ui.lib.disks import getDisks
> +from pyanaconda.ui.lib.disks import getDisks, size_str
> from pyanaconda.ui.tui.spokes import NormalTUISpoke
> from pyanaconda.ui.tui.simpleline import TextWidget, CheckboxWidget
>
> @@ -181,8 +181,9 @@ class StorageSpoke(NormalTUISpoke):
>
> # loop through the disks and present them.
> for disk in self.disks:
> - c = CheckboxWidget(title="%i) %s" % (self.disks.index(disk) + 1,
> - disk.name),
> + size = size_str(disk.size)
> + c = CheckboxWidget(title="%i) %s: %s (%s)" % (self.disks.index(disk) + 1,
> + disk.model, size, disk.name),
> completed=(disk.name in self.selected_disks))
> self._window += [c, ""]
>
More information about the anaconda-patches
mailing list