blob: 421fbfe79b6c444f6f3a1dd25a7aa5ebba161003 [file] [log] [blame]
Sapan Bhatia11a32942015-01-07 01:09:02 -05001from django.http import HttpResponse
2from monitor import driver
3import json
4
5def Stats(request):
6 model = request.GET['model_name']
7 pk = int(request.GET['pk'])
Sapan Bhatia0255e202015-01-10 04:51:57 +00008 meter = request.GET['meter']
9 controller_name = request.GET['controller_name']
Sapan Bhatia11a32942015-01-07 01:09:02 -050010
Sapan Bhatia0255e202015-01-10 04:51:57 +000011 meters = driver.get_meter(meter, model, pk)
12 return HttpResponse(json.dumps(meters))