mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 16:18:16 -06:00
17174 add version to plugin catalog
This commit is contained in:
parent
8e70e3ad20
commit
8b38f2fc75
@ -96,6 +96,7 @@ def get_local_plugins(plugins=None):
|
||||
if k in plugins:
|
||||
plugins[k].is_local = True
|
||||
plugins[k].is_installed = True
|
||||
plugins[k].installed_version = v.installed_version
|
||||
else:
|
||||
plugins[k] = v
|
||||
|
||||
|
@ -56,11 +56,12 @@ class CatalogPluginTable(BaseTable):
|
||||
is_certified = columns.BooleanColumn(
|
||||
verbose_name=_('Certified')
|
||||
)
|
||||
created_at = columns.DateTimeColumn(
|
||||
verbose_name=_('Published')
|
||||
installed_version = tables.Column(
|
||||
verbose_name=_('Installed Version')
|
||||
)
|
||||
updated_at = columns.DateTimeColumn(
|
||||
verbose_name=_('Updated')
|
||||
latest_version = tables.Column(
|
||||
accessor=tables.A('release_latest__version'),
|
||||
verbose_name=_('Latest Version')
|
||||
)
|
||||
installed_version = tables.Column(
|
||||
verbose_name=_('Installed version')
|
||||
@ -69,11 +70,11 @@ class CatalogPluginTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
empty_text = _('No plugin data found')
|
||||
fields = (
|
||||
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
|
||||
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'installed_version', 'latest_version',
|
||||
'installed_version',
|
||||
)
|
||||
default_columns = (
|
||||
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
|
||||
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'installed_version', 'latest_version',
|
||||
)
|
||||
# List installed plugins first, then certified plugins, then
|
||||
# everything else (with each tranche ordered alphabetically)
|
||||
|
Loading…
Reference in New Issue
Block a user