diff --git a/docs/configuration/plugins.md b/docs/configuration/plugins.md index aa00c3115..765c3d50f 100644 --- a/docs/configuration/plugins.md +++ b/docs/configuration/plugins.md @@ -33,17 +33,21 @@ Note that a plugin must be listed in `PLUGINS` for its configuration to take eff --- -## PLUGINS_CONFIG +## PLUGINS_CATALOG_CONFIG Default: Empty -This parameter holds configuration settings for how the individual plugins are displayed in the plugins table under Admin->System->Plugins. Adding a plugin to `hidden` will make it so the plugin is not shown in the table. Adding a plugin to `unlinked` will make it show the plugin in the table, but it won't be linked to the details and installation page for the plugin. An example configuration is shown below: +This parameter controls how individual plugins are displayed in the plugins catalog under Admin > System > Plugins. Adding a plugin to the `hidden` list will omit that plugin from the catalog. Adding a plugin to the `static` list will display the plugin, but not link to the plugin details or upgrade instructions. + +An example configuration is shown below: ```python PLUGINS_CATALOG_CONFIG = { - 'hidden': ['plugin1'], - 'unlinked': ['plugin2'], + 'hidden': [ + 'plugin1', + ], + 'static': [ + 'plugin2', + ], } ``` - ---- diff --git a/netbox/core/plugins.py b/netbox/core/plugins.py index d6e3c8f23..42930bbc8 100644 --- a/netbox/core/plugins.py +++ b/netbox/core/plugins.py @@ -109,12 +109,12 @@ def get_local_plugins(plugins=None): else: plugins[k] = v - # Update plugin table config for hidden and disabled plugins + # Update plugin table config for hidden and static plugins hidden = settings.PLUGINS_CATALOG_CONFIG.get('hidden', []) - unlinked = settings.PLUGINS_CATALOG_CONFIG.get('unlinked', []) + static = settings.PLUGINS_CATALOG_CONFIG.get('static', []) for k, v in plugins.items(): v.hidden = k in hidden - v.disabled = k in unlinked + v.static = k in static return plugins diff --git a/netbox/core/tables/plugins.py b/netbox/core/tables/plugins.py index 0853f8b1f..20bd0eee6 100644 --- a/netbox/core/tables/plugins.py +++ b/netbox/core/tables/plugins.py @@ -89,8 +89,7 @@ class CatalogPluginTable(BaseTable): order_by = ('-is_installed', '-is_certified', 'name') def render_title_long(self, value, record): - if record.disabled: - return f"{value}" - + if record.static: + return value url = reverse('core:plugin', args=[record.config_name]) return mark_safe(f"{value}")