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
f050866d
Commit
f050866d
authored
Feb 11, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ȩ
parent
97038aab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
249 additions
and
52 deletions
+249
-52
models.py
jperm/models.py
+12
-4
urls.py
jperm/urls.py
+1
-0
views.py
jperm/views.py
+58
-25
perm_add.html
templates/jperm/perm_add.html
+0
-0
perm_edit.html
templates/jperm/perm_edit.html
+0
-0
perm_edit_bak.html
templates/jperm/perm_edit_bak.html
+139
-0
perm_list.html
templates/jperm/perm_list.html
+27
-21
nav.html
templates/nav.html
+12
-2
No files found.
jperm/models.py
View file @
f050866d
...
@@ -4,8 +4,10 @@ from jasset.models import BisGroup
...
@@ -4,8 +4,10 @@ from jasset.models import BisGroup
class
Perm
(
models
.
Model
):
class
Perm
(
models
.
Model
):
user_group
=
models
.
ForeignKey
(
UserGroup
)
name
=
models
.
CharField
(
max_length
=
100
)
asset_group
=
models
.
ForeignKey
(
BisGroup
)
user_group
=
models
.
ManyToManyField
(
UserGroup
)
asset_group
=
models
.
ManyToManyField
(
BisGroup
)
comment
=
models
.
CharField
(
max_length
=
100
)
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
'
%
s_
%
s'
%
(
self
.
user_group
.
name
,
self
.
asset_group
.
name
)
return
'
%
s_
%
s'
%
(
self
.
user_group
.
name
,
self
.
asset_group
.
name
)
...
@@ -16,6 +18,9 @@ class CmdGroup(models.Model):
...
@@ -16,6 +18,9 @@ class CmdGroup(models.Model):
cmd
=
models
.
CharField
(
max_length
=
999
)
cmd
=
models
.
CharField
(
max_length
=
999
)
comment
=
models
.
CharField
(
blank
=
True
,
null
=
True
,
max_length
=
50
)
comment
=
models
.
CharField
(
blank
=
True
,
null
=
True
,
max_length
=
50
)
def
__unicode__
(
self
):
return
self
.
name
class
SudoPerm
(
models
.
Model
):
class
SudoPerm
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
20
)
name
=
models
.
CharField
(
max_length
=
20
)
...
@@ -23,4 +28,7 @@ class SudoPerm(models.Model):
...
@@ -23,4 +28,7 @@ class SudoPerm(models.Model):
user_group
=
models
.
ManyToManyField
(
UserGroup
)
user_group
=
models
.
ManyToManyField
(
UserGroup
)
asset_group
=
models
.
ManyToManyField
(
BisGroup
)
asset_group
=
models
.
ManyToManyField
(
BisGroup
)
cmd_group
=
models
.
ManyToManyField
(
CmdGroup
)
cmd_group
=
models
.
ManyToManyField
(
CmdGroup
)
comment
=
models
.
CharField
(
max_length
=
30
,
null
=
True
,
blank
=
True
)
comment
=
models
.
CharField
(
max_length
=
30
,
null
=
True
,
blank
=
True
)
\ No newline at end of file
def
__unicode__
(
self
):
return
self
.
name
\ No newline at end of file
jperm/urls.py
View file @
f050866d
...
@@ -7,6 +7,7 @@ urlpatterns = patterns('jperm.views',
...
@@ -7,6 +7,7 @@ urlpatterns = patterns('jperm.views',
# url(r'^blog/', include('blog.urls')),
# url(r'^blog/', include('blog.urls')),
(
r'^perm_edit/$'
,
'perm_edit'
),
(
r'^perm_edit/$'
,
'perm_edit'
),
(
r'^perm_add/$'
,
'perm_add'
),
(
r'^perm_list/$'
,
'perm_list'
),
(
r'^perm_list/$'
,
'perm_list'
),
(
r'^perm_list_ajax/$'
,
'perm_list_ajax'
),
(
r'^perm_list_ajax/$'
,
'perm_list_ajax'
),
(
r'^perm_detail/$'
,
'perm_detail'
),
(
r'^perm_detail/$'
,
'perm_detail'
),
...
...
jperm/views.py
View file @
f050866d
...
@@ -56,7 +56,7 @@ def perm_user_asset(user_id=None, username=None):
...
@@ -56,7 +56,7 @@ def perm_user_asset(user_id=None, username=None):
def
perm_list
(
request
):
def
perm_list
(
request
):
header_title
,
path1
,
path2
=
u'主机授权 | Perm Host Detail.'
,
u'授权管理'
,
u'授权详情'
header_title
,
path1
,
path2
=
u'主机授权 | Perm Host Detail.'
,
u'授权管理'
,
u'授权详情'
groups
=
contact_list
=
UserGroup
.
objects
.
all
()
.
order_by
(
'type'
)
groups
=
contact_list
=
Perm
.
objects
.
all
(
)
users
=
contact_list2
=
User
.
objects
.
all
()
.
order_by
(
'id'
)
users
=
contact_list2
=
User
.
objects
.
all
()
.
order_by
(
'id'
)
p
=
paginator
=
Paginator
(
contact_list
,
10
)
p
=
paginator
=
Paginator
(
contact_list
,
10
)
p2
=
paginator2
=
Paginator
(
contact_list2
,
10
)
p2
=
paginator2
=
Paginator
(
contact_list2
,
10
)
...
@@ -74,6 +74,47 @@ def perm_list(request):
...
@@ -74,6 +74,47 @@ def perm_list(request):
return
render_to_response
(
'jperm/perm_list.html'
,
locals
())
return
render_to_response
(
'jperm/perm_list.html'
,
locals
())
def
user_asset_cmd_groups_get
(
user_groups_select
=
''
,
asset_groups_select
=
''
,
cmd_groups_select
=
''
):
user_groups_select_list
=
[]
asset_groups_select_list
=
[]
cmd_groups_select_list
=
[]
for
user_group_id
in
user_groups_select
:
user_groups_select_list
.
append
(
UserGroup
.
objects
.
get
(
id
=
user_group_id
))
for
asset_group_id
in
asset_groups_select
:
asset_groups_select_list
.
append
(
BisGroup
.
objects
.
get
(
id
=
asset_group_id
))
for
cmd_group_id
in
cmd_groups_select
:
cmd_groups_select_list
.
append
(
CmdGroup
.
objects
.
get
(
id
=
cmd_group_id
))
return
user_groups_select_list
,
asset_groups_select_list
,
cmd_groups_select_list
def
perm_add
(
request
):
header_title
,
path1
,
path2
=
u'主机授权添加 | Perm Add Detail.'
,
u'授权管理'
,
u'授权添加'
if
request
.
method
==
'GET'
:
user_groups
=
UserGroup
.
objects
.
filter
(
Q
(
type
=
'A'
)
|
Q
(
type
=
'M'
))
.
order_by
(
'type'
)
asset_groups
=
BisGroup
.
objects
.
all
()
else
:
name
=
request
.
POST
.
get
(
'name'
,
''
)
user_groups_select
=
request
.
POST
.
getlist
(
'user_groups_select'
)
asset_groups_select
=
request
.
POST
.
getlist
(
'asset_groups_select'
)
comment
=
request
.
POST
.
get
(
'comment'
,
''
)
user_groups
,
asset_groups
=
user_asset_cmd_groups_get
(
user_groups_select
,
asset_groups_select
,
''
)[
0
:
2
]
perm
=
Perm
(
name
=
name
,
comment
=
comment
)
perm
.
save
()
perm
.
user_group
=
user_groups
perm
.
asset_group
=
asset_groups
msg
=
'添加成功'
return
render_to_response
(
'jperm/perm_add.html'
,
locals
())
def
perm_list_ajax
(
request
):
def
perm_list_ajax
(
request
):
tab
=
request
.
POST
.
get
(
'tab'
,
'tab1'
)
tab
=
request
.
POST
.
get
(
'tab'
,
'tab1'
)
search
=
request
.
POST
.
get
(
'search'
,
''
)
search
=
request
.
POST
.
get
(
'search'
,
''
)
...
@@ -112,17 +153,26 @@ def perm_list_ajax(request):
...
@@ -112,17 +153,26 @@ def perm_list_ajax(request):
def
perm_edit
(
request
):
def
perm_edit
(
request
):
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
header_title
,
path1
,
path2
=
u'编辑授权 | Perm Host Edit.'
,
u'授权管理'
,
u'授权编辑'
header_title
,
path1
,
path2
=
u'编辑授权 | Perm Host Edit.'
,
u'授权管理'
,
u'授权编辑'
user_group_id
=
request
.
GET
.
get
(
'id'
)
perm_id
=
request
.
GET
.
get
(
'id'
)
user_group
=
UserGroup
.
objects
.
get
(
id
=
user_group_id
)
perm
=
Perm
.
objects
.
filter
(
id
=
perm_id
)
asset_groups
=
BisGroup
.
objects
.
all
()
if
perm
:
asset_groups_permed
=
[
perm
.
asset_group
for
perm
in
user_group
.
perm_set
.
all
()]
perm
=
perm
[
0
]
asset_groups_unperm
=
[
asset_group
for
asset_group
in
asset_groups
if
asset_group
not
in
asset_groups_permed
]
name
=
perm
.
name
return
render_to_response
(
'jperm/perm_edit.html'
,
locals
())
comment
=
perm
.
comment
user_groups_select
=
perm
.
user_group
.
all
()
asset_groups_select
=
perm
.
asset_group
.
all
()
user_groups_all
=
UserGroup
.
objects
.
filter
(
Q
(
type
=
'A'
)
|
Q
(
type
=
'M'
))
asset_groups_all
=
BisGroup
.
objects
.
all
()
user_groups
=
[
user_group
for
user_group
in
user_groups_all
if
user_group
not
in
user_groups_select
]
asset_groups
=
[
asset_group
for
asset_group
in
asset_groups_all
if
asset_group
not
in
asset_groups_select
]
else
:
else
:
user_group_name
=
request
.
POST
.
get
(
'user_group_name'
)
user_group_name
=
request
.
POST
.
get
(
'user_group_name'
)
asset_groups_selected
=
request
.
POST
.
getlist
(
'asset_group_permed'
)
asset_groups_selected
=
request
.
POST
.
getlist
(
'asset_group_permed'
)
perm_group_update
(
user_group_name
=
user_group_name
,
asset_groups_id
=
asset_groups_selected
)
perm_group_update
(
user_group_name
=
user_group_name
,
asset_groups_id
=
asset_groups_selected
)
return
HttpResponseRedirect
(
'/jperm/perm_list/'
)
return
HttpResponseRedirect
(
'/jperm/perm_list/'
,
locals
())
return
render_to_response
(
'jperm/perm_edit.html'
,
locals
())
def
perm_detail
(
request
):
def
perm_detail
(
request
):
...
@@ -146,23 +196,6 @@ def perm_asset_detail(request):
...
@@ -146,23 +196,6 @@ def perm_asset_detail(request):
return
render_to_response
(
'jperm/perm_asset_detail.html'
,
locals
())
return
render_to_response
(
'jperm/perm_asset_detail.html'
,
locals
())
def
user_asset_cmd_groups_get
(
user_groups_select
,
asset_groups_select
,
cmd_groups_select
):
user_groups_select_list
=
[]
asset_groups_select_list
=
[]
cmd_groups_select_list
=
[]
for
user_group_id
in
user_groups_select
:
user_groups_select_list
.
append
(
UserGroup
.
objects
.
get
(
id
=
user_group_id
))
for
asset_group_id
in
asset_groups_select
:
asset_groups_select_list
.
append
(
BisGroup
.
objects
.
get
(
id
=
asset_group_id
))
for
cmd_group_id
in
cmd_groups_select
:
cmd_groups_select_list
.
append
(
CmdGroup
.
objects
.
get
(
id
=
cmd_group_id
))
return
user_groups_select_list
,
asset_groups_select_list
,
cmd_groups_select_list
def
sudo_db_add
(
name
,
user_runas
,
user_groups_select
,
asset_groups_select
,
cmd_groups_select
,
comment
):
def
sudo_db_add
(
name
,
user_runas
,
user_groups_select
,
asset_groups_select
,
cmd_groups_select
,
comment
):
user_groups_select_list
,
asset_groups_select_list
,
cmd_groups_select_list
=
\
user_groups_select_list
,
asset_groups_select_list
,
cmd_groups_select_list
=
\
user_asset_cmd_groups_get
(
user_groups_select
,
asset_groups_select
,
cmd_groups_select
)
user_asset_cmd_groups_get
(
user_groups_select
,
asset_groups_select
,
cmd_groups_select
)
...
...
templates/jperm/perm_add.html
View file @
f050866d
This diff is collapsed.
Click to expand it.
templates/jperm/perm_edit.html
View file @
f050866d
This diff is collapsed.
Click to expand it.
templates/jperm/perm_edit_bak.html
0 → 100644
View file @
f050866d
{% extends 'base.html' %}
{% load mytags %}
{% block content %}
<script
type=
"text/javascript"
>
function
search_host
(
text
){
$
(
"#asset_group_unperm"
).
children
().
each
(
function
(){
$
(
this
).
remove
();});
var
permArray
=
[];
$
(
"#asset_group_permed"
).
children
().
each
(
function
(){
permArray
.
push
(
$
(
this
).
text
());
});
$
(
"#asset_groups"
).
children
().
each
(
function
(){
if
(
$
(
this
).
text
().
search
(
text
)
!=
-
1
&&
permArray
.
indexOf
(
$
(
this
).
text
())
==
-
1
)
{
$
(
"#asset_group_unperm"
).
append
(
$
(
this
).
clone
())
}
});
}
</script>
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<!-- title -->
<div
class=
"ibox-title"
>
<h5>
授权编辑表单
<small>
Edit perm of Group
</small></h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
Config option 1
</a>
</li>
<li><a
href=
"#"
>
Config option 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<!-- end title -->
<div
class=
"ibox-content"
>
<div
class=
"row"
>
<div
class=
"col-sm-5 "
>
<div
class=
"form-group"
>
<label></label>
<input
type=
"text"
id=
"group_filter"
placeholder=
"Search"
class=
"form-control"
value=
""
oninput=
"search_host(this.value)"
>
</div>
</div>
<div
class=
"col-sm-1 "
>
<div
class=
"form-group"
>
<label></label>
</div>
</div>
<div
class=
"col-sm-5 "
>
<div
class=
"form-group"
>
<label></label>
<input
type=
"text"
class=
"form-control"
value=
"{{ user_group.name }}"
readonly
>
</div>
</div>
</div>
<form
method=
"post"
action=
""
>
<input
type=
"text"
name=
"user_group_name"
class=
"form-control"
value=
"{{ user_group.name }}"
style=
"display: none"
>
<div
class=
"row"
>
<div
class=
"col-sm-5"
><h4>
未授权主机组
</h4>
<div>
<select
id=
"asset_groups"
name=
"asset_groups"
class=
"form-control"
size=
"10"
multiple
style=
"display: none"
>
{% for asset_group in asset_groups %}
<option
value=
"{{ asset_group.id }}"
>
{{ asset_group.name }}
</option>
{% endfor %}
</select>
<select
id=
"asset_group_unperm"
name=
"asset_group_unperm"
class=
"form-control m-b"
size=
"12"
multiple
>
{% for asset_group in asset_groups_unperm %}
<option
value=
"{{ asset_group.id }}"
>
{{ asset_group.name }}
</option>
{% endfor %}
</select>
</div>
</div>
<div
class=
"col-sm-1"
>
<div
class=
"btn-group"
style=
"margin-top: 50px;"
>
<button
type=
"button"
class=
"btn btn-white"
onclick=
"move('asset_group_unperm', 'asset_group_permed')"
><i
class=
"fa fa-chevron-right"
></i></button>
<button
type=
"button"
class=
"btn btn-white"
onclick=
"move('asset_group_permed', 'asset_group_unperm')"
><i
class=
"fa fa-chevron-left"
></i>
</button>
</div>
</div>
<div
class=
"col-sm-5"
><h4>
授权主机
</h4>
<div>
<select
id=
"asset_group_permed"
name=
"asset_group_permed"
class=
"form-control m-b"
size=
"12"
multiple
>
{% for asset_group in asset_groups_permed %}
<option
value=
"{{ asset_group.id }}"
>
{{ asset_group.name }}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
<button
class=
"btn btn-white"
type=
"submit"
>
取消
</button>
<button
class=
"btn btn-primary"
type=
"submit"
onclick=
"javascript: (function(){$('#asset_group_permed option').each(function(){$(this).prop('selected', true)})})()"
>
确认保存
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
var
str
=
document
.
location
.
pathname
.
split
(
"/"
)[
1
];
var
str1
=
document
.
location
.
pathname
.
split
(
"/"
)[
2
];
$
(
"#"
+
str
).
addClass
(
'active'
);
$
(
"#"
+
str1
).
addClass
(
'active'
);
</script>
{#
<script
type=
"text/javascript"
>
#
}
{
#
$
(
"#asset_group_permed"
).
children
().
each
(
function
(){
#
}
{
#
$
(
"#asset_groups"
).
append
(
$
(
this
).
clone
());
#
}
{
##
}
{
#
if
(
$
(
this
).
prop
(
"selected"
)
==
false
)
{
#
}
{
#
$
(
"#asset_group_unperm"
).
append
(
this
);
#
}
{
#
}
#
}
{
##
}
{
#
$
(
"#asset_groups"
).
children
().
each
(
function
(){
$
(
this
).
prop
(
"selected"
,
false
)});
#
}
{
#
});
#
}
{
#
</script>
#}
{% endblock %}
\ No newline at end of file
templates/jperm/perm_list.html
View file @
f050866d
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-options"
>
<div
class=
"panel-options"
>
<ul
class=
"nav nav-tabs"
>
<ul
class=
"nav nav-tabs"
>
<li
id=
"tab1"
class=
"active"
><a
data-toggle=
"tab"
href=
"#tab-1"
>
授权
编辑
</a></li>
<li
id=
"tab1"
class=
"active"
><a
data-toggle=
"tab"
href=
"#tab-1"
>
授权
查看
</a></li>
<li
id=
"tab2"
class=
""
><a
data-toggle=
"tab"
href=
"#tab-2"
>
查看授权
</a></li>
<li
id=
"tab2"
class=
""
><a
data-toggle=
"tab"
href=
"#tab-2"
>
用户授权详情
</a></li>
<li
style=
"float: right"
>
<li
style=
"float: right"
>
<form
method=
"get"
action=
""
class=
"pull-right mail-search"
>
<form
method=
"get"
action=
""
class=
"pull-right mail-search"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
...
@@ -58,26 +58,32 @@
...
@@ -58,26 +58,32 @@
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<thead>
<tr>
<tr>
<th
class=
"text-center"
>
组名
</th>
<th
class=
"text-center"
>
名称
</th>
<th
class=
"text-center"
>
<th
class=
"text-center"
>
用户组
</th>
<span
class=
"text-muted text-xs block"
>
类型
</span>
<th
class=
"text-center"
>
主机组
</th>
</th>
<th
class=
"text-center"
>
备注
</th>
<th
class=
"text-center"
>
成员数量
</th>
<th
class=
"text-center"
>
授权数量
</th>
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
id=
"perm_edit"
>
<tbody
id=
"perm_edit"
>
{% for
group
in contacts.object_list %}
{% for
perm
in contacts.object_list %}
<tr
class=
"gradeX"
>
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ group.name }}
</td>
<td
class=
"text-center"
>
{{ perm.name }}
</td>
<td
class=
"text-center"
>
{{ group.type|group_type_to_str }}
</td>
<td
class=
"text-center"
>
{{ group.id|member_count }}
</td>
<td
class=
"text-center"
>
{{ group.id|perm_count }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
title=
"[ {{ group.name }} 授权详情 ]"
href=
"../perm_detail/?id={{ group.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
{% for user_group in perm.user_group.all %}
<a
href=
"../perm_edit/?id={{ group.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
{{ user_group.name }}
<a
href=
"../perm_del/?id={{ group.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
{% endfor %}
</td>
<td
class=
"text-center"
>
{% for asset_group in perm.asset_group.all %}
{{ asset_group.name }}
{% endfor %}
</td>
<td
class=
"text-center"
>
{{ perm.comment }}
</td>
<td
class=
"text-center"
>
<a
title=
"[ {{ group.name }} 授权详情 ]"
href=
"../perm_detail/?id={{ perm.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_edit/?id={{ perm.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../perm_del/?id={{ perm.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
@@ -137,11 +143,11 @@
...
@@ -137,11 +143,11 @@
<tbody
id=
"perm_list"
>
<tbody
id=
"perm_list"
>
{% for user in contacts2.object_list %}
{% for user in contacts2.object_list %}
<tr
class=
"gradeX"
>
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ user.name }}
</td>
{#
<td
class=
"text-center"
>
{{ user.name }}
</td>
#}
<td
class=
"text-center"
>
{{ user.id | get_role }}
</td>
{#
<td
class=
"text-center"
>
{{ user.id | get_role }}
</td>
#}
<td
class=
"text-center"
>
{{ user.username | groups_str }}
</td>
{#
<td
class=
"text-center"
>
{{ user.username | groups_str }}
</td>
#}
<td
class=
"text-center"
>
{{ user.id | perm_asset_count }}
</td>
{#
<td
class=
"text-center"
>
{{ user.id | perm_asset_count }}
</td>
#}
<td
class=
"text-center"
>
{#
<td
class=
"text-center"
>
#}
<a
title=
"[ {{ user.name }} ] 授权详情"
href=
"../perm_asset_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
title=
"[ {{ user.name }} ] 授权详情"
href=
"../perm_asset_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
</td>
</td>
</tr>
</tr>
...
...
templates/nav.html
View file @
f050866d
...
@@ -32,8 +32,18 @@
...
@@ -32,8 +32,18 @@
<li
id=
"jperm"
>
<li
id=
"jperm"
>
<a
href=
"#"
><i
class=
"fa fa-edit"
></i>
<span
class=
"nav-label"
>
授权管理
</span><span
class=
"fa arrow"
></span></a>
<a
href=
"#"
><i
class=
"fa fa-edit"
></i>
<span
class=
"nav-label"
>
授权管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<ul
class=
"nav nav-second-level"
>
<li
id=
"perm_list"
><a
href=
"/jperm/perm_list/"
>
主机授权
</a></li>
<li
id=
"perm_list"
><a
href=
"/jperm/perm_list/"
>
主机授权
<span
class=
"fa arrow"
></span></a>
<li
class=
"active"
>
<ul
class=
"nav nav-third-level"
>
<li
id=
"perm_add"
>
<a
href=
"/jperm/perm_add/"
>
授权添加
</a>
</li>
<li
id=
"perm_list"
>
<a
href=
"/jperm/perm_list/"
>
授权查看
</a>
</li>
</ul>
</li>
<li>
<a
href=
"#"
>
Sudo授权
<span
class=
"fa arrow"
></span></a>
<a
href=
"#"
>
Sudo授权
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-third-level"
>
<ul
class=
"nav nav-third-level"
>
<li
id=
"cmd_add"
>
<li
id=
"cmd_add"
>
...
...
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