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
1338d25b
Commit
1338d25b
authored
May 10, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
fix bug
parents
9f171da5
f994c4d1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
5 deletions
+8
-5
connect.py
connect.py
+3
-0
views.py
jperm/views.py
+2
-0
perm_role_detail.html
templates/jperm/perm_role_detail.html
+0
-0
perm_role_list.html
templates/jperm/perm_role_list.html
+1
-3
perm_rule_list.html
templates/jperm/perm_rule_list.html
+1
-1
perm_sudo_list.html
templates/jperm/perm_sudo_list.html
+1
-1
No files found.
connect.py
View file @
1338d25b
...
...
@@ -518,7 +518,10 @@ class Nav(object):
@staticmethod
def
get_max_asset_property_length
(
assets
,
property_
=
'hostname'
):
try
:
return
max
([
len
(
getattr
(
asset
,
property_
))
for
asset
in
assets
])
except
ValueError
:
return
30
def
print_search_result
(
self
):
hostname_max_length
=
self
.
get_max_asset_property_length
(
self
.
search_result
)
...
...
jperm/views.py
View file @
1338d25b
...
...
@@ -16,6 +16,7 @@ from jperm.ansible_api import MyTask
from
jperm.perm_api
import
get_role_info
,
get_role_push_host
from
jumpserver.api
import
my_render
,
get_object
,
CRYPTOR
# 设置PERM APP Log
from
jumpserver.api
import
logger
#logger = set_log(LOG_LEVEL, filename='jumpserver_perm.log')
...
...
@@ -416,6 +417,7 @@ def perm_role_detail(request):
users
=
role_info
.
get
(
"users"
)
user_groups
=
role_info
.
get
(
"user_groups"
)
pushed_asset
,
need_push_asset
=
get_role_push_host
(
get_object
(
PermRole
,
id
=
role_id
))
except
ServerError
,
e
:
logger
.
warning
(
e
)
...
...
templates/jperm/perm_role_detail.html
View file @
1338d25b
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_list.html
View file @
1338d25b
...
...
@@ -70,7 +70,7 @@
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{
users.start_index }} to {{ user
s.end_index }} of {{ p.count }} entries
Showing {{
roles.start_index }} to {{ role
s.end_index }} of {{ p.count }} entries
</div>
</div>
{% include 'paginator.html' %}
...
...
@@ -80,8 +80,6 @@
</div>
</div>
</div>
<script>
function
remove_role
(
role_id
){
$
.
ajax
({
...
...
templates/jperm/perm_rule_list.html
View file @
1338d25b
...
...
@@ -89,7 +89,7 @@
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{
users.start_index }} to {{ user
s.end_index }} of {{ p.count }} entries
Showing {{
rules.start_index }} to {{ rule
s.end_index }} of {{ p.count }} entries
</div>
</div>
{% include 'paginator.html' %}
...
...
templates/jperm/perm_sudo_list.html
View file @
1338d25b
...
...
@@ -72,7 +72,7 @@
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{
users.start_index }} to {{ user
s.end_index }} of {{ p.count }} entries
Showing {{
sudos.start_index }} to {{ sudo
s.end_index }} of {{ p.count }} entries
</div>
</div>
{% include 'paginator.html' %}
...
...
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