From mboxrd@z Thu Jan 1 00:00:00 1970 From: kupcevic@sourceware.org Date: 5 Oct 2006 16:11:39 -0000 Subject: [Cluster-devel] conga luci/site/luci/Extensions/StorageReport. ... Message-ID: <20061005161139.17711.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: kupcevic at sourceware.org 2006-10-05 16:11:38 Modified files: luci/site/luci/Extensions: StorageReport.py conga_storage_constants.py ricci/modules/storage: ExtendedFS.cpp GFS1.cpp GFS2.cpp SwapFS.cpp UnsupportedFS.cpp Log message: Move FS pretty names from ricci to luci Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_storage_constants.py.diff?cvsroot=cluster&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/ExtendedFS.cpp.diff?cvsroot=cluster&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/GFS1.cpp.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/GFS2.cpp.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/SwapFS.cpp.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/UnsupportedFS.cpp.diff?cvsroot=cluster&r1=1.1&r2=1.2 --- conga/luci/site/luci/Extensions/StorageReport.py 2006/09/26 03:17:41 1.7 +++ conga/luci/site/luci/Extensions/StorageReport.py 2006/10/05 16:11:37 1.8 @@ -1669,7 +1669,7 @@ if id == CONTENT_FS_TYPE: fs_type = c_xml.getAttribute('fs_type') id += '_' + fs_type - name = fs_type + name = get_pretty_fs_name(fs_type) elif id == CONTENT_NONE_TYPE: name = 'Empty' elif id == CONTENT_MS_TYPE: --- conga/luci/site/luci/Extensions/conga_storage_constants.py 2006/09/26 04:56:52 1.5 +++ conga/luci/site/luci/Extensions/conga_storage_constants.py 2006/10/05 16:11:37 1.6 @@ -147,3 +147,38 @@ if name in PRETTY_PROP_NAMES: return PRETTY_PROP_NAMES[name] return name + + + +def get_pretty_fs_name(name): + PRETTY_FS_NAMES = {'ext' : "Linux Extended FS", + 'swap' : "Swap", + 'gfs1' : "GFS1 - Global FS v.1", + 'gfs2' : "GFS2 - Global FS v.2", + 'minix' : "Minix FS", + 'ufs' : "Unix Fast FS", + 'xfs' : "SGI XFS", + 'isofs' : "ISO 9660 CD-ROM FS", + 'cramfs' : "Cram FS", + 'raiserfs' : "Reiser FS", + 'jffs' : "Journalled Flash FS v.1", + 'jffs2' : "Journalled Flash FS v.2", + 'squashfs' : "Squash FS", + 'vfat' : "MS vfat FS", + 'msdos' : "MS-DOS FS", + 'affs' : "Amiga FS", + 'befs' : "BeOS FS", + 'bfs' : "SCO UnixWare BFS", + 'jfs' : "Journaled Filesystem (JFS)", + 'efs' : "efs", + 'freevxfs' : "Veritas Filesystem (VxFS)", + 'hfsplus' : "Macintosh extended FS", + 'hfs' : "Macintosh FS", + 'ncpfs' : "ncpfs", + 'ocfs2' : "Oracle Clustered FS v.2", + 'relayfs' : "Relay FS", + 'udf' : "Universal Disk Format"} + + if name in PRETTY_FS_NAMES: + return PRETTY_FS_NAMES[name] + return name --- conga/ricci/modules/storage/ExtendedFS.cpp 2006/09/26 03:02:57 1.5 +++ conga/ricci/modules/storage/ExtendedFS.cpp 2006/10/05 16:11:38 1.6 @@ -33,7 +33,7 @@ const static String MKE2FS_path("/sbin/mke2fs"); -const String ExtendedFS::PRETTY_NAME("Linux Extended FS"); +const String ExtendedFS::PRETTY_NAME("ext"); --- conga/ricci/modules/storage/GFS1.cpp 2006/09/26 03:17:41 1.1 +++ conga/ricci/modules/storage/GFS1.cpp 2006/10/05 16:11:38 1.2 @@ -39,7 +39,7 @@ #include "gfs_ondisk.h" -const String GFS1::PRETTY_NAME("GFS1 - Global FS v.1"); +const String GFS1::PRETTY_NAME("gfs1"); const static String gfs1_module("gfs"); const static String MKFS_GFS1_path("/sbin/mkfs.gfs"); --- conga/ricci/modules/storage/GFS2.cpp 2006/09/26 03:17:41 1.1 +++ conga/ricci/modules/storage/GFS2.cpp 2006/10/05 16:11:38 1.2 @@ -45,7 +45,7 @@ #include "gfs2_ondisk.h" -const String GFS2::PRETTY_NAME("GFS2 - Global FS v.2"); +const String GFS2::PRETTY_NAME("gfs2"); const static String gfs2_module("gfs2"); const static String MKFS_GFS2_path("/sbin/mkfs.gfs2"); --- conga/ricci/modules/storage/SwapFS.cpp 2006/09/26 03:37:43 1.6 +++ conga/ricci/modules/storage/SwapFS.cpp 2006/10/05 16:11:38 1.7 @@ -31,7 +31,7 @@ using namespace std; -const String SwapFS::PRETTY_NAME("Swap"); +const String SwapFS::PRETTY_NAME("swap"); SwapFS::SwapFS(const String& path) : --- conga/ricci/modules/storage/UnsupportedFS.cpp 2006/09/26 03:17:41 1.1 +++ conga/ricci/modules/storage/UnsupportedFS.cpp 2006/10/05 16:11:38 1.2 @@ -32,76 +32,76 @@ String magic(FileMagic::get_description(path)); magic = utils::to_lower(magic); if (magic.find("minix filesystem") != magic.npos) { - _name = "Minix FS"; + _name = "minix"; _module = "minix"; } else if (magic.find("unix fast file") != magic.npos) { - _name = "Unix Fast FS"; + _name = "ufs"; _module = "ufs"; } else if (magic.find("sgi xfs") != magic.npos) { - _name = "SGI XFS"; + _name = "xfs"; _module = "xfs"; } else if (magic.find("iso 9660 cd-rom") != magic.npos) { - _name = "ISO 9660 CD-ROM FS"; + _name = "isofs"; _module = "isofs"; } else if (magic.find("linux compressed rom file system") != magic.npos) { - _name = "CramFS"; + _name = "cramfs"; _module = "cramfs"; } else if (magic.find("reiserfs") != magic.npos) { - _name = "Reiser FS"; + _name = "reiserfs"; _module = "reiserfs"; } else if (magic.find("linux journalled flash file system") != magic.npos) { - _name = "Journalled Flash FS v.1"; + _name = "jffs"; _module = "jffs"; } else if (magic.find("jffs2") != magic.npos) { - _name = "Journalled Flash FS v.1"; + _name = "jffs2"; _module = "jffs2"; } else if (magic.find("squashfs") != magic.npos) { - _name = "SquashFS"; + _name = "squashfs"; _module = "squashfs"; } else if (magic.find("fat (12 bit)") != magic.npos || magic.find("fat (16 bit)") != magic.npos || magic.find("fat (32 bit)") != magic.npos) { - _name = "MS vfat FS"; + _name = "vfat"; _module = "vfat"; } else if (magic.find("msdos") != magic.npos || magic.find("ms-dos") != magic.npos) { - _name = "MS-DOS FS"; + _name = "msdos"; _module = "msdos"; } else if (magic.find("affs") != magic.npos) { - _name = "Amiga FS"; + _name = "affs"; _module = "affs"; } else if (magic.find("befs") != magic.npos) { - _name = "BeOS FS"; + _name = "befs"; _module = "befs"; } else if (magic.find("bfs") != magic.npos) { - _name = "SCO UnixWare BFS"; + _name = "bfs"; _module = "bfs"; } else if (magic.find("jfs") != magic.npos) { - _name = "Journaled Filesystem (JFS)"; + _name = "jfs"; _module = "jfs"; } else if (magic.find("efs") != magic.npos) { _name = "efs"; _module = "efs"; } else if (magic.find("vxfs") != magic.npos) { - _name = "Veritas Filesystem (VxFS)"; + _name = "freevxfs"; _module = "freevxfs"; } else if (magic.find("hfsplus") != magic.npos) { - _name = "Macintosh FS (extended)"; + _name = "hfsplus"; _module = "hfsplus"; } else if (magic.find("hfs") != magic.npos) { - _name = "Macintosh FS"; + _name = "hfs"; _module = "hfs"; } else if (magic.find("ncpfs") != magic.npos) { _name = "ncpfs"; _module = "ncpfs"; } else if (magic.find("ocfs2") != magic.npos) { - _name = "Oracle Clustered FS v.2"; + _name = "ocfs2"; _module = "ocfs2"; } else if (magic.find("relayfs") != magic.npos) { - _name = "Relay FS"; + _name = "relayfs"; _module = "relayfs"; } else if (magic.find("udf") != magic.npos) { - _name = "Universal Disk Format"; + _name = "udf"; _module = "udf";