Skip to content

Commit f6c5720

Browse files
committed
[fix/chores] Limit command results in device admin to 30
1 parent f8e721f commit f6c5720

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

openwisp_controller/connection/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ class CommandInline(admin.StackedInline):
9898
verbose_name_plural = verbose_name
9999
fields = ['status', 'type', 'input_data', 'output_data', 'created', 'modified']
100100
readonly_fields = ['input_data', 'output_data']
101+
max_num = 30
101102
# hack for openwisp-monitoring integration
102103
# TODO: remove when this issue solved:
103104
# https://github.com/theatlantic/django-nested-admin/issues/128#issuecomment-665833142
104105
sortable_options = {'disabled': True}
105106

106107
def get_queryset(self, request, select_related=True):
107108
"""
108-
Return recent commands for this device
109+
Return the most recent commands for this device
109110
(created within the last 7 days)
110111
"""
111112
qs = super().get_queryset(request)

0 commit comments

Comments
 (0)