Author: aschnell
Date: Tue Jul 15 12:09:55 2008
New Revision: 49091
URL: http://svn.opensuse.org/viewcvs/yast?rev=49091&view=rev
Log:
- cleanup
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-dialogs.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-dialogs.ycp?rev=49091&r1=49090&r2=49091&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-dialogs.ycp Tue Jul 15 12:09:55 2008
@@ -35,6 +35,13 @@
}
+ integer DefaultChunkSizeK(string raid_type)
+ {
+ map info = $[ "raid0" : 32, "raid5" : 128 ];
+ return info[raid_type]:4;
+ }
+
+
symbol MiniWorkflowStepRaidTypeDevices(map &data)
{
y2milestone("MiniWorkflowStepRaidTypeDevices data:%1", data);
@@ -43,17 +50,14 @@
string device = data["device"]:"error";
list<string> devices = data["devices"]:[];
-
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size ]);
-
map target_map = Storage::GetTargetMap();
list<map> unused_devices = filter(map dev, get_possible_rds(target_map), { return dev["used_by"]:"" == "" &&
!contains(devices, dev["device"]:""); });
list<map> used_devices = filter(map dev, get_possible_rds(target_map), { return dev["used_by"]:"" == "" &&
contains(devices, dev["device"]:""); });
-
term contents = `VBox(`Left(
`HVSquash(`Frame(_("RAID Type"),
`RadioButtonGroup(`id(`raid_type),
@@ -78,11 +82,9 @@
_("Available Devices:"),
_("Selected Devices:")));
- MiniWorkflow::SetContents(Greasemonkey::Transform(contents), "help");
-
+ MiniWorkflow::SetContents(Greasemonkey::Transform(contents), "TODO help");
MiniWorkflow::SetLastStep(false);
-
symbol widget = nil;
repeat
@@ -125,7 +127,7 @@
y2milestone("MiniWorkflowStepRaidOptions data:%1", data);
string raid_type = data["raid_type"]:"error";
- integer chunk_size = (data["chunk_size_k"]:4)*1024; // TODO
+ integer chunk_size = (data["chunk_size_k"]:DefaultChunkSizeK(raid_type))*1024;
symbol parity_algorithm = data["parity_algorithm"]:`left_asymmetric;
list<term> chunk_sizes_list = maplist(integer i, Integer::RangeFrom(11, 22), {
@@ -149,8 +151,7 @@
term contents = `HVSquash(`Frame(_("RAID Options"), options));
- MiniWorkflow::SetContents(Greasemonkey::Transform(contents), "help");
-
+ MiniWorkflow::SetContents(Greasemonkey::Transform(contents), "TODO help");
MiniWorkflow::SetLastStep(false);
symbol widget = nil;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org