FIX: Restore service list in host hover menus (CMK-35933)#449
Open
loocars wants to merge 1 commit into
Open
Conversation
The fix for #437 changed NagVisMap and NagVisMapObj::queueState to always queue member states with DONT_GET_SINGLE_MEMBER_STATES. That is correct for host-/servicegroups, whose members are now loaded lazily on demand via the getObjectMembers endpoint (they expose num_members derived from aStateCounts so the frontend can trigger the lazy fetch). Host objects (and also dyngroups, aggregates and submaps) have no num_members fallback, so with DONT_GET_SINGLE_MEMBER_STATES their members were never loaded, num_members stayed 0, and the frontend never triggered the lazy fetch, leaving the hover menu without any services. Restore eager member-detail loading for viewed maps for all object types except host-/servicegroups, which keep their lazy loading. Gadgets stay eager as before. This keeps the memory optimization from #437 intact while bringing back the host service hover. CMK-35933
LarsMichelsen
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After the fix for #437 (lazy group member loading), hovering over a host object on a NagVis map no longer lists its services — only the general host
information is shown. This regressed between 2.4.0p26 and 2.4.0p30.
Root cause
The #437 fix changed
NagVisMapandNagVisMapObj::queueStateto always queue member states withDONT_GET_SINGLE_MEMBER_STATES. That is correct forhost-/servicegroups, whose members are now loaded lazily on demand via the
getObjectMembersendpoint — they exposenum_members(derived fromaStateCounts)so the frontend can trigger the lazy fetch.
Host objects (and also dyngroups, aggregates and submaps) have no
num_membersfallback, so withDONT_GET_SINGLE_MEMBER_STATEStheir members were neverloaded,
num_membersstayed0, and the frontend (ElementHover.js/NagVisStatefulObject.fetchMembers) never triggered the lazy fetch — leaving the hovermenu without any services.
Fix
NagVisMapObj::queueStatenow restores eager member-detail loading on viewed maps for all object types except host-/servicegroups, which keep their lazyloading. Gadgets stay eager as before. This keeps the memory optimization from #437 intact while bringing back the host service hover (and the member lists for
dyngroups, aggregates and submaps).