1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #6954: Remember users' table ordering preferences

This commit is contained in:
jeremystretch
2022-01-10 14:03:07 -05:00
parent 72e17914e2
commit 21e0e6e495
12 changed files with 84 additions and 49 deletions

View File

@@ -11,7 +11,7 @@ from extras.views import ObjectConfigContextView
from ipam.models import IPAddress, Service
from ipam.tables import AssignedIPAddressesTable, InterfaceVLANTable
from netbox.views import generic
from utilities.tables import paginate_table
from utilities.tables import configure_table
from utilities.utils import count_related
from . import filtersets, forms, tables
from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine, VMInterface
@@ -41,7 +41,7 @@ class ClusterTypeView(generic.ObjectView):
vm_count=count_related(VirtualMachine, 'cluster')
)
clusters_table = tables.ClusterTable(clusters, exclude=('type',))
paginate_table(clusters_table, request)
configure_table(clusters_table, request)
return {
'clusters_table': clusters_table,
@@ -103,7 +103,7 @@ class ClusterGroupView(generic.ObjectView):
vm_count=count_related(VirtualMachine, 'cluster')
)
clusters_table = tables.ClusterTable(clusters, exclude=('group',))
paginate_table(clusters_table, request)
configure_table(clusters_table, request)
return {
'clusters_table': clusters_table,