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
8479989e
Commit
8479989e
authored
Nov 17, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换nav ico, 修复需要登陆,登陆后跳转到登陆前页面
parent
d58ba823
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
21 deletions
+17
-21
requirements.txt
docs/requirements.txt
+5
-2
api.py
jumpserver/api.py
+1
-1
views.py
jumpserver/views.py
+1
-1
README.md
keys/README.md
+3
-0
index.html
templates/index.html
+3
-13
nav.html
templates/nav.html
+4
-4
No files found.
docs/requirements.txt
View file @
8479989e
...
...
@@ -10,4 +10,7 @@ xlsxwriter==0.7.7
xlrd==0.9.4
django-bootstrap-form
tornado
ansible
\ No newline at end of file
ansible
pyinotify
passlib
argparse
\ No newline at end of file
jumpserver/api.py
View file @
8479989e
...
...
@@ -197,9 +197,9 @@ def require_role(role='user'):
def
_deco
(
func
):
def
__deco
(
request
,
*
args
,
**
kwargs
):
request
.
session
[
'pre_url'
]
=
request
.
path
if
not
request
.
user
.
is_authenticated
():
return
HttpResponseRedirect
(
'/login/'
)
if
role
==
'admin'
:
# if request.session.get('role_id', 0) < 1:
if
request
.
user
.
role
==
'CU'
:
...
...
jumpserver/views.py
View file @
8479989e
...
...
@@ -235,7 +235,7 @@ def Login(request):
request
.
session
[
'role_id'
]
=
1
else
:
request
.
session
[
'role_id'
]
=
0
return
HttpResponseRedirect
(
request
.
GET
.
get
(
'next'
,
'/'
),
)
return
HttpResponseRedirect
(
request
.
session
.
get
(
'pre_url'
,
'/'
)
)
# response.set_cookie('username', username, expires=604800)
# response.set_cookie('seed', PyCrypt.md5_crypt(password), expires=604800)
# return response
...
...
keys/README.md
0 → 100644
View file @
8479989e
看山是山,看水是水
看山不是山,看水不是水
看山是山,看水是水
templates/index.html
View file @
8479989e
...
...
@@ -14,7 +14,6 @@
</div>
<div
class=
"ibox-content"
>
<h1
class=
"no-margins"
><a
href=
"/juser/user_list/"
>
{{ users.count}}
</a></h1>
{#
<div
class=
"stat-percent font-bold text-success"
>
{{ percent_user }}
<i
class=
"fa fa-bolt"
></i></div>
#}
<small>
All user
</small>
</div>
</div>
...
...
@@ -27,7 +26,6 @@
</div>
<div
class=
"ibox-content"
>
<h1
class=
"no-margins"
><a
href=
"/jasset/host_list/"
>
{{ hosts.count }}
</a></h1>
{#
<div
class=
"stat-percent font-bold text-info"
>
{{ percent_host }}
<i
class=
"fa fa-level-up"
></i></div>
#}
<small>
All host
</small>
</div>
</div>
...
...
@@ -37,7 +35,7 @@
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<span
class=
"label label-primary pull-right"
>
Online
</span>
<h5>
实时
在线用户
</h5>
<h5>
在线用户
</h5>
</div>
<div
class=
"ibox-content"
>
<h1
class=
"no-margins"
><a
href=
"/jlog/log_list/online/"
>
<span
id=
"online_users"
>
{{ online_user | length }}
</span></a></h1>
...
...
@@ -55,7 +53,6 @@
</div>
<div
class=
"ibox-content"
>
<h1
class=
"no-margins"
><a
href=
"/jlog/log_list/online/"
>
<span
id=
"online_hosts"
>
{{ online_host | length }}
</span></a></h1>
{#
<div
class=
"stat-percent font-bold text-danger"
>
{{ percent_online_host }}
<i
class=
"fa fa-level-down"
></i></div>
#}
<small>
Connected host
</small>
</div>
</div>
...
...
@@ -169,7 +166,7 @@
</div>
</div>
<div
class=
"ibox-content ibox-heading"
>
<h3><i
class=
"fa fa-
user
"
></i>
一周Top10资产
</h3>
<h3><i
class=
"fa fa-
inbox
"
></i>
一周Top10资产
</h3>
<small><i
class=
"fa fa-map-marker"
></i>
登录次数及最近一次登录记录.
</small>
</div>
<div
class=
"ibox-content inspinia-timeline"
>
...
...
@@ -309,14 +306,7 @@
</div>
</div>
</div>
<!--</div>-->
<!--<div class="col-xm-6" id="top10" style="width:50%;height:400px;"></div>-->
<!--<div class="col-xm-6" id="usertop10" style="width:50%;height:400px;"></div>-->
<!--<div class="row">-->
<!--<div class="col-lg-6" id="hosttop10" style="width:50%;height:400px; margin-top: 20px"></div>-->
<!--</div>-->
</div>
</div>
</div>
{% endblock %}
...
...
templates/nav.html
View file @
8479989e
...
...
@@ -4,10 +4,10 @@
<ul
class=
"nav"
id=
"side-menu"
>
{% include 'nav_li_profile.html' %}
<li
id=
"index"
>
<a
href=
"/"
><i
class=
"fa fa-
th-large
"
></i>
<span
class=
"nav-label"
>
仪表盘
</span><span
class=
"label label-info pull-right"
></span></a>
<a
href=
"/"
><i
class=
"fa fa-
dashboard
"
></i>
<span
class=
"nav-label"
>
仪表盘
</span><span
class=
"label label-info pull-right"
></span></a>
</li>
<li
id=
"juser"
>
<a
href=
"#"
><i
class=
"fa fa-
rebel
"
></i>
<span
class=
"nav-label"
>
用户管理
</span><span
class=
"fa arrow"
></span></a>
<a
href=
"#"
><i
class=
"fa fa-
group
"
></i>
<span
class=
"nav-label"
>
用户管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li
class=
"group_list group_edit"
><a
href=
"/juser/group_list/"
>
查看用户组
</a></li>
<li
class=
"group_add"
><a
href=
"/juser/group_add/"
>
添加用户组
</a></li>
...
...
@@ -16,7 +16,7 @@
</ul>
</li>
<li
id=
"jasset"
>
<a><i
class=
"fa fa-
cube
"
></i>
<span
class=
"nav-label"
>
资产管理
</span><span
class=
"fa arrow"
></span></a>
<a><i
class=
"fa fa-
inbox
"
></i>
<span
class=
"nav-label"
>
资产管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li
class=
"group_add"
><a
href=
"/jasset/group_add/"
>
添加资产组
</a></li>
<li
class=
"group_list group_detail group_edit"
><a
href=
"/jasset/group_list/"
>
查看资产组
</a></li>
...
...
@@ -44,7 +44,7 @@
<a
href=
"/jlog/log_list/online/"
><i
class=
"fa fa-files-o"
></i>
<span
class=
"nav-label"
>
日志审计
</span><span
class=
"label label-info pull-right"
></span></a>
</li>
<li
id=
"setting"
>
<a
href=
"/setting/"
><i
class=
"fa fa-
files-o
"
></i>
<span
class=
"nav-label"
>
设置
</span><span
class=
"label label-info pull-right"
></span></a>
<a
href=
"/setting/"
><i
class=
"fa fa-
gears
"
></i>
<span
class=
"nav-label"
>
设置
</span><span
class=
"label label-info pull-right"
></span></a>
</li>
<li
class=
"special_link"
>
<a
href=
"http://www.jumpserver.org"
target=
"_blank"
><i
class=
"fa fa-database"
></i>
<span
class=
"nav-label"
>
访问官网
</span></a>
...
...
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