def audit_log(request): flag = check_permission(u'操作日志',request.user.username) if flag < 1: return render(request,request,'public/no_passing.html') path = request.path.split('/')[1] return render(request,'audit/audit_log.html',{'user':request.user.username, 'path1':'audit', 'path2':path, 'page_name1':u'运维审计', 'page_name2':u'操作日志'})
def chpasswd(request): flag = check_permission(u'修改密码',request.user.username) if flag < 1: return render_to_response('public/no_passing.html') path = request.path.split('/')[1] return render_to_response('user_manage/chpasswd.html',{'user':request.user.username, 'path1':'user_manage', 'path2':path, 'page_name1':u'用户管理', 'page_name2':u'修改密码',})
def nagios(request): flag = check_permission(u'nagios',request.user.username) if flag < 1: return render(request,'public/no_passing.html') path = request.path.split('/')[1] return render(request,'monitor/nagios.html',{'user':request.user.username, 'path1':'monitor', 'path2':path, 'page_name1':u'监控', 'page_name2':'nagios'})
def assets_image(request): flag = check_permission(u'资产统计图',request.user.username) if flag < 1: return render(request,'public/no_passing.html') path = request.path.split('/')[1] return render(request,'assets/assets_image.html',{'user':request.user.username, 'path1':'assets', 'path2':path, 'page_name1':u'资产管理', 'page_name2':u'资产统计图'})
def cmd_template(request): flag = check_permission(u'命令模板',request.user.username) if flag < 1: return render(request,'public/no_passing.html') path = request.path.split('/')[1] return render(request,'operation/cmd_template.html',{'user':request.user.username, 'path1':'operation', 'path2':path, 'page_name1':u'运维操作', 'page_name2':u'命令模板'})
def fortress_server(request): flag = check_permission(u'堡垒机',request.user.username) if flag < 1: return render(request,'public/no_passing.html') path = request.path.split('/')[1] return render(request,'operation/fortress_server.html',{'user':request.user.username, 'path1':'operation', 'path2':path, 'page_name1':u'运维操作', 'page_name2':u'堡垒机'})
def zabbix(request): flag = check_permission(u'zabbix',request.user.username) if flag < 1: return render_to_response('public/no_passing.html') path = request.path.split('/')[1] return render_to_response('monitor/zabbix.html',{'user':request.user.username, 'path1':'monitor', 'path2':path, 'page_name1':u'监控', 'page_name2':'zabbix'})
def assets_log(request): flag = check_permission(u'出入库记录',request.user.username) if flag < 1: return render_to_response('public/no_passing.html') path = request.path.split('/')[1] return render_to_response('assets/assets_log.html',{'user':request.user.username, 'path1':'assets', 'path2':path, 'page_name1':u'资产管理', 'page_name2':u'出入库记录'})
def salt_pillar(request): flag = check_permission(u'state模块定义',request.user.username) if flag < 1: return render(request,'public/no_passing.html') path = request.path.split('/')[1] return render(request,'saltstack/salt_pillar.html',{'user':request.user.username, 'path1':'saltstack', 'path2':path, 'page_name1':u'saltstack', 'page_name2':u'pillar参数定义'})
def server_operation(request): flag = check_permission(u'服务器操作',request.user.username) if flag < 1: return render_to_response('public/no_passing.html') path = request.path.split('/')[1] return render_to_response('operation/server_operation.html',{'user':request.user.username, 'path1':'operation', 'path2':path, 'page_name1':u'运维操作', 'page_name2':u'服务器操作'})
def salt_pillar(request): flag = check_permission(u"state模块定义", request.user.username) if flag < 1: return render(request, "public/no_passing.html") path = request.path.split("/")[1] return render( request, "saltstack/salt_pillar.html", { "user": request.user.username, "path1": "saltstack", "path2": path, "page_name1": u"saltstack", "page_name2": u"pillar参数定义", }, )