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
c18290c6
Commit
c18290c6
authored
Nov 04, 2014
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill session
parent
19b94655
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
3 deletions
+13
-3
urls.py
webroot/AutoSa/AutoSa/urls.py
+1
-0
views.py
webroot/AutoSa/AutoSa/views.py
+11
-0
base.html
webroot/AutoSa/templates/base.html
+0
-2
logView.html
webroot/AutoSa/templates/logView.html
+1
-1
No files found.
webroot/AutoSa/AutoSa/urls.py
View file @
c18290c6
...
...
@@ -33,4 +33,5 @@ urlpatterns = patterns('',
(
r'^downFile/$'
,
views
.
downFile
),
(
r'^logView/$'
,
views
.
logView
),
(
r'^logHistory/$'
,
views
.
logHistory
),
(
r'^killSession/$'
,
views
.
killSession
),
)
webroot/AutoSa/AutoSa/views.py
View file @
c18290c6
...
...
@@ -990,6 +990,17 @@ def logHistory(request):
return
HttpResponse
(
content
)
@admin_required
def
killSession
(
request
):
if
request
.
method
==
'GET'
:
logid
=
request
.
GET
.
get
(
'id'
,
0
)
pid
=
Pid
.
objects
.
filter
(
logid
=
logid
)
if
pid
:
pid
=
pid
[
0
]
os
.
kill
(
pid
.
cpid
,
9
)
...
...
webroot/AutoSa/templates/base.html
View file @
c18290c6
...
...
@@ -104,8 +104,6 @@
<ul
id=
"userMenu"
class=
"nav nav-list navbar-collapse.in menu-second"
>
<li><a
href=
"/showUser/"
><i
class=
"glyphicon glyphicon-send"
></i>
查看用户
</a></li>
<li><a
href=
"/addUser/"
><i
class=
"glyphicon glyphicon-send"
></i>
添加用户
</a></li>
<li><a
href=
"/showGroup/"
><i
class=
"glyphicon glyphicon-send"
></i>
查看属组
</a></li>
<li><a
href=
"/addGroup/"
><i
class=
"glyphicon glyphicon-send"
></i>
添加属组
</a></li>
</ul>
<!--<div class="menu-first" ><a href="#monitorMenu" data-toggle="collapse"><i class="glyphicon glyphicon-th"></i> 执行命令</a></div>
<ul id="monitorMenu" class="nav nav-list navbar-collapse.in menu-second">
...
...
webroot/AutoSa/templates/logView.html
View file @
c18290c6
...
...
@@ -24,7 +24,7 @@
<td>
{{ log.host }}
</td>
<td><a
href=
"#"
>
监控
</a></td>
<td><a
href=
"/logHistory/?id={{ log.id }}"
class=
"log_command"
>
命令统计
</a></td>
<td><a
href=
"
#
"
>
阻断
</a>
</td>
<td><a
href=
"
/killSession/?id={{ log.id }}}}
"
>
阻断
</a>
</td>
<td>
{{ log.start_time|stamp2str }}
</td>
<td>
{{ log.end_time|stamp2str }}
</td>
</tr>
...
...
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