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
579e74dd
Commit
579e74dd
authored
Jan 23, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复一些bug
parent
cad07434
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
19 additions
and
20 deletions
+19
-20
api.py
apps/assets/api.py
+1
-1
hands.py
apps/assets/hands.py
+1
-1
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+0
-0
jumpserver.css
apps/static/css/jumpserver.css
+1
-1
_footer.html
apps/templates/_footer.html
+2
-1
flash_message_standalone.html
apps/templates/flash_message_standalone.html
+1
-1
index.html
apps/templates/index.html
+0
-3
hands.py
apps/users/hands.py
+1
-1
forgot_password.html
apps/users/templates/users/forgot_password.html
+1
-1
login.html
apps/users/templates/users/login.html
+1
-1
reset_password.html
apps/users/templates/users/reset_password.html
+1
-1
user_detail.html
apps/users/templates/users/user_detail.html
+7
-6
user_list.html
apps/users/templates/users/user_list.html
+1
-1
login.py
apps/users/views/login.py
+1
-1
No files found.
apps/assets/api.py
View file @
579e74dd
# ~*~ coding: utf-8 ~*~
# ~*~ coding: utf-8 ~*~
# Copyright (C) 2014-201
7
Beijing DuiZhan Technology Co.,Ltd. All Rights Reserved.
# Copyright (C) 2014-201
8
Beijing DuiZhan Technology Co.,Ltd. All Rights Reserved.
#
#
# Licensed under the GNU General Public License v2.0 (the "License");
# Licensed under the GNU General Public License v2.0 (the "License");
# you may not use this file except in compliance with the License.
# you may not use this file except in compliance with the License.
...
...
apps/assets/hands.py
View file @
579e74dd
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
Other module of this app shouldn't connect with other app.
Other module of this app shouldn't connect with other app.
:copyright: (c) 2014-201
7
by Jumpserver Team.
:copyright: (c) 2014-201
8
by Jumpserver Team.
:license: GPL v2, see LICENSE for more details.
:license: GPL v2, see LICENSE for more details.
"""
"""
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
579e74dd
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
579e74dd
This diff is collapsed.
Click to expand it.
apps/static/css/jumpserver.css
View file @
579e74dd
...
@@ -303,7 +303,7 @@ div.dataTables_wrapper div.dataTables_filter {
...
@@ -303,7 +303,7 @@ div.dataTables_wrapper div.dataTables_filter {
.profile-element
div
:first-child
{
.profile-element
div
:first-child
{
line-height
:
60px
;
line-height
:
60px
;
width
:
70px
;
/*width: 70px;*/
float
:
left
;
float
:
left
;
text-align
:
center
;
text-align
:
center
;
}
}
...
...
apps/templates/_footer.html
View file @
579e74dd
...
@@ -4,6 +4,6 @@
...
@@ -4,6 +4,6 @@
<img
style=
"display: none"
src=
"http://www.jumpserver.org/img/evaluate_avatar1.jpg"
>
<img
style=
"display: none"
src=
"http://www.jumpserver.org/img/evaluate_avatar1.jpg"
>
</div>
</div>
<div>
<div>
<strong>
Copyright
</strong>
北京堆栈科技有限公司
©
2014-201
7
<strong>
Copyright
</strong>
北京堆栈科技有限公司
©
2014-201
8
</div>
</div>
</div>
</div>
\ No newline at end of file
apps/templates/flash_message_standalone.html
View file @
579e74dd
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
Copyright Jumpserver.org
Copyright Jumpserver.org
</div>
</div>
<div
class=
"col-md-6 text-right"
>
<div
class=
"col-md-6 text-right"
>
<small>
2014-201
7
</small>
<small>
2014-201
8
</small>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/templates/index.html
View file @
579e74dd
...
@@ -163,9 +163,6 @@
...
@@ -163,9 +163,6 @@
{% if last_login_ten %}
{% if last_login_ten %}
{% for login in last_login_ten %}
{% for login in last_login_ten %}
<div
class=
"feed-element"
>
<div
class=
"feed-element"
>
<a
href=
"#"
class=
"pull-left"
>
<img
alt=
"image"
class=
"img-circle"
src=
"/static/img/root.png"
>
</a>
<div
class=
"media-body "
>
<div
class=
"media-body "
>
{% ifequal login.is_finished 0 %}
{% ifequal login.is_finished 0 %}
<small
class=
"pull-right text-navy"
>
{{ login.date_start|timesince }} ago
</small>
<small
class=
"pull-right text-navy"
>
{{ login.date_start|timesince }} ago
</small>
...
...
apps/users/hands.py
View file @
579e74dd
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
Other module of this app shouldn't connect with other app.
Other module of this app shouldn't connect with other app.
:copyright: (c) 2014-201
7
by Jumpserver Team.
:copyright: (c) 2014-201
8
by Jumpserver Team.
:license: GPL v2, see LICENSE for more details.
:license: GPL v2, see LICENSE for more details.
"""
"""
...
...
apps/users/templates/users/forgot_password.html
View file @
579e74dd
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
Copyright Jumpserver.org
Copyright Jumpserver.org
</div>
</div>
<div
class=
"col-md-6 text-right"
>
<div
class=
"col-md-6 text-right"
>
<small>
© 2014-201
7
</small>
<small>
© 2014-201
8
</small>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/users/templates/users/login.html
View file @
579e74dd
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
Copyright Jumpserver.org
Copyright Jumpserver.org
</div>
</div>
<div
class=
"col-md-6 text-right"
>
<div
class=
"col-md-6 text-right"
>
<small>
© 2014-201
7
</small>
<small>
© 2014-201
8
</small>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/users/templates/users/reset_password.html
View file @
579e74dd
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
Copyright Jumpserver.org
Copyright Jumpserver.org
</div>
</div>
<div
class=
"col-md-6 text-right"
>
<div
class=
"col-md-6 text-right"
>
<small>
© 2014-201
7
</small>
<small>
© 2014-201
8
</small>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/users/templates/users/user_detail.html
View file @
579e74dd
...
@@ -24,8 +24,9 @@
...
@@ -24,8 +24,9 @@
<li
class=
"pull-right"
>
<li
class=
"pull-right"
>
<a
class=
"btn btn-outline btn-default"
href=
"{% url 'users:user-update' pk=user_object.id %}"
><i
class=
"fa fa-edit"
></i>
{% trans 'Update' %}
</a>
<a
class=
"btn btn-outline btn-default"
href=
"{% url 'users:user-update' pk=user_object.id %}"
><i
class=
"fa fa-edit"
></i>
{% trans 'Update' %}
</a>
</li>
</li>
<li
class=
"pull-right"
>
<li
class=
"pull-right"
>
<a
class=
"btn btn-outline
btn-danger btn-delete-user
"
>
<a
class=
"btn btn-outline
{% if request.user != user_object and user_object.username != "
admin
"
%}
btn-danger
btn-delete-user
{%
else
%}
disabled
{%
endif
%}
"
>
<i
class=
"fa fa-trash-o"
></i>
{% trans 'Delete' %}
<i
class=
"fa fa-trash-o"
></i>
{% trans 'Delete' %}
</a>
</a>
</li>
</li>
...
@@ -128,7 +129,7 @@
...
@@ -128,7 +129,7 @@
<td><span
class=
"pull-right"
>
<td><span
class=
"pull-right"
>
<div
class=
"switch"
>
<div
class=
"switch"
>
<div
class=
"onoffswitch"
>
<div
class=
"onoffswitch"
>
<input
type=
"checkbox"
{%
if
user_object
.
is_active
%}
checked
{%
endif
%}
class=
"onoffswitch-checkbox
"
id=
"is_active"
>
<input
type=
"checkbox"
{%
if
user_object
.
is_active
%}
checked
{%
endif
%}
{%
if
request
.
user =
=
user_object
%}
disabled=
"disabled"
{%
endif
%}
class=
"onoffswitch-checkbox disabled
"
id=
"is_active"
>
<label
class=
"onoffswitch-label"
for=
"is_active"
>
<label
class=
"onoffswitch-label"
for=
"is_active"
>
<span
class=
"onoffswitch-inner"
></span>
<span
class=
"onoffswitch-inner"
></span>
<span
class=
"onoffswitch-switch"
></span>
<span
class=
"onoffswitch-switch"
></span>
...
@@ -156,7 +157,7 @@
...
@@ -156,7 +157,7 @@
<td>
{% trans 'Send reset password mail' %}:
</td>
<td>
{% trans 'Send reset password mail' %}:
</td>
<td>
<td>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<button
type=
"button"
class=
"btn btn-primary btn-xs"
id=
"btn-reset-password"
style=
"width: 54px"
>
{% trans 'Send' %}
</button>
<button
type=
"button"
class=
"btn btn-primary btn-xs"
{%
if
request
.
user =
=
user_object
%}
disabled=
"disabled"
{%
endif
%}
id=
"btn-reset-password"
style=
"width: 54px"
>
{% trans 'Send' %}
</button>
</span>
</span>
</td>
</td>
</tr>
</tr>
...
@@ -164,7 +165,7 @@
...
@@ -164,7 +165,7 @@
<td>
{% trans 'Send reset ssh key mail' %}:
</td>
<td>
{% trans 'Send reset ssh key mail' %}:
</td>
<td>
<td>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<button
type=
"button"
class=
"btn btn-primary btn-xs"
id=
"btn-reset-pk"
style=
"width: 54px;"
>
{% trans 'Send' %}
</button>
<button
type=
"button"
class=
"btn btn-primary btn-xs"
{%
if
request
.
user =
=
user_object
%}
disabled=
"disabled"
{%
endif
%}
id=
"btn-reset-pk"
style=
"width: 54px;"
>
{% trans 'Send' %}
</button>
</span>
</span>
</td>
</td>
</tr>
</tr>
...
@@ -331,7 +332,7 @@ $(document).ready(function() {
...
@@ -331,7 +332,7 @@ $(document).ready(function() {
}
}
swal({
swal({
title: "{% trans '
Are
you
sure
?
' %}",
title: "{% trans '
Are
you
sure
?
' %}",
text: "{% trans "This will reset the user
'
s
password
.
A
password
-
reset
email
will
be
sent
to
the
user
\
's mailbox."
%}",
text: "{% trans "This will reset the user
password and send a reset mail"
%}",
type: "warning",
type: "warning",
showCancelButton: true,
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonColor: "#DD6B55",
...
@@ -356,7 +357,7 @@ $(document).ready(function() {
...
@@ -356,7 +357,7 @@ $(document).ready(function() {
}
}
swal({
swal({
title: "{% trans '
Are
you
sure
?
' %}",
title: "{% trans '
Are
you
sure
?
' %}",
text: "{% trans '
This
will
reset
the
user
\
's public key.
'
%
}
",
text: "{% trans '
This
will
reset
the
user
public
key
and
send
a
reset
mail
' %}",
type: "warning",
type: "warning",
showCancelButton: true,
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonColor: "#DD6B55",
...
...
apps/users/templates/users/user_list.html
View file @
579e74dd
...
@@ -76,7 +76,7 @@ function initTable() {
...
@@ -76,7 +76,7 @@ function initTable() {
var
update_btn
=
'<a href="{% url "users:user-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>'
.
replace
(
'00000000-0000-0000-0000-000000000000'
,
cellData
);
var
update_btn
=
'<a href="{% url "users:user-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>'
.
replace
(
'00000000-0000-0000-0000-000000000000'
,
cellData
);
var
del_btn
=
""
;
var
del_btn
=
""
;
if
(
rowData
.
id
===
1
||
rowData
.
username
===
"admin"
||
rowData
.
username
===
"{{ user.username }}"
)
{
if
(
rowData
.
id
===
1
||
rowData
.
username
===
"admin"
||
rowData
.
username
===
"{{
request.
user.username }}"
)
{
del_btn
=
'<a class="btn btn-xs btn-danger m-l-xs" disabled>{% trans "Delete" %}</a>'
del_btn
=
'<a class="btn btn-xs btn-danger m-l-xs" disabled>{% trans "Delete" %}</a>'
.
replace
(
'{{ DEFAULT_PK }}'
,
cellData
)
.
replace
(
'{{ DEFAULT_PK }}'
,
cellData
)
.
replace
(
'99991938'
,
rowData
.
name
);
.
replace
(
'99991938'
,
rowData
.
name
);
...
...
apps/users/views/login.py
View file @
579e74dd
...
@@ -54,7 +54,7 @@ class UserLoginView(FormView):
...
@@ -54,7 +54,7 @@ class UserLoginView(FormView):
return
HttpResponse
(
_
(
"Please enable cookies and try again."
))
return
HttpResponse
(
_
(
"Please enable cookies and try again."
))
auth_login
(
self
.
request
,
form
.
get_user
())
auth_login
(
self
.
request
,
form
.
get_user
())
x_forwarded_for
=
self
.
request
.
META
.
get
(
'HTTP_X_FORWARDED_FOR'
,
''
)
.
split
(
','
)
x_forwarded_for
=
self
.
request
.
META
.
get
(
'HTTP_X_FORWARDED_FOR'
,
''
)
.
split
(
','
)
if
x_forwarded_for
:
if
x_forwarded_for
and
x_forwarded_for
[
0
]
:
login_ip
=
x_forwarded_for
[
0
]
login_ip
=
x_forwarded_for
[
0
]
else
:
else
:
login_ip
=
self
.
request
.
META
.
get
(
'REMOTE_ADDR'
,
''
)
login_ip
=
self
.
request
.
META
.
get
(
'REMOTE_ADDR'
,
''
)
...
...
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