Werk #13731: HW/SW Inventory: Remove 'declare_invtable_view' for registration of table views

Component HW/SW inventory
Title HW/SW Inventory: Remove 'declare_invtable_view' for registration of table views
Date Aug 2, 2022
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 2.2.0i1
Level Trivial Change
Class New Feature
Compatibility Incompatible - Manual interaction might be required

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"],
},
...
}

To the list of all Werks