mirror of https://github.com/jumpserver/jumpserver
feat: command exexution audit log的搜索
parent
34c556d375
commit
8569910658
|
@ -1,9 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
|
|
||||||
import random
|
|
||||||
|
|
||||||
from rest_framework.response import Response
|
|
||||||
from rest_framework.viewsets import ModelViewSet
|
from rest_framework.viewsets import ModelViewSet
|
||||||
from rest_framework.generics import RetrieveAPIView
|
from rest_framework.generics import RetrieveAPIView
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
|
|
|
@ -92,8 +92,8 @@ class CommandExecutionViewSet(ListModelMixin, OrgGenericViewSet):
|
||||||
date_range_filter_fields = [
|
date_range_filter_fields = [
|
||||||
('date_start', ('date_from', 'date_to'))
|
('date_start', ('date_from', 'date_to'))
|
||||||
]
|
]
|
||||||
filter_fields = ['user__name', 'command', 'run_as__name']
|
filter_fields = ['user__name', 'command', 'run_as__name', 'is_finished']
|
||||||
search_fields = ['command']
|
search_fields = ['command', 'user__name', 'run_as__name']
|
||||||
ordering = ['-date_created']
|
ordering = ['-date_created']
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue