Пример #1
0
def node_detail_view(request, name, node_test_id):
    data={}
    t = NodeTest.objects.select_related().filter(id=node_test_id)
    print t
    data["node"] = t
    data["breadcrumb"] = functions.breadcrumb(name)
    return render(request,'node_view_detail.html',data)
Пример #2
0
def node_year_month_day_id(request, name, year, month, day, job_id):
    data={}
    t = NodeTest.objects.select_related().filter(id=job_id)
    print t
    data["node"] = t
    data["breadcrumb"] = functions.breadcrumb(name, year, month, day, job_id)
    return render(request,'node_view_detail.html',data)
Пример #3
0
def node_snapshot(request):
    t = functions.node_snapshot()
    data = functions.paginator(request, t)
    data["breadcrumb"] = functions.breadcrumb('snapshot')
    return render(request,'node_view.html', data)
    
    
    
    
    
    
    
    
    
    
    
    
Пример #4
0
def node_query(request):
    data={}
    form_node=NodeQueryForm(request.POST or None, initial={'username': '******'})
    data["form_node"]= form_node
    data["breadcrumb"] = functions.breadcrumb()
   
    if request.method == 'POST':
        if form_node.is_valid(): 
            node_name=form_node.cleaned_data['node_name']
            link_str = ["/benchmarks/nodes"]
            link_str.append(node_name)
            date_str = form_node.cleaned_data['date']
            if date_str == "":
                return HttpResponseRedirect("/".join(link_str))     
            d_year = date_str[:4]
            d_month = date_str[5:7]
            d_day = date_str[8:10]
            link_str.append(str(d_year))   
            link_str.append(str(d_month))
            link_str.append(str(d_day))
                
            return HttpResponseRedirect("/".join(link_str)) 
         
    return render(request,'node_query.html', data)
Пример #5
0
def node(request, name):  
    t = functions.query(name)
    data = functions.paginator(request, t)
    data["breadcrumb"] = functions.breadcrumb(name)
    return render(request,'node_view.html', data)
Пример #6
0
def node_year_month_day(request, name, year, month, day):
    t = functions.query(name, year, month, day)
    data = functions.paginator(request, t)
    data["breadcrumb"] = functions.breadcrumb(name,year,month,day)
    return render(request,'node_view.html', data)