diff --git a/netbox/netbox/tables/tables.py b/netbox/netbox/tables/tables.py index b5e7715ba..cbcccdf92 100644 --- a/netbox/netbox/tables/tables.py +++ b/netbox/netbox/tables/tables.py @@ -1,5 +1,6 @@ from copy import deepcopy from functools import cached_property +from urllib.parse import urlencode import django_tables2 as tables from django.conf import settings @@ -191,6 +192,14 @@ class BaseTable(tables.Table): 'ordering': self.order_by, } + @property + def config_params(self): + return urlencode({ + 'object_type': ObjectType.objects.get_for_model(self.Meta.model).pk, + 'table': self.name, + **self.configuration, + }) + class NetBoxTable(BaseTable): """ diff --git a/netbox/templates/htmx/table.html b/netbox/templates/htmx/table.html index 5728789fa..376764cef 100644 --- a/netbox/templates/htmx/table.html +++ b/netbox/templates/htmx/table.html @@ -19,6 +19,9 @@ {# Include the updated object count for display elsewhere on the page #}