mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
14728 Move installed plugins list from admin UI to NetBox UI (#14768)
* 14728 move plugins view from admin * 14728 move plugins view from admin * 14728 remove plugins view from admin * Update template for #12128 * 14728 review fixes * 14728 review fixes * 14728 review fixes * 14728 review fixes * 14728 configure table * Clean up table columns * Fix app config lookup for plugins referenced by dotted path * Move template; fix table display * Fix user table configuration * Remove nonfunctional quick search * Limit PluginListView to staff users --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from .config import *
|
||||
from .data import *
|
||||
from .jobs import *
|
||||
from .plugins import *
|
||||
|
39
netbox/core/tables/plugins.py
Normal file
39
netbox/core/tables/plugins.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import django_tables2 as tables
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from netbox.tables import BaseTable
|
||||
|
||||
__all__ = (
|
||||
'PluginTable',
|
||||
)
|
||||
|
||||
|
||||
class PluginTable(BaseTable):
|
||||
name = tables.Column(
|
||||
accessor=tables.A('verbose_name'),
|
||||
verbose_name=_('Name')
|
||||
)
|
||||
version = tables.Column(
|
||||
verbose_name=_('Version')
|
||||
)
|
||||
package = tables.Column(
|
||||
accessor=tables.A('name'),
|
||||
verbose_name=_('Package')
|
||||
)
|
||||
author = tables.Column(
|
||||
verbose_name=_('Author')
|
||||
)
|
||||
author_email = tables.Column(
|
||||
verbose_name=_('Author Email')
|
||||
)
|
||||
description = tables.Column(
|
||||
verbose_name=_('Description')
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
empty_text = _('No plugins found')
|
||||
fields = (
|
||||
'name', 'version', 'package', 'author', 'author_email', 'description',
|
||||
)
|
||||
default_columns = (
|
||||
'name', 'version', 'package', 'author', 'author_email', 'description',
|
||||
)
|
Reference in New Issue
Block a user