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
601747ac
Commit
601747ac
authored
Nov 26, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2afce31e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
21 deletions
+8
-21
perm_api.py
jperm/perm_api.py
+2
-2
asset_list.html
templates/jasset/asset_list.html
+6
-19
No files found.
jperm/perm_api.py
View file @
601747ac
...
@@ -160,7 +160,7 @@ def gen_resource(ob, ex='', perm=None):
...
@@ -160,7 +160,7 @@ def gen_resource(ob, ex='', perm=None):
except
IndexError
:
except
IndexError
:
continue
continue
info
[
'username'
]
=
role
.
name
info
[
'username'
]
=
role
.
name
info
[
'password'
]
=
role
.
password
info
[
'password'
]
=
CRYPTOR
.
decrypt
(
role
.
password
)
info
[
'ssh_key'
]
=
get_role_key
(
ob
,
role
)
info
[
'ssh_key'
]
=
get_role_key
(
ob
,
role
)
res
.
append
(
info
)
res
.
append
(
info
)
elif
isinstance
(
ob
,
User
):
elif
isinstance
(
ob
,
User
):
...
@@ -175,7 +175,7 @@ def gen_resource(ob, ex='', perm=None):
...
@@ -175,7 +175,7 @@ def gen_resource(ob, ex='', perm=None):
except
IndexError
:
except
IndexError
:
continue
continue
info
[
'username'
]
=
role
.
name
info
[
'username'
]
=
role
.
name
info
[
'password'
]
=
role
.
password
info
[
'password'
]
=
CRYPTOR
.
decrypt
(
role
.
password
)
info
[
'ssh_key'
]
=
get_role_key
(
ob
,
role
)
info
[
'ssh_key'
]
=
get_role_key
(
ob
,
role
)
res
.
append
(
info
)
res
.
append
(
info
)
elif
isinstance
(
ob
,
(
list
,
QuerySet
)):
elif
isinstance
(
ob
,
(
list
,
QuerySet
)):
...
...
templates/jasset/asset_list.html
View file @
601747ac
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<form
id=
"asset_form"
>
<form
id=
"asset_form"
>
{#
<div
class=
"col-sm-1"
>
#}
<div
class=
"col-sm-1"
style=
"padding-left: 0"
>
{#
<a
target=
"_blank"
href=
"/jasset/group_add/"
class=
"btn btn-sm btn-primary "
>
添加资产
</a>
#}
<a
target=
"_blank"
href=
"/jasset/group_add/"
class=
"btn btn-sm btn-primary "
>
添加资产
</a>
{#
</div>
#}
</div>
<div
class=
"col-sm-8"
style=
"padding-left: 0px"
>
<a
target=
"_blank"
href=
"/jasset/group_add/"
class=
"btn btn-sm btn-primary"
>
添加资产
</a
>
<div
class=
"col-sm-7"
style=
"padding-left: 0px"
>
<label>
<label>
<select
name=
"idc"
class=
"form-control m-b"
onchange=
"change_info()"
>
<select
name=
"idc"
class=
"form-control m-b"
onchange=
"change_info()"
>
<option
value=
""
>
IDC机房
</option>
<option
value=
""
>
IDC机房
</option>
...
@@ -55,19 +55,6 @@
...
@@ -55,19 +55,6 @@
</select>
</select>
</label>
</label>
<label>
<select
name=
"group"
class=
"form-control m-b"
onchange=
"change_info()"
>
<option
value=
""
>
主机组
</option>
{% for asset_group in asset_group_all %}
{% ifequal asset_group.name group_name %}
<option
value=
"{{ asset_group.name }}"
selected
>
{{ asset_group.name }}
</option>
{% else %}
<option
value=
"{{ asset_group.name }}"
>
{{ asset_group.name }}
</option>
{% endifequal %}
{% endfor %}
</select>
</label>
<label>
<label>
<select
name=
"asset_type"
class=
"form-control m-b"
onchange=
"change_info()"
>
<select
name=
"asset_type"
class=
"form-control m-b"
onchange=
"change_info()"
>
<option
value=
""
>
所有类型
</option>
<option
value=
""
>
所有类型
</option>
...
@@ -95,7 +82,7 @@
...
@@ -95,7 +82,7 @@
</label>
</label>
</div>
</div>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
style=
"padding-right: 0"
>
<div
class=
"input-group inline-group"
>
<div
class=
"input-group inline-group"
>
<input
type=
"text"
class=
"form-control m-b"
id=
"search_input"
name=
"keyword"
value=
"{{ keyword }}"
placeholder=
"Search"
>
<input
type=
"text"
class=
"form-control m-b"
id=
"search_input"
name=
"keyword"
value=
"{{ keyword }}"
placeholder=
"Search"
>
<input
type=
"text"
style=
"display: none"
>
<input
type=
"text"
style=
"display: none"
>
...
...
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