def queue_detail(request, server_id, queue_id, xml=False): server = Server(server_id) queue = Queue(server, queue_id) if xml: return HttpResponse(serializers.serialize('xml', [queue], indent=True), mimetype='text/xml') return render_to_response('pbs_servers/queue_detail.html', locals(), context_instance=RequestContext(request))
def node_list(request, server_id, xml=False): server = Server(server_id) if xml: return HttpResponse(serializers.serialize('xml', server.node_list, indent=True), mimetype='text/xml') return render_to_response('pbs_servers/node_list.html', locals(), context_instance=RequestContext(request))
def server_detail(request, server_id, xml=False): if not server_id in settings.LOCAL_PBS_SERVERS: raise Http404 server = Server(server_id) c_used, c_total = server.cpu_stats() c_percent = (float(c_used)/float(c_total))*100.00 if xml: return HttpResponse(serializers.serialize('xml', [server], indent=True), mimetype='text/xml') return render_to_response('pbs_servers/server_detail.html', locals(), context_instance=RequestContext(request))
def job_detail(request, job_id, server_id=None, xml=False): id, server = job_id.split('.', 1) try: job = Job(Server(server), id) except: raise Http404 if xml: return HttpResponse(serializers.serialize('xml', [job], indent=True), mimetype='text/xml') return render_to_response('pbs_jobs/job_detail.html', locals(), context_instance=RequestContext(request))
def server_detail(request, server_id, xml=False): if not server_id in settings.LOCAL_PBS_SERVERS: raise Http404 server = Server(server_id) c_used, c_total = server.cpu_stats() c_percent = (float(c_used) / float(c_total)) * 100.00 if xml: return HttpResponse(serializers.serialize('xml', [server], indent=True), mimetype='text/xml') return render_to_response('pbs_servers/server_detail.html', locals(), context_instance=RequestContext(request))