Author: aschnell
Date: Sat Aug 16 23:14:15 2008
New Revision: 50144
URL: http://svn.opensuse.org/viewcvs/yast?rev=50144&view=rev
Log:
- added "used devices" tab for disk (e.g. dmraid and multipath)
Modified:
branches/tmp/aschnell/multipath/storage/src/include/ep-hd.ycp
Modified: branches/tmp/aschnell/multipath/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/multipath/storage/src/include/ep-hd.ycp?rev=50144&r1=50143&r2=50144&view=diff
==============================================================================
--- branches/tmp/aschnell/multipath/storage/src/include/ep-hd.ycp (original)
+++ branches/tmp/aschnell/multipath/storage/src/include/ep-hd.ycp Sat Aug 16 23:14:15 2008
@@ -324,6 +324,36 @@
}
+ void CreateHdDiskDevicesTab(any user_data)
+ {
+ string part_device = (string) user_data;
+
+ symbol Predicate(map disk, map partition)
+ {
+ return StorageFields::PredicateUsedByDevice(disk, partition, [ part_device ]);
+ }
+
+ list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size,
+ `format, `type, `used_by ]);
+
+ map target_map = Storage::GetTargetMap();
+
+ term table_header = StorageFields::TableHeader(fields);
+ list<term> table_contents = StorageFields::TableContents(fields, target_map, Predicate);
+
+ UI::ReplaceWidget(`tab_panel,
+ `VBox(
+ `Table(`id(`table), `opt(`keepSorting, `notify),
+ table_header, table_contents)
+ )
+ );
+
+ string helptext = _("<p>Disk TODO</p>");
+
+ Wizard::RestoreHelp(helptext + StorageFields::TableHelptext(fields));
+ }
+
+
void CreateHdDiskPanel(any user_data)
{
string device = (string) user_data;
@@ -335,7 +365,9 @@
`user_data : user_data ],
`partitions : $[ `create : CreateHdDiskPartitionsTab,
`handle : HandleHdDiskPartitionsTab,
- `user_data : user_data ] ];
+ `user_data : user_data ],
+ `devices : $[ `create : CreateHdDiskDevicesTab,
+ `user_data : user_data ] ];
UI::ReplaceWidget(`tree_panel,
Greasemonkey::Transform(
@@ -343,7 +375,8 @@
`IconAndHeading(sformat(_("Hard Disk: %1"), device), hd_icon),
`DumbTab(`id(`tab), [
`item(`id(`overview), _("&Overview")),
- `item(`id(`partitions), _("&Partitions"))
+ `item(`id(`partitions), _("&Partitions")),
+ `item(`id(`devices), _("&Used Devices"))
],
`ReplacePoint(`id(`tab_panel), TabPanel::empty_panel)
)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org