mirror of https://github.com/jumpserver/jumpserver
[Update] 修改命令记录/操作/改密日志搜索字段没清空的问题
parent
48fa26a3bc
commit
63519ec076
|
@ -120,7 +120,7 @@ class OperateLogListView(PermissionsMixin, DatetimeSearchMixin, ListView):
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = {
|
||||
'user_list': current_org.get_org_members(),
|
||||
'user_list': [str(user) for user in current_org.get_org_members()],
|
||||
'actions': self.actions_dict,
|
||||
'search_action': self.action,
|
||||
'resource_type_list': get_resource_type_list(),
|
||||
|
@ -161,7 +161,7 @@ class PasswordChangeLogList(PermissionsMixin, DatetimeSearchMixin, ListView):
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = {
|
||||
'user_list': current_org.get_org_members(),
|
||||
'user_list': [str(user) for user in current_org.get_org_members()],
|
||||
'date_from': self.date_from,
|
||||
'date_to': self.date_to,
|
||||
'user': self.user,
|
||||
|
@ -246,7 +246,7 @@ class CommandExecutionListView(UserCommandExecutionListView):
|
|||
'action': _('Command execution log'),
|
||||
'date_from': self.date_from,
|
||||
'date_to': self.date_to,
|
||||
'user_list': self.get_user_list(),
|
||||
'user_list': [(str(user.id), user) for user in self.get_user_list()],
|
||||
'keyword': self.keyword,
|
||||
'user_id': self.user_id,
|
||||
})
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<div class="input-group">
|
||||
<select class="select2 form-control" name="user">
|
||||
<option value="">{% trans 'User' %}</option>
|
||||
{% for u in user_list %}
|
||||
<option value="{{ u.id }}" {% if u.id == user_id %} selected {% endif %}>{{ u }}</option>
|
||||
{% for id, u in user_list %}
|
||||
<option value="{{ id }}" {% if id == user_id %} selected {% endif %}>{{ u }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue