blob: 336533cc1b6a7631bac038997c32690c89550daf [file] [log] [blame]
showardce12f552008-09-19 00:48:59 +00001import django.http
2from new_tko.tko import rpc_interface, graphing_utils
showard35444862008-08-07 22:35:30 +00003from autotest_lib.frontend.afe import rpc_handler
4
5rpc_handler_obj = rpc_handler.RpcHandler((rpc_interface,),
6 document_module=rpc_interface)
7
8
9def handle_rpc(request):
10 return rpc_handler_obj.handle_rpc_request(request)
showardce12f552008-09-19 00:48:59 +000011
12
showardef6fe022009-03-27 20:55:16 +000013def handle_jsonp_rpc(request):
14 return rpc_handler_obj.handle_jsonp_rpc_request(request)
15
16
17def rpc_documentation(request):
18 return rpc_handler_obj.get_rpc_documentation()
19
20
showardce12f552008-09-19 00:48:59 +000021def handle_plot(request):
22 id = request.GET['id']
23 max_age = request.GET['max_age']
24 return django.http.HttpResponse(
25 graphing_utils.handle_plot_request(id, max_age), mimetype='image/png')