[PR #14154] [MERGED] Closes #14134: Display additional object attributes in global search results #14323

Closed
opened 2025-12-29 23:23:49 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14154
Author: @jeremystretch
Created: 10/31/2023
Status: Merged
Merged: 11/9/2023
Merged by: @jeremystretch

Base: featureHead: 14134-search-display-attrs


📝 Commits (9)

  • fa25c2c WIP
  • cb499b7 Add display_attrs for all indexers
  • 47ebc98 Linkify object attributes
  • d88a2c5 Clean up prefetch logic
  • f181b14 Use tooltips for display attributes
  • bfbcc6b Simplify template code
  • 7bcc69c Introduce get_indexer() utility function
  • 326c954 Add to examples in docs
  • 3bcc4e1 Use tooltips to display long strings

📊 Changes

15 files changed (+165 additions, -7 deletions)

View changed files

📝 docs/development/search.md (+1 -0)
📝 docs/plugins/development/search.md (+3 -0)
📝 netbox/circuits/search.py (+6 -0)
📝 netbox/core/search.py (+1 -0)
📝 netbox/dcim/search.py (+31 -0)
📝 netbox/extras/models/search.py (+19 -0)
📝 netbox/ipam/search.py (+16 -0)
📝 netbox/netbox/search/__init__.py (+2 -0)
📝 netbox/netbox/search/backends.py (+36 -7)
netbox/netbox/search/utils.py (+14 -0)
📝 netbox/netbox/tables/tables.py (+5 -0)
netbox/netbox/tables/template_code.py (+18 -0)
📝 netbox/tenancy/search.py (+5 -0)
📝 netbox/virtualization/search.py (+5 -0)
📝 netbox/wireless/search.py (+3 -0)

📄 Description

Closes: #14134

  • Add display_attrs attribute to SearchIndex
  • Add display_attrs property on CachedValue to render object attributes
  • Extend CachedValueSearchBackend to support prefetching related objects

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/14154 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 10/31/2023 **Status:** ✅ Merged **Merged:** 11/9/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `14134-search-display-attrs` --- ### 📝 Commits (9) - [`fa25c2c`](https://github.com/netbox-community/netbox/commit/fa25c2c983e2593200a7df0112787eeb6015e6b4) WIP - [`cb499b7`](https://github.com/netbox-community/netbox/commit/cb499b7e7443dd089ba0f1c41e63b5ade8130038) Add display_attrs for all indexers - [`47ebc98`](https://github.com/netbox-community/netbox/commit/47ebc983f5a656b2b98ffed117c7aa8ef331790b) Linkify object attributes - [`d88a2c5`](https://github.com/netbox-community/netbox/commit/d88a2c599f92db529539f7d6035d48c13368f32e) Clean up prefetch logic - [`f181b14`](https://github.com/netbox-community/netbox/commit/f181b14858a94bbe0aad522392a1f64c5195fc4b) Use tooltips for display attributes - [`bfbcc6b`](https://github.com/netbox-community/netbox/commit/bfbcc6bbac6985937089c013f6dcd95a2d2c52d9) Simplify template code - [`7bcc69c`](https://github.com/netbox-community/netbox/commit/7bcc69c0434444d67b9364b162fa74cf02a5369d) Introduce get_indexer() utility function - [`326c954`](https://github.com/netbox-community/netbox/commit/326c9547821db668ffe4b8c1c9798adf784299af) Add to examples in docs - [`3bcc4e1`](https://github.com/netbox-community/netbox/commit/3bcc4e13bf2ebde84c195bc7afb078b4b111d9c5) Use tooltips to display long strings ### 📊 Changes **15 files changed** (+165 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/search.md` (+1 -0) 📝 `docs/plugins/development/search.md` (+3 -0) 📝 `netbox/circuits/search.py` (+6 -0) 📝 `netbox/core/search.py` (+1 -0) 📝 `netbox/dcim/search.py` (+31 -0) 📝 `netbox/extras/models/search.py` (+19 -0) 📝 `netbox/ipam/search.py` (+16 -0) 📝 `netbox/netbox/search/__init__.py` (+2 -0) 📝 `netbox/netbox/search/backends.py` (+36 -7) ➕ `netbox/netbox/search/utils.py` (+14 -0) 📝 `netbox/netbox/tables/tables.py` (+5 -0) ➕ `netbox/netbox/tables/template_code.py` (+18 -0) 📝 `netbox/tenancy/search.py` (+5 -0) 📝 `netbox/virtualization/search.py` (+5 -0) 📝 `netbox/wireless/search.py` (+3 -0) </details> ### 📄 Description ### Closes: #14134 - Add `display_attrs` attribute to SearchIndex - Add `display_attrs` property on CachedValue to render object attributes - Extend CachedValueSearchBackend to support prefetching related objects --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:23:49 +01:00
adam closed this issue 2025-12-29 23:23:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14323