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
6ae49075
Commit
6ae49075
authored
Nov 21, 2015
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f863f4b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
urls.py
juser/urls.py
+2
-0
views.py
juser/views.py
+7
-2
nav.html
templates/nav.html
+3
-0
No files found.
juser/urls.py
View file @
6ae49075
...
...
@@ -28,4 +28,6 @@ urlpatterns = patterns('juser.views',
(
r'^change_role/$'
,
'chg_role'
),
(
r'^regen_ssh_key/$'
,
'regen_ssh_key'
),
(
r'^down_key/$'
,
'down_key'
),
(
r'runcommand/$'
,
'RunCommand'
),
)
juser/views.py
View file @
6ae49075
...
...
@@ -487,4 +487,9 @@ def down_key(request):
response
[
'Content-Disposition'
]
=
'attachment; filename=
%
s'
%
os
.
path
.
basename
(
private_key_file
)
return
response
return
HttpResponse
(
'No Key File. Contact Admin.'
)
\ No newline at end of file
return
HttpResponse
(
'No Key File. Contact Admin.'
)
from
jperm.perm_api
import
get_group_user_perm
def
RunCommand
(
request
):
if
request
.
method
==
'GET'
:
print
return
render_to_response
(
'juser/run_command.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
\ No newline at end of file
templates/nav.html
View file @
6ae49075
...
...
@@ -128,6 +128,9 @@
<li
class=
"apply_show online"
><a
href=
"/jperm/apply_show/online/"
>
申请记录
</a></li>
</ul>
</li>
<li
id=
"command"
>
<a
href=
"/juser/runcommand/"
><span>
批量执行命令
</span></a>
</li>
<li
id=
"jlog"
>
<a
href=
"/jlog/log_list/online/"
><i
class=
"fa fa-files-o"
></i>
<span
class=
"nav-label"
>
登录历史
</span><span
class=
"label label-info pull-right"
></span></a>
</li>
...
...
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