mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* WIP * Add display_attrs for all indexers * Linkify object attributes * Clean up prefetch logic * Use tooltips for display attributes * Simplify template code * Introduce get_indexer() utility function * Add to examples in docs * Use tooltips to display long strings
This commit is contained in:
@@ -10,6 +10,7 @@ class ClusterIndex(SearchIndex):
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
display_attrs = ('type', 'group', 'status', 'tenant', 'site', 'description')
|
||||
|
||||
|
||||
@register_search
|
||||
@@ -20,6 +21,7 @@ class ClusterGroupIndex(SearchIndex):
|
||||
('slug', 110),
|
||||
('description', 500),
|
||||
)
|
||||
display_attrs = ('description',)
|
||||
|
||||
|
||||
@register_search
|
||||
@@ -30,6 +32,7 @@ class ClusterTypeIndex(SearchIndex):
|
||||
('slug', 110),
|
||||
('description', 500),
|
||||
)
|
||||
display_attrs = ('description',)
|
||||
|
||||
|
||||
@register_search
|
||||
@@ -40,6 +43,7 @@ class VirtualMachineIndex(SearchIndex):
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
display_attrs = ('site', 'cluster', 'device', 'tenant', 'platform', 'status', 'role', 'description')
|
||||
|
||||
|
||||
@register_search
|
||||
@@ -51,3 +55,4 @@ class VMInterfaceIndex(SearchIndex):
|
||||
('description', 500),
|
||||
('mtu', 2000),
|
||||
)
|
||||
display_attrs = ('virtual_machine', 'description')
|
||||
|
||||
Reference in New Issue
Block a user