diff --git a/src/netbox_slm/models.py b/src/netbox_slm/models.py index 941946b..87dbbb4 100644 --- a/src/netbox_slm/models.py +++ b/src/netbox_slm/models.py @@ -55,7 +55,6 @@ class SoftwareProductVersion(PrimaryModel): return reverse("plugins:netbox_slm:softwareproductversion", kwargs={"pk": self.pk}) def get_installation_count(self): - print("ACCESSED") count = SoftwareProductInstallation.objects.filter(version_id=self.pk).count() return safestring.mark_safe("{count}".format( url=reverse_lazy("plugins:netbox_slm:softwareproductinstallation_list") + f"?q={self.name}", diff --git a/src/netbox_slm/tables.py b/src/netbox_slm/tables.py index 379bf68..2fffa93 100644 --- a/src/netbox_slm/tables.py +++ b/src/netbox_slm/tables.py @@ -37,6 +37,12 @@ class SoftwareProductTable(BaseTable): "installations", # "tags", ) + sequence = ( + "manufacturer", + "name", + "description", + "installations", + ) class SoftwareProductVersionTable(BaseTable): @@ -76,6 +82,12 @@ class SoftwareProductVersionTable(BaseTable): "installations", # "tags", ) + sequence = ( + "manufacturer", + "software_product", + "name", + "installations", + ) class SoftwareProductInstallationTable(BaseTable): diff --git a/src/netbox_slm/views.py b/src/netbox_slm/views.py index 836e486..d8101c5 100644 --- a/src/netbox_slm/views.py +++ b/src/netbox_slm/views.py @@ -127,7 +127,7 @@ class SoftwareProductInstallationListView(generic.ObjectListView): class SoftwareProductInstallationView(generic.ObjectView): """Display SoftwareProductInstallation details""" - queryset = SoftwareProductVersion.objects.all() + queryset = SoftwareProductInstallation.objects.all() # def get_extra_context(self, request, instance): # records = instance.record_set.all()