Werk #13731 · Aug 2, 22
HW/SW Inventory: Remove 'declare_invtable_view' for registration of table views
Incompatible change. Existing setups may behave differently after upgrading. Review the details below before updating.
Previously a table in the HW/SW inventory tree could be opened as an own view if
- the view name was added to the related display hint (with suffix "_of_host") and
- the view was declared with "declare_invtable_view".
The view declaration function "declare_invtable_view" was removed. Thus you also have to remove this function from your modules in order to avoid import errors.
Moreover the view name does not have to end with "_of_host".
Example:
inventory_displayhints.update({
...
".software.packages:": {
"title": _l("Software packages"),
"icon": "packages",
"view": "invswpac_of_host",
"keyorder": ["name", "version", "arch", "package_type", "summary"],
},
...
}
declare_invtable_view(
"invswpac", # view name
".software.packages:", # legacy path
_("Software package"), # title singular
_("Software packages"), # title plural
)
Now only the view name in the related display hint has to be stated.
inventory_displayhints.update({
...
".software.packages:": {
"title": _l("Software packages"),
"icon": "packages",
"view": "invswpac",
"keyorder": ["name", "version", "arch", "package_type", "summary"],
},
...
}
Details
- Class:
- New Features
- Level:
- Trivial
- Component:
- Inventory
- Versions:
- 2.2.0b1CommunityProUltimateUltimate + MT