fixed installation ordering issue with field methods
This commit is contained in:
@@ -96,7 +96,6 @@ Steps
|
|||||||
|
|
||||||
$ git clone https://github.com/netbox-community/netbox
|
$ git clone https://github.com/netbox-community/netbox
|
||||||
$ cd netbox
|
$ cd netbox
|
||||||
$ git checkout f5356b8 (to pin 3.0.9)
|
|
||||||
|
|
||||||
install the virtual environment
|
install the virtual environment
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class SLMConfig(PluginConfig):
|
|||||||
name = 'netbox_slm'
|
name = 'netbox_slm'
|
||||||
verbose_name = 'Software Lifecycle Management'
|
verbose_name = 'Software Lifecycle Management'
|
||||||
description = 'Software Lifecycle Management'
|
description = 'Software Lifecycle Management'
|
||||||
version = '0.95'
|
version = '0.96'
|
||||||
author = 'Hedde van der Heide'
|
author = 'Hedde van der Heide'
|
||||||
author_email = 'hedde.vanderheide@ictu.nl'
|
author_email = 'hedde.vanderheide@ictu.nl'
|
||||||
base_url = 'slm'
|
base_url = 'slm'
|
||||||
|
|||||||
@@ -142,5 +142,13 @@ class SoftwareProductInstallationTable(NetBoxTable):
|
|||||||
"tags",
|
"tags",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def order_platform(self, queryset, is_descending):
|
||||||
|
queryset = queryset.order_by(("device" if is_descending else "virtualmachine"))
|
||||||
|
return queryset, True
|
||||||
|
|
||||||
|
def order_type(self, queryset, is_descending):
|
||||||
|
queryset = queryset.order_by(("device" if is_descending else "virtualmachine"))
|
||||||
|
return queryset, True
|
||||||
|
|
||||||
def render_software_product(self, value, **kwargs):
|
def render_software_product(self, value, **kwargs):
|
||||||
return f"{kwargs['record'].software_product.manufacturer.name} - {value}"
|
return f"{kwargs['record'].software_product.manufacturer.name} - {value}"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = netbox-slm
|
name = netbox-slm
|
||||||
version = 0.95
|
version = 0.96
|
||||||
description = Software Lifecycle Management Netbox Plugin.
|
description = Software Lifecycle Management Netbox Plugin.
|
||||||
# long_description = file: README.rst
|
# long_description = file: README.rst
|
||||||
# long_description_content_type='text/x-rst'
|
# long_description_content_type='text/x-rst'
|
||||||
|
|||||||
Reference in New Issue
Block a user