Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
3c7fa1b6
Commit
3c7fa1b6
authored
Oct 22, 2019
by
jym503558564
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改小问题
parent
f4fc7573
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
views.py
apps/audits/views.py
+5
-3
No files found.
apps/audits/views.py
View file @
3c7fa1b6
...
...
@@ -268,8 +268,9 @@ class LoginLogExportView(PermissionsMixin, View):
header
=
[
field
.
verbose_name
for
field
in
fields
]
login_logs
=
cache
.
get
(
request
.
GET
.
get
(
'spm'
,
''
),
[])
response
=
write_content_to_excel
(
excel_response
,
login_logs
=
login_logs
,
header
=
header
,
fields
=
fields
)
response
=
write_content_to_excel
(
excel_response
,
login_logs
=
login_logs
,
header
=
header
,
fields
=
fields
)
return
response
def
post
(
self
,
request
):
...
...
@@ -281,7 +282,8 @@ class LoginLogExportView(PermissionsMixin, View):
login_logs
=
UserLoginLog
.
get_login_logs
(
date_from
=
date_from
,
date_to
=
date_to
,
user
=
user
,
keyword
=
keyword
,
date_format
=
self
.
date_format
)
keyword
=
keyword
,
date_format
=
self
.
date_format
)
except
ValueError
:
return
HttpResponse
(
'Json object not valid'
,
status
=
400
)
spm
=
uuid
.
uuid4
()
.
hex
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment