[master/f19-branch][PATCH] Add some more details to disk list in storage spoke. (#965592)

Samantha N. Bueno sbueno+anaconda at redhat.com
Thu May 30 17:40:46 UTC 2013


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.

====

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, ""]
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list