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
a57adf9b
Commit
a57adf9b
authored
Nov 02, 2014
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改过滤标签
parent
aa9139c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
views.py
webroot/AutoSa/AutoSa/views.py
+1
-1
logView.html
webroot/AutoSa/templates/logView.html
+2
-0
__init__.py
webroot/AutoSa/templatetags/__init__.py
+0
-0
mytags.py
webroot/AutoSa/templatetags/mytags.py
+1
-1
No files found.
webroot/AutoSa/AutoSa/views.py
View file @
a57adf9b
...
...
@@ -957,7 +957,7 @@ def downFile(request):
@admin_required
def
logView
(
request
):
thirtyDayAgo
=
(
datetime
.
datetime
.
now
()
-
datetime
.
timedelta
(
30
))
thirtyDayAgoStamp
=
int
(
t
hirtyDayAgo
.
timetuple
(
))
thirtyDayAgoStamp
=
int
(
t
ime
.
mktime
(
thirtyDayAgo
.
timetuple
()
))
logs_all
=
Logs
.
objects
.
filter
(
start_time__gt
=
thirtyDayAgoStamp
)
paginator
=
Paginator
(
logs_all
,
20
)
...
...
webroot/AutoSa/templates/logView.html
View file @
a57adf9b
{% extends 'base.html' %}
{% load mytags %}
{% block content %}
<form
method=
"post"
action=
""
>
<table
class=
"table table-striped table-hover table-condensed"
>
...
...
webroot/AutoSa/templatetags/__init__.py
0 → 100644
View file @
a57adf9b
webroot/AutoSa/templatetags/mytags.py
View file @
a57adf9b
...
...
@@ -4,7 +4,7 @@ from django import template
register
=
template
.
Library
@register.filter
(
'stamp2str'
)
@register.filter
(
name
=
'stamp2str'
)
def
stamp2str
(
value
):
try
:
return
time
.
strftime
(
'
%
Y/
%
m/
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
value
))
...
...
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