Skip to content

Commit

Permalink
fixed installation ordering issue with field methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedde committed Apr 14, 2022
1 parent 74d648b commit a02acbc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Steps

$ git clone https://github.com/netbox-community/netbox
$ cd netbox
$ git checkout f5356b8 (to pin 3.0.9)

install the virtual environment

Expand Down
2 changes: 1 addition & 1 deletion src/netbox_slm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SLMConfig(PluginConfig):
name = 'netbox_slm'
verbose_name = 'Software Lifecycle Management'
description = 'Software Lifecycle Management'
version = '0.95'
version = '0.96'
author = 'Hedde van der Heide'
author_email = 'hedde.vanderheide@ictu.nl'
base_url = 'slm'
Expand Down
8 changes: 8 additions & 0 deletions src/netbox_slm/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,13 @@ class Meta(NetBoxTable.Meta):
"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):
return f"{kwargs['record'].software_product.manufacturer.name} - {value}"
2 changes: 1 addition & 1 deletion src/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = netbox-slm
version = 0.95
version = 0.96
description = Software Lifecycle Management Netbox Plugin.
# long_description = file: README.rst
# long_description_content_type='text/x-rst'
Expand Down

0 comments on commit a02acbc

Please sign in to comment.