Beispiel #1
0
def HttpMonitorEdit(request, uuid):
    """ http监控列表 """
    data = MonitorHttp.objects.get(pk=uuid)
    if request.method == 'POST':
        uf = MonitorHttpForm(request.POST, instance=data)
        if uf.is_valid():
            uf.save()
    uf = MonitorHttpForm(instance=data)
    return render_to_response('monitor/httpedit.html', locals(), context_instance=RequestContext(request))
Beispiel #2
0
def HttpMonitor(request):
    """ 添加http监控 """
    if request.method == 'POST':
        uf = MonitorHttpForm(request.POST)
        if uf.is_valid():
            uf.save()
    else:
        uf = MonitorHttpForm()
    return render_to_response('monitor/httpadd.html', locals(), context_instance=RequestContext(request))