diff --git a/netbox/core/views.py b/netbox/core/views.py index 74e7d9a03..aea1a1887 100644 --- a/netbox/core/views.py +++ b/netbox/core/views.py @@ -251,8 +251,8 @@ class BackgroundQueuesListView(UserPassesTestMixin, View): return self.request.user.is_staff def get(self, request): - table = tables.BackgroundQueueTable(get_statistics(run_maintenance_tasks=True)["queues"]) - table.configure(request, user=request.user) + table = tables.BackgroundQueueTable(get_statistics(run_maintenance_tasks=True)["queues"], user=request.user) + table.configure(request) return render(request, 'core/background_tasks.html', { 'table': table, }) @@ -272,8 +272,8 @@ class BackgroundTasksListView(UserPassesTestMixin, View): else: jobs = [] - table = tables.BackgroundTaskTable(data=jobs, queue_index=queue_index) - table.configure(request, user=request.user) + table = tables.BackgroundTaskTable(data=jobs, user=request.user, queue_index=queue_index) + table.configure(request) return render(request, 'core/background_tasks_queue.html', { 'table': table, 'queue': queue, diff --git a/netbox/templates/core/background_tasks.html b/netbox/templates/core/background_tasks.html index 957741411..cdfb2a51f 100644 --- a/netbox/templates/core/background_tasks.html +++ b/netbox/templates/core/background_tasks.html @@ -1,4 +1,5 @@ {% extends 'generic/_base.html' %} +{% load helpers %} {% load i18n %} {% load render_table from django_tables2 %} @@ -13,5 +14,22 @@ {% endblock tabs %} {% block content %} - {% render_table table %} +
+
+ {# Table configuration button #} +
+ +
+
+
+ +
+ {% render_table table %} +
{% endblock content %} + +{% block modals %} + {% table_config_form table table_name="ObjectTable" %} +{% endblock modals %} diff --git a/netbox/templates/core/background_tasks_queue.html b/netbox/templates/core/background_tasks_queue.html index 0ad55955e..ca00335ad 100644 --- a/netbox/templates/core/background_tasks_queue.html +++ b/netbox/templates/core/background_tasks_queue.html @@ -1,4 +1,5 @@ {% extends 'generic/_base.html' %} +{% load helpers %} {% load i18n %} {% load render_table from django_tables2 %} @@ -25,5 +26,22 @@ {% endblock tabs %} {% block content %} - {% render_table table %} +
+
+ {# Table configuration button #} +
+ +
+
+
+ +
+ {% render_table table %} +
{% endblock content %} + +{% block modals %} + {% table_config_form table table_name="ObjectTable" %} +{% endblock modals %}