Author: aschnell
Date: Mon Mar 3 18:26:19 2008
New Revision: 45170
URL: http://svn.opensuse.org/viewcvs/yast?rev=45170&view=rev
Log:
- added nfs tabs
Added:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/FileSystems.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp?rev=45170&r1=45169&r2=45170&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp Mon Mar 3 18:26:19 2008
@@ -45,6 +45,7 @@
include "partitioning/ep-hd.ycp";
include "partitioning/ep-lvm.ycp";
include "partitioning/ep-raid.ycp";
+ include "partitioning/ep-nfs.ycp";
include "partitioning/ep-settings.ycp";
@@ -56,6 +57,7 @@
`hd : $[ `create : CreateHdPanel, `handle : HandleHdPanel ],
`lvm : $[ `create : CreateLvmPanel, `handle : HandleLvmPanel ],
`md : $[ `create : CreateRaidMainPanel, `handle : HandleRaidMainPanel ],
+ `nfs : $[ `create : CreateNfsMainPanel, `handle : HandleNfsMainPanel ],
`settings : $[ `create : CreateSettingsPanel, `save : SaveSettingsPanel ] ];
map subtree = $[];
@@ -108,7 +110,7 @@
huhu(disk, `dm, $[], nil);
}
else if (type == `CT_NFS) {
- huhu(disk, `nfs, $[], nil);
+ huhu(disk, `nfs, $[ `create : CreateNfsOverviewPanel, `handle : HandleNfsOverviewPanel ], nil);
}
}
@@ -173,6 +175,8 @@
any test_new_ep()
{
+ SCR::Write(.target.ycp, Storage::SaveDumpPath("targetmap-ep-start"), Storage::GetTargetMap());
+
Storage::CreateTargetBackup("expert-partitioner");
string back_label = Label::BackButton();
Added: branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp?rev=45170&view=auto
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp (added)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp Mon Mar 3 18:26:19 2008
@@ -0,0 +1,76 @@
+/**
+ * File: ep-nfs.ycp
+ * Package: yast2-storage
+ * Summary: Expert Partitioner
+ * Authors: Arvin Schnell
+ *
+ */
+{
+ textdomain "storage";
+
+
+ void CreateNfsMainPanel(any user_data)
+ {
+ UI::ReplaceWidget(`tree_panel,
+ `VBox(
+ `HStretch(),
+ `Left(`Heading("Network File System (NFS)")),
+ `VBox(
+ `PushButton(`id(`create_nfs), "Create NFS Path...")
+ ),
+ `VStretch()
+ )
+ );
+
+ Wizard::RestoreHelp("Help about NFS");
+ }
+
+
+ void HandleNfsMainPanel(any user_data, any widget)
+ {
+ switch ((symbol) widget)
+ {
+ case `create_nfs:
+ break;
+ }
+ }
+
+
+ void CreateNfsOverviewPanel(any user_data)
+ {
+ string part_device = (string) user_data;
+
+ map target_map = Storage::GetTargetMap();
+
+ list<symbol> fields = StorageFields::Filter([ `mount_point, `size, `fs_type ]);
+
+ UI::ReplaceWidget(`tree_panel,
+ `VBox(
+ `Left(`Heading("NFS Path: " + part_device)),
+ `HStretch(),
+ StorageFields::Overview(fields, target_map, part_device),
+ `VStretch(),
+ `HBox(
+ `PushButton(`id(`edit), "Edit..."),
+ `PushButton(`id(`delete), "Delete..."),
+ `HStretch()
+ )
+ )
+ );
+ }
+
+
+ void HandleNfsOverviewPanel(any user_data, any widget)
+ {
+ string part_device = (string) user_data;
+
+ switch ((symbol) widget)
+ {
+ case `edit:
+ break;
+
+ case `delete:
+ break;
+ }
+ }
+}
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/FileSystems.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/FileSystems.ycp?rev=45170&r1=45169&r2=45170&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/FileSystems.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/FileSystems.ycp Mon Mar 3 18:26:19 2008
@@ -1025,7 +1025,8 @@
global define string GetName( symbol used_fs, string defaultv )``{
map fsmap = GetFsMap( used_fs);
string ret = fsmap[`name]:"";
- if ( ret == "" && used_fs == `ntfs ) ret = "NTFS";
+ if ( ret == "" && used_fs == `ntfs ) ret = "NTFS"; // obsolete? (included in RealFileSystems)
+ if ( ret == "" && used_fs == `nfs ) ret = "NFS";
if ( ret == "" ) ret = defaultv;
return ret;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org