pull/26/head
liuzheng712 9 years ago
parent f863f4b7ae
commit 6ae4907520

@ -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'),
)

@ -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.')
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))

@ -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>

Loading…
Cancel
Save