mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 09:53:34 -06:00
17174 add version to plugin catalog (#17192)
* 17174 add version to plugin catalog * Retain the created & updated columns for optional use --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
3412139acc
commit
fb6c7d7619
@ -96,6 +96,7 @@ def get_local_plugins(plugins=None):
|
|||||||
if k in plugins:
|
if k in plugins:
|
||||||
plugins[k].is_local = True
|
plugins[k].is_local = True
|
||||||
plugins[k].is_installed = True
|
plugins[k].is_installed = True
|
||||||
|
plugins[k].installed_version = v.installed_version
|
||||||
else:
|
else:
|
||||||
plugins[k] = v
|
plugins[k] = v
|
||||||
|
|
||||||
|
@ -63,17 +63,21 @@ class CatalogPluginTable(BaseTable):
|
|||||||
verbose_name=_('Updated')
|
verbose_name=_('Updated')
|
||||||
)
|
)
|
||||||
installed_version = tables.Column(
|
installed_version = tables.Column(
|
||||||
verbose_name=_('Installed version')
|
verbose_name=_('Installed Version')
|
||||||
|
)
|
||||||
|
latest_version = tables.Column(
|
||||||
|
accessor=tables.A('release_latest__version'),
|
||||||
|
verbose_name=_('Latest Version')
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
empty_text = _('No plugin data found')
|
empty_text = _('No plugin data found')
|
||||||
fields = (
|
fields = (
|
||||||
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
|
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
|
||||||
'installed_version',
|
'installed_version', 'latest_version',
|
||||||
)
|
)
|
||||||
default_columns = (
|
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
|
# List installed plugins first, then certified plugins, then
|
||||||
# everything else (with each tranche ordered alphabetically)
|
# everything else (with each tranche ordered alphabetically)
|
||||||
|
Loading…
Reference in New Issue
Block a user