From 28cbef85550c6407ddb45c136daa1cb60493ee5a Mon Sep 17 00:00:00 2001 From: Jan Krupa Date: Wed, 1 Mar 2023 09:34:03 +0000 Subject: [PATCH] Find attachments via global search engine --- netbox_attachments/search.py | 11 +++++++++++ netbox_attachments/version.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 netbox_attachments/search.py diff --git a/netbox_attachments/search.py b/netbox_attachments/search.py new file mode 100644 index 0000000..3927e3b --- /dev/null +++ b/netbox_attachments/search.py @@ -0,0 +1,11 @@ +from netbox.search import SearchIndex, register_search +from .models import NetBoxAttachment + + +@register_search +class NetBoxAttachmentIndex(SearchIndex): + model = NetBoxAttachment + fields = ( + ('name', 100), + ('comments', 5000), + ) diff --git a/netbox_attachments/version.py b/netbox_attachments/version.py index 0b2f79d..c72e379 100644 --- a/netbox_attachments/version.py +++ b/netbox_attachments/version.py @@ -1 +1 @@ -__version__ = "1.1.3" +__version__ = "1.1.4"