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
79e81340
Commit
79e81340
authored
Oct 21, 2015
by
ibuler@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify log
parent
4baffed4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
perm_api.py
jperm/perm_api.py
+2
-1
perm_log.html
templates/jperm/perm_log.html
+19
-3
No files found.
jperm/perm_api.py
View file @
79e81340
...
@@ -204,7 +204,8 @@ def _public_perm_api(info):
...
@@ -204,7 +204,8 @@ def _public_perm_api(info):
new_assets
.
extend
(
user_group_permed
(
user_group
)
.
get
(
'assets'
,
[]))
new_assets
.
extend
(
user_group_permed
(
user_group
)
.
get
(
'assets'
,
[]))
perm_info
=
{
perm_info
=
{
'new'
:
{
'action'
:
'new user: '
+
user
.
name
,
'users'
:
[
user
],
'assets'
:
new_assets
}
'action'
:
'new user: '
+
user
.
name
,
'new'
:
{
'users'
:
[
user
],
'assets'
:
new_assets
}
}
}
elif
info
.
get
(
'type'
)
==
'edit_user'
:
elif
info
.
get
(
'type'
)
==
'edit_user'
:
new_assets
=
[]
new_assets
=
[]
...
...
templates/jperm/perm_log.html
View file @
79e81340
...
@@ -40,7 +40,8 @@
...
@@ -40,7 +40,8 @@
<thead>
<thead>
<tr>
<tr>
<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>
<th
class=
"text-center"
>
完成
</th>
<th
class=
"text-center"
>
完成
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -48,10 +49,13 @@
...
@@ -48,10 +49,13 @@
{% for log in logs %}
{% for log in logs %}
<tr
class=
"gradeX"
>
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ log.datetime | date:"Y-n-d G:i:s" }}
</td>
<td
class=
"text-center"
>
{{ log.datetime | date:"Y-n-d G:i:s" }}
</td>
<td
class=
"text-center"
>
{{ log.action }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
{{ log.result | result2bool | safe }}
<a
class=
"log_result"
value=
"{{ log.results }}"
>
{{ log.is_success | yesno:"是,否,为止" }}
</a>
</td>
</td>
<td
class=
"text-center"
>
{{ log.is_finish
ed
| yesno:"是,否,为止" }}
</td>
<td
class=
"text-center"
>
{{ log.is_finish | yesno:"是,否,为止" }}
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</tbody>
...
@@ -70,4 +74,15 @@
...
@@ -70,4 +74,15 @@
</div>
</div>
</div>
</div>
{% endblock %}
{% block self_footer_js %}
<script>
$
(
'document'
).
ready
(
function
(){
$
(
'.log_result'
).
click
(
function
(){
alert
(
$
(
this
).
attr
(
'value'
))
})
})
</script>
{% endblock %}
{% endblock %}
\ 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