Skip to content

Dev#520

Merged
mayanayza merged 19 commits intomainfrom
dev
Mar 3, 2026
Merged

Dev#520
mayanayza merged 19 commits intomainfrom
dev

Conversation

@mayanayza
Copy link
Collaborator

No description provided.

mayanayza and others added 19 commits March 1, 2026 18:14
Move onboarding event emission from the HTTP handler into
SnmpCredentialService::create() so both the onboarding flow
(apply_pending_setup) and the regular API handler share the
same code path. Extract CrudService::create_base() so the
override can delegate without duplicating default logic.
- Add SnmpCredentialMappingExposed types with From impls to replace
  manual JSON construction (to_exposed_value)
- Rename to_daemon_value() → with_exposed_snmp() on DiscoveryType and
  DaemonDiscoveryRequest for clarity
- Fix receive_work_request handler: convert DiscoveryUpdatePayload to
  DaemonDiscoveryRequest and serialize with exposed SNMP credentials,
  so DaemonPoll daemons receive plaintext community strings
- Remove community string from SNMP session debug log
- Add FeatureLimitHit variant to BillingOperation enum
- Emit feature_limit_hit from network, seat, and host limit checks
- Add FeatureLimitHit to PostHog subscriber filter
- Extract use_case from OrgCreated metadata into PostHog identify()
  and group_identify() calls as a person/group property
- Add no-op match arm in Brevo service for new variant
The previous commit changed the return type to serde_json::Value
containing only session_id + discovery_type (DaemonDiscoveryRequest),
but the daemon deserializes the response as DiscoveryUpdatePayload
which requires daemon_id, network_id, phase, progress, etc.

Move with_exposed_snmp() to DiscoveryUpdatePayload so it serializes
the full payload and only patches the discovery_type field for SNMP
credential exposure.
The discovery completion subscriber was gated behind
DaemonMode::ServerPoll, preventing LLDP/CDP link resolution from
running for DaemonPoll daemons. Since resolve_lldp_links() is a
purely server-side database operation (no daemon contact needed),
the mode check was unnecessary.
- Add optional `enabled` parameter to `useTopologiesQuery()` to allow
  callers to conditionally disable the query
- Disable the query in CustomEdge, SubnetNode, and InterfaceNode when
  a topology context exists, preventing a redundant 401 on public routes
- Add query_ip_addr_table() to walk ipAdEntIfIndex (IP→ifIndex mapping)
- During deep scan, use ipAddrTable + ifTable to populate Interface MAC
  when ARP didn't provide one (e.g., hosts behind L3 boundaries)
- Add IfEntry fallback in find_host_by_mac for defense in depth
- Add ipAdEntIfIndex test data to snmpsim device files
…s tags

- Auto-generated discovery names now include network name ("Type — Network")
  in daemon registration, session completion, and stalled session cleanup
- Homepage discovery cards show daemon name in description and are clickable
  to navigate to the history detail modal
- History cards replace redundant Type field with Network, add phase status tag
- Discovery history detail modal is deep-linkable via URL params
Backend:
- Set host.chassis_id from SNMP sysName to enable CDP resolution
- Add MAC backfill tracing for ipAddrTable enrichment debugging
- Store raw LLDP chassis/port ID bytes with subtypes for typed parsing
- Add if_name field to IfEntry (migration + storage + API)
- Add StorableFilter::if_name for IfEntry lookup by short name
- CDP resolution: try port-level matching via cdp_port_id → if_descr/if_name
- LLDP port resolution: skip InterfaceAlias (non-unique), try if_name fallback
- Update demo data and examples for if_name field

Frontend:
- Add CollapsibleCard component, refactor AdvancedStep to use it
- Rework IfEntryConfigPanel: collapsible sections (CDP/LLDP default
  collapsed), if_name display, neighbor shown as HostDisplay +
  IfEntryDisplay cards with unresolved placeholder fallback,
  linked interface shown via InterfaceDisplay component
- Add UnresolvedPlaceholder shared component for missing references
- Add i18n keys for if_name and unresolved interface
- Regenerate types to pick up if_name field
- Daemon API client sends compile-time CARGO_PKG_VERSION via
  X-Daemon-Version header on every request
- Server auth middleware extracts the header as Option<String> on the
  Daemon variant, with daemon_version() accessor
- Old daemons that don't send the header get version: None
Split DiscoveryTypeForm into DiscoveryTypeConfigForm (type-specific
settings) and DiscoveryScheduleForm (schedule fields). Move discovery
type and run type selectors to Details tab. Remove tags from modal.

Create mode uses sequential tab navigation with Next/Back buttons
and progressive tab unlocking. Edit mode allows free tab navigation.
Tabs dynamically adapt: Configuration tab hidden for SelfReport,
Schedule tab hidden for AdHoc runs.
- IfEntry panel: use entity-colored tags with icons for IP address,
  subnet, neighbor ifEntry, and neighbor host display
- IfEntry panel: remove "Interface" from all labels, use SNMP field
  names (ifName, ifType), collapsible CDP/LLDP sections
- Interface panel: replace text header with subnet tag showing
  name and CIDR
Change default cron from daily (0 0 0 * * *) to weekly Sunday
midnight (0 0 0 * * 0) for both daemon auto-created discoveries
and UI-created discoveries.
Align all homepage card sections to use consistent gap-4 spacing
and minmax(360px,1fr) auto-fill grid. RecentDiscoveries had gap-3,
NetworkMetrics had minmax(240px), DaemonHealthPanel used fixed cols.
@mayanayza mayanayza merged commit f91cfb2 into main Mar 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant