From 6ae4907520f18d1cce2e7aafc6cf82829a6ff61b Mon Sep 17 00:00:00 2001 From: liuzheng712 Date: Sat, 21 Nov 2015 21:24:01 +0800 Subject: [PATCH] update --- juser/urls.py | 2 ++ juser/views.py | 7 ++++++- templates/nav.html | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/juser/urls.py b/juser/urls.py index 9764c01ce..bfd3a6270 100644 --- a/juser/urls.py +++ b/juser/urls.py @@ -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'), ) diff --git a/juser/views.py b/juser/views.py index 84f39954b..59f542729 100644 --- a/juser/views.py +++ b/juser/views.py @@ -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 diff --git a/templates/nav.html b/templates/nav.html index c5d46fb54..d45ea0ea6 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -128,6 +128,9 @@
  • 申请记录
  • +
  • + 批量执行命令 +
  • 登录历史