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
c574bbcb
Commit
c574bbcb
authored
Nov 26, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix date change bug
parent
61deed70
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
17 deletions
+15
-17
views.py
jlog/views.py
+3
-1
datepicker3.css
static/css/plugins/datepicker/datepicker3.css
+0
-0
log_filter.html
templates/jlog/log_filter.html
+1
-1
log_offline.html
templates/jlog/log_offline.html
+5
-9
perm_role_add.html
templates/jperm/perm_role_add.html
+1
-1
perm_role_edit.html
templates/jperm/perm_role_edit.html
+1
-1
perm_role_push.html
templates/jperm/perm_role_push.html
+1
-1
perm_rule_add.html
templates/jperm/perm_rule_add.html
+1
-1
perm_rule_edit.html
templates/jperm/perm_rule_edit.html
+1
-1
run_command.html
templates/juser/run_command.html
+1
-1
No files found.
jlog/views.py
View file @
c574bbcb
...
...
@@ -39,10 +39,12 @@ def log_list(request, offset):
if
host_list
:
posts
=
posts
.
filter
(
host__in
=
host_list
)
if
cmd
:
log_id_list
=
set
([
log
.
log_id
for
log
in
TtyLog
.
objects
.
filter
(
cmd__contains
=
cmd
)])
posts
=
posts
.
filter
(
id__in
=
log_id_list
)
else
:
if
not
date_seven_day
:
date_now
=
datetime
.
datetime
.
now
()
date_now_str
=
date_now
.
strftime
(
'
%
m/
%
d/
%
Y'
)
date_seven_day
=
(
date_now
+
datetime
.
timedelta
(
days
=-
7
))
.
strftime
(
'
%
m/
%
d/
%
Y'
)
...
...
static/css/plugins/dat
a
picker/datepicker3.css
→
static/css/plugins/dat
e
picker/datepicker3.css
View file @
c574bbcb
File moved
templates/jlog/log_filter.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
templates/jlog/log_offline.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
@@ -54,14 +54,11 @@
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"/jlog/log_list/online/"
class=
"text-center"
><i
class=
"fa fa-laptop"
></i>
在线
</a></li>
<li
class=
"active"
><a
href=
"/jlog/log_list/offline/"
class=
"text-center"
><i
class=
"fa fa-bar-chart-o"
></i>
历史记录
</a></li>
{#
<li><a
href=
"/jlog/search/"
class=
"text-center"
><i
class=
"fa fa-bar-chart-o"
></i>
详细搜索
</a></li>
#}
</ul>
</div>
<br/>
<form
class=
"form-inline"
action=
""
method=
"get"
>
<div
class=
"form-group"
id=
"data_5"
>
<div
class=
"form-group"
id=
"data_5"
>
<div
class=
"form-group"
id=
"date_5"
>
<div
class=
"input-daterange input-group"
id=
"datepicker"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"start"
value=
"{{ date_seven_day }}"
>
<span
class=
"input-group-addon"
>
to
</span>
...
...
@@ -89,7 +86,6 @@
<div
class=
"form-group"
>
<input
id=
"cmd"
name=
"cmd"
placeholder=
"命令"
type=
"text"
class=
"form-control"
value=
"{{ cmd }}"
style=
"width: 200px;"
>
</div>
</div>
<button
id=
'search_btn'
type=
"submit"
class=
"btn btn-sm btn-primary"
>
Search
</button>
...
...
@@ -116,7 +112,7 @@
{% for post in contacts.object_list %}
<tr
class=
"gradeX"
>
<td
class=
"text-center
username
"
>
{{ post.id }}
</td>
<td
class=
"text-center"
>
{{ post.id }}
</td>
<td
class=
"text-center username"
>
{{ post.user }}
</td>
<td
class=
"text-center ip"
>
{{ post.host }}
</td>
<td
class=
"text-center remote_ip"
>
{{ post.remote_ip }}
</td>
...
...
@@ -201,8 +197,8 @@
{
#
}
#
}
{
#
});
#
}
$
(
'#dat
a
_5 .input-daterange'
).
datepicker
({
dateFormat
:
'
yy-mm-dd
'
,
$
(
'#dat
e
_5 .input-daterange'
).
datepicker
({
dateFormat
:
'
mm/dd/yy
'
,
keyboardNavigation
:
false
,
forceParse
:
false
,
autoclose
:
true
...
...
templates/jperm/perm_role_add.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
templates/jperm/perm_role_edit.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
templates/jperm/perm_role_push.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
templates/jperm/perm_rule_add.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
templates/jperm/perm_rule_edit.html
View file @
c574bbcb
{% extends 'base.html' %}
{% block self_head_css_js %}
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
templates/juser/run_command.html
View file @
c574bbcb
...
...
@@ -69,7 +69,7 @@
{% block self_head_css_js %}
{% load staticfiles %}
<script
src=
"{% static 'js/jquery.shiftcheckbox.js' %}"
></script>
<link
href=
"/static/css/plugins/dat
a
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/dat
e
picker/datepicker3.css"
rel=
"stylesheet"
>
<link
href=
"/static/css/plugins/chosen/chosen.css"
rel=
"stylesheet"
>
<script
src=
"/static/js/plugins/chosen/chosen.jquery.js"
></script>
{% endblock %}
...
...
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