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
1a266f0b
Commit
1a266f0b
authored
Jan 24, 2015
by
halcyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单active bug
parent
449bde4b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
28 deletions
+70
-28
views.py
jasset/views.py
+3
-0
halcyon_192.168.196.73_133619.log
logs/connect/20150124/halcyon_192.168.196.73_133619.log
+9
-0
host_add.html
templates/jasset/host_add.html
+16
-0
host_list.html
templates/jasset/host_list.html
+26
-15
nav.html
templates/nav.html
+13
-13
script.html
templates/script.html
+3
-0
No files found.
jasset/views.py
View file @
1a266f0b
...
...
@@ -5,7 +5,9 @@ from django.shortcuts import render_to_response
from
django.core.paginator
import
Paginator
,
EmptyPage
from
models
import
IDC
,
Asset
,
BisGroup
from
juser.models
import
UserGroup
from
connect
import
PyCrypt
,
KEY
from
jpermission.models
import
Permission
cryptor
=
PyCrypt
(
KEY
)
...
...
@@ -20,6 +22,7 @@ def jadd_host(request):
groups
=
[]
eidc
=
IDC
.
objects
.
all
()
egroup
=
BisGroup
.
objects
.
all
()
eusergroup
=
UserGroup
.
objects
.
all
()
if
request
.
method
==
'POST'
:
j_ip
=
request
.
POST
.
get
(
'j_ip'
)
...
...
logs/connect/20150124/halcyon_192.168.196.73_133619.log
0 → 100644
View file @
1a266f0b
PS1='[\u@192.168.196.73 \W]\$ '
Last login: Sun Jan 4 13:30:11 2015 from 192.168.199.162
clear;echo -e '\033[32mLogin 192.168.196.73 done. Enjoy it.\033[0m'
[halcyon@localhost ~]$ PS1='[\u@192.168.196.73 \W]\$ '
[halcyon@192.168.196.73 ~]$ clear;echo -e '\033[32mLogin 192.168.196.73 done. Enjoy it.\033[0m'
[H[J[32mLogin 192.168.196.73 done. Enjoy it.[0m
[halcyon@192.168.196.73 ~]$ ls
[halcyon@192.168.196.73 ~]$
\ No newline at end of file
templates/jasset/host_add.html
View file @
1a266f0b
...
...
@@ -103,6 +103,16 @@
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<label
for=
"j_group"
class=
"col-sm-2 control-label"
>
所属用户组
</label>
<div
class=
"col-sm-8"
>
{% for g in eusergroup %}
<label
class=
"checkbox-inline"
><input
type=
"checkbox"
id=
"j_usergroup"
value=
"{{ g }}"
name=
"j_usergroup"
>
{{ g }}
</label>
{% endfor %}
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
是否激活
</label>
<div
class=
"col-sm-8"
>
...
...
@@ -169,6 +179,12 @@ $('#assetForm').validator({
ok
:
""
,
msg
:
{
checked
:
"至少选择一个组"
}
},
"j_usergroup"
:
{
rule
:
"checked"
,
tip
:
"选择用户组"
,
ok
:
""
,
msg
:
{
checked
:
"至少选择一个组"
}
},
"j_user"
:
{
rule
:
"required(type_m)"
,
tip
:
"普通用户名"
,
...
...
templates/jasset/host_list.html
View file @
1a266f0b
...
...
@@ -71,23 +71,34 @@
{% endfor %}
</tbody>
</table>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{ contacts.start_index }} to {{ contacts.end_index }} of {{ p.count }} entries
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_paginate paging_simple_numbers"
id=
"editable_paginate"
>
<ul
class=
"pagination"
style=
"margin-top: 0; float: right"
>
<ul
class=
"pagination"
>
{% if contacts.has_previous %}
<li><a
href=
"?page={{ contacts.previous_page_number }}"
>
«
</a></li>
{% endif %}
{% if contacts.has_previous %}
<li><a
href=
"?page={{ contacts.previous_page_number }}"
>
«
</a></li>
{% endif %}
{% for page in p.page_range %}
{% ifequal offset1 page %}
<li
class=
"active"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% else %}
<li><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% endifequal %}
{% endfor %}
{% if contacts.has_next %}
<li><a
href=
"?page={{ contacts.next_page_number }}"
>
»
</a></li>
{% endif %}
</ul>
{% for page in p.page_range %}
{% ifequal offset1 page %}
<li
class=
"active"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% else %}
<li><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% endifequal %}
{% endfor %}
{% if contacts.has_next %}
<li><a
href=
"?page={{ contacts.next_page_number }}"
>
»
</a></li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
templates/nav.html
View file @
1a266f0b
...
...
@@ -14,21 +14,21 @@
<li
id=
"juser"
>
<a
href=
"#"
><i
class=
"fa fa-rebel"
></i>
<span
class=
"nav-label"
>
用户管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li><a
href=
"/juser/user_list/"
>
查看用户
</a></li>
<li><a
href=
"/juser/user_add/"
>
添加用户
</a></li>
<li><a
href=
"/juser/group_list/"
>
查看属组
</a></li>
<li><a
href=
"/juser/group_add/"
>
添加属组
</a></li>
<li
id=
"user_list"
><a
href=
"/juser/user_list/"
>
查看用户
</a></li>
<li
id=
"user_add"
><a
href=
"/juser/user_add/"
>
添加用户
</a></li>
<li
id=
"group_list"
><a
href=
"/juser/group_list/"
>
查看属组
</a></li>
<li
id=
"group_add"
><a
href=
"/juser/group_add/"
>
添加属组
</a></li>
</ul>
</li>
<li
id=
"jasset"
>
<a
href=
"mailbox.html"
><i
class=
"fa fa-cube"
></i>
<span
class=
"nav-label"
>
资产管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li><a
href=
"/jasset/host_list/"
>
查看资产
</a></li>
<li><a
href=
"/jasset/host_add/"
>
添加资产
</a></li>
<li><a
href=
"/jasset/idc_list/"
>
查看机房
</a></li>
<li><a
href=
"/jasset/idc_add/"
>
添加机房
</a></li>
<li><a
href=
"/jasset/group_list/"
>
查看业务组
</a></li>
<li><a
href=
"/jasset/group_add/"
>
添加业务组
</a></li>
<li
id=
"host_list"
><a
href=
"/jasset/host_list/"
>
查看资产
</a></li>
<li
id=
"host_add"
><a
href=
"/jasset/host_add/"
>
添加资产
</a></li>
<li
id=
"idc_list"
><a
href=
"/jasset/idc_list/"
>
查看机房
</a></li>
<li
id=
"idc_add"
><a
href=
"/jasset/idc_add/"
>
添加机房
</a></li>
<li
id=
"group_list"
><a
href=
"/jasset/group_list/"
>
查看业务组
</a></li>
<li
id=
"group_add"
><a
href=
"/jasset/group_add/"
>
添加业务组
</a></li>
</ul>
</li>
<li
id=
"jperm"
>
...
...
@@ -40,11 +40,11 @@
<li><a
href=
"/jperm/add/"
>
添加sudo
</a></li>
</ul>
</li>
<li>
<li
id=
"jlog"
>
<a
href=
"#"
><i
class=
"fa fa-files-o"
></i>
<span
class=
"nav-label"
>
日志审计
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li
><a
href=
"/log/show
list/"
>
查看日志
</a></li>
<li
><a
href=
"/log/
detail/"
>
日志分析
</a></li>
<li
id=
"log_list"
><a
href=
"/jlog/log_
list/"
>
查看日志
</a></li>
<li
id=
"log_detail"
><a
href=
"/jlog/log_
detail/"
>
日志分析
</a></li>
</ul>
</li>
<li>
...
...
templates/script.html
View file @
1a266f0b
...
...
@@ -37,5 +37,7 @@
<!-- active menu -->
<script>
var
str
=
document
.
location
.
pathname
.
split
(
"/"
)[
1
];
var
str1
=
document
.
location
.
pathname
.
split
(
"/"
)[
2
];
$
(
"#"
+
str
).
addClass
(
'active'
);
$
(
"#"
+
str1
).
addClass
(
'active'
);
</script>
\ No newline at end of file
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