1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

60 Commits

Author SHA1 Message Date
jeremystretch
e7ad6eeb74 Fixes #11613: Correct plugin import logic fix from #11267 2023-01-27 19:56:12 -05:00
Jeremy Stretch
fbc9fea0a5 Fixes #11267: Avoid catching ImportError exceptions when loading plugins (#11566)
* Avoid catching ImportErrors when loading plugin URLs

* Avoid catching ImportErrors when loading plugin resources
2023-01-27 16:44:10 -05:00
jeremystretch
150cb772fe Fixes #10984: Fix navigation menu expansion for plugin menus comprising multiple words 2022-11-21 08:38:44 -05:00
Arthur Hanson
27bf7b4a9a 4751 Enable plugins to inject content within object list views (#10901)
* 4751 add plugin buttons to list templates

* 4751 add plugin buttons to list templates

* 4751 add documentation

* 4751 fix object reference

* 4751 update docs
2022-11-14 13:51:58 -05:00
jeremystretch
13afc52617 Closes #10543: Introduce get_plugin_config() utility function 2022-11-03 13:18:58 -04:00
jeremystretch
e7f54c5867 Reorganize plugin resources 2022-11-03 12:59:01 -04:00
jeremystretch
81c0dce5a3 Closes #10697: Move application registry into core app 2022-11-02 15:25:22 -04:00
Jeremy Stretch
9628dead07 Closes #10560: New global search (#10676)
* Initial work on new search backend

* Clean up search backends

* Return only the most relevant result per object

* Clear any pre-existing cached entries on cache()

* #6003: Implement global search functionality for custom field values

* Tweak field weights & document guidance

* Extend search() to accept a lookup type

* Move get_registry() out of SearchBackend

* Enforce object permissions when returning search results

* Add indexers for remaining models

* Avoid calling remove() on non-cacheable objects

* Use new search backend by default

* Extend search backend to filter by object type

* Clean up search view form

* Enable specifying lookup logic

* Add indexes for value field

* Remove object type selector from search bar

* Introduce SearchTable and enable HTMX for results

* Enable pagination

* Remove legacy search backend

* Cleanup

* Use a UUID for CachedValue primary key

* Refactoring search methods

* Define max search results limit

* Extend reindex command to support specifying particular models

* Add clear() and size to SearchBackend

* Optimize bulk caching performance

* Highlight matched portion of field value

* Performance improvements for reindexing

* Started on search tests

* Cleanup & docs

* Documentation updates

* Clean up SearchIndex

* Flatten search registry to register by app_label.model_name

* Clean up search backend classes

* Clean up RestrictedGenericForeignKey and RestrictedPrefetch

* Resolve migrations conflict
2022-10-21 13:16:16 -04:00
jeremystretch
85a4b1f881 Closes #10699: Remove custom import_object() function 2022-10-19 10:40:39 -04:00
Arthur Hanson
ffce5d968d 8927 plugin search (#10489)
* #7016 base search classes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 8927 refactor search

* 8927 refactor search

* 8927 refactor search

* 8927 refactor search

* 8927 get search choices working

* 8927 cleanup - optimize

* 8927 use backend search function

* 8927 fix for plugin search

* 8927 add docs

* Move search app to a module under netbox/

* Utilize global registry to register model search classes

* Build search form options from registry

* Determine search categories from model app by default

* Enable dynamic search registration for plugins

* Update docs & improve plugin support

* Clean up search backend class

* Docs for #8927

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-10-10 14:00:59 -04:00
Jonathan Senecal
dc522a0135 Initial implementation
- Allows to specify a list of django-apps to be "installed" alongside the plugin.

(cherry picked from commit 6c7296200d756d2acbba3a589a7759f3a690cc48)
2022-09-30 17:18:12 -04:00
jeremystretch
3fbd514417 Add test for plugin menu registration 2022-09-28 16:57:40 -04:00
jeremystretch
d0465242a3 Add documentation for PluginMenu 2022-09-28 16:44:16 -04:00
jeremystretch
db90b084cf Enable plugins to create root-level navigation menus 2022-09-28 16:08:03 -04:00
Arthur
e074570b8f 9071 add header to plugin menu 2022-09-22 10:01:19 -07:00
jeremystretch
e2286a4c48 Fix plugin name resolution 2022-02-09 12:55:10 -05:00
jeremystretch
03ea257711 Initial work on GraphQL 2022-02-04 15:06:58 -05:00
jeremystretch
df95115e2e Refactor plugins registry 2022-02-04 14:37:29 -05:00
jeremystretch
1aafcf241f Enable plugins to define user preferences 2021-12-22 09:10:50 -05:00
Jeremy Stretch
fd58eeae1d Merge branch 'feature' into 6651-plugins-rq-queues 2021-07-09 08:43:39 -04:00
jeremystretch
f683f0786e Drop caching_config from plugin configuration 2021-07-07 17:04:21 -04:00
maximumG
995aa65f16 feat: Netbox plugin can defined their own RQ queues 2021-07-07 15:26:33 +02:00
Thomas
dc57332988 Update views.py
Fixing typo in 'version'
2021-05-14 18:22:01 +02:00
Jeremy Stretch
13a13f3943 Fixes #5446: Fix validation for plugin version and required settings 2020-12-11 16:05:50 -05:00
Jeremy Stretch
b871d2a8c4 Fixes #5285: Include plugin API endpoints in root view without needing app_name set 2020-10-29 12:30:10 -04:00
Glenn Matthews
0fd3c83861 Refactor repeated import code 2020-07-14 17:15:17 -04:00
Glenn Matthews
f807d3a024 Don't ignore ImportErrors raised when loading a plugin. Fixes #4805 2020-07-07 09:14:33 -04:00
Jeremy Stretch
8939d4de92 Use packaging.version.parse directly 2020-04-10 11:18:01 -04:00
Jeremy Stretch
9ffc404027 Add tests for plugin configuration, min/max version 2020-04-06 11:44:38 -04:00
Jeremy Stretch
9e0aa0d11e Naming tweaks 2020-04-02 15:43:23 -04:00
Jeremy Stretch
30e330c887 Initial implementation of tests for plugins framework 2020-04-01 17:08:47 -04:00
Jeremy Stretch
0432b1a6f9 Move default caching_config to PluginConfig class 2020-04-01 12:10:19 -04:00
Jeremy Stretch
0d9d0b0446 Convert installed_plugins_admin_view to a class-based view 2020-03-27 13:35:25 -04:00
Jeremy Stretch
cb344a3792 Clean up plugin URL registration 2020-03-27 13:26:53 -04:00
Jeremy Stretch
dd9fc4173d Expose regsitry in templates using existing context processor for settings 2020-03-27 13:18:51 -04:00
Jeremy Stretch
fd6739f0cc Improved menu item/button validation 2020-03-27 13:12:58 -04:00
Jeremy Stretch
8a3ebf64bc Rename obj to object; clean up docstrings 2020-03-26 21:46:56 -04:00
Jeremy Stretch
f03cc96050 Restrict context data available to PluginTemplateExtensions 2020-03-26 16:50:55 -04:00
Jeremy Stretch
e7f7b14214 Extend menu items and buttons to accept a list of required permissions 2020-03-26 16:04:12 -04:00
Jeremy Stretch
74e56a890c Remove unused PluginSignal class 2020-03-26 12:26:58 -04:00
Jeremy Stretch
b94ef39a51 Standardize naming of menu items 2020-03-26 12:25:36 -04:00
Jeremy Stretch
877417d68f Rename PluginTemplateContent to PluginTemplateExtension 2020-03-26 12:18:58 -04:00
Jeremy Stretch
d316d8ac61 Rename PluginNavMenuButton to PluginMenuButton 2020-03-26 11:30:42 -04:00
Jeremy Stretch
40574b65af Rename PluginNavMenuLink to PluginMenuItem 2020-03-26 11:29:05 -04:00
Jeremy Stretch
81c9177c09 Add a default button color 2020-03-26 11:26:11 -04:00
Jeremy Stretch
5540079e81 Add documentation for PluginTemplateContent 2020-03-25 16:32:16 -04:00
Jeremy Stretch
68a0e76ca6 Rework template content registration to work like menu items 2020-03-25 16:06:00 -04:00
Jeremy Stretch
d0edd9d5c1 Update documentation for #4401 2020-03-25 14:33:32 -04:00
Jeremy Stretch
9ea30c057f Replace get_menu_items() with static attribute 2020-03-25 13:51:37 -04:00
Jeremy Stretch
c1f2ad90ef Simplify the mechanism for plugins to register navigation menu items 2020-03-25 11:32:50 -04:00