Re: [webmin-devel] Theme development: Building a list of modules thathave the corresponding software installed
"Jamie Cameron" <[email protected]> Mon, 06 Apr 2009 14:06:44 -0700 (PDT)
| Newsgroups | gmane.comp.web.webmin.devel |
|---|---|
| Message-ID | <[email protected]> |
On 06/Apr/2009 13:57 David Harrison wrote .. > Hi, > Is it possible to automatically (and efficiently) construct a list of > Webmin modules that have the corresponding system software installed? > e.g. If the MySQL binary/package is not installed on the system do not > show a link to the MySQL Webmin module (even if the module itself is > installed). > > I've been asked if it is possible to add a 'list modules only if > corresponding software is installed' option to my theme, but I get the > feeling this would be an intensive task if it is not natively > supported within Webmin. This is actually supported as of a few versions ago .. in the default blue-framed theme, modules for which the underlying software is not installed appear in the 'Un-used modules' category. The best way to get this information is by calling the get_visible_modules_categories function, which returns a list of category hash refs with the keys : code - A short category code, like 'system' or 'servers' desc - The human-readable category name modules - An array ref of modules in the category unused - Set to 1 for the special un-used category, which contains modules whose underlying servers are not installed. - Jamie ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com - Forwarded by the Webmin development list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-devel