From cfd8f96df39d23ca3bf479c082fcf116e6f47a32 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 19 Jan 2024 09:56:17 -0500 Subject: [PATCH] Clean up table columns --- netbox/core/tables/plugins.py | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/netbox/core/tables/plugins.py b/netbox/core/tables/plugins.py index becac4efd..2e3c0a991 100644 --- a/netbox/core/tables/plugins.py +++ b/netbox/core/tables/plugins.py @@ -8,21 +8,32 @@ __all__ = ( class PluginTable(BaseTable): - verbose_name = tables.Column() - name = tables.Column() - author = tables.Column() - author_email = tables.Column() - description = tables.Column() - version = tables.Column() + 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: + class Meta(BaseTable.Meta): empty_text = _('No plugins found') fields = ( - 'verbose_name', 'name', 'author', 'author_email', 'description', 'version', + 'name', 'version', 'package', 'author', 'author_email', 'description', ) default_columns = ( - 'verbose_name', 'name', 'author', 'author_email', 'description', 'version', + 'name', 'version', 'package', 'author', 'author_email', 'description', ) - attrs = { - 'class': 'table table-hover object-list', - }