Ticket #2993 (new enhancement)
Add tootips info
| Reported by: | kpg123 | Owned by: | edahl |
|---|---|---|---|
| Priority: | 3 - Medium | Milestone: | Blue Crab |
| Component: | All | Version: | 2.1.3 |
| Keywords: | contribute | Cc: | |
| Community Patch Attached: | Deployed @ Customer: | ||
| Installer: | Maintenance Target: | ||
| Specific ZenPack: | Maintenance Status: | ||
| Documentation Note?: | Not required | Regression: |
Description
If the XML files in Products/ZenModel/data were to add an extra attribute (eg 'description') to the 'property' tag, then it should be possible to add tooltips info automatically into webpages and also to extract the information out into tables for the Docbook XML documentation.
Benefits:
- Provides the reference information about what the property is for where the user needs it, when the user needs it. The user doesn't have to find the admin manual, find the correct table and then find the zproperty and hope that it's up-to-date with the code.
- Have a single source of reference information and all other presentations are based on this data.
- Can automatically extract out the information for documentation so that as part of the release process the references can be updated with an automated process.
Risks:
The risk revolves around the addition of the extra attribute causing the XML parser to become confused and break.
Concept:
The outline of the idea is:
- Edit the Products/ZenModle/data XML files (eg data, event) to add the 'description' attribute and take the description from the existing XML documentation.
- Edit the import/export functions to be able to track the description data. This might be in ImportRM.py and/or in zenPropertyManager.py. It would need to check if the new entry was null or not, and not do anything if the description was empty.
- Add a new function in zenPropertyManager.py to return the description (eg zenPropertyDesc)
- Edit the zPropertyEdit.pt file to add a call to zenPropertyDesc(prop) to add the tooltip (ie HTML 'title' attribute)
- Create an XSL transformation to create the DocBook XML table. (An example that assumes the new attribute is called 'description' is attached to the ticket.)
An example usage for the XML transformation from the command line:
xsltproc --stringparam title "Device" zproperty_to_docbook.xsl devices.xml
- Update the Docbook documentation to use the new table.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.