Sapan Bhatia | 11a3294 | 2015-01-07 01:09:02 -0500 | [diff] [blame^] | 1 | from django.http import HttpResponse |
2 | from monitor import driver | ||||
3 | import json | ||||
4 | |||||
5 | def Stats(request): | ||||
6 | model = request.GET['model_name'] | ||||
7 | pk = int(request.GET['pk']) | ||||
8 | meter = int(request.GET['meter']) | ||||
9 | |||||
10 | meters = monitor.get_meters(meter, model, pk) | ||||
11 | return json.dumps(meters) |