Bug fix to Django view for statistics
Sapan Bhatia [Sat, 10 Jan 2015 04:51:57 +0000 (04:51 +0000)]
planetstack/core/views/stats.py

index 46ebe2e..421fbfe 100644 (file)
@@ -5,7 +5,8 @@ import json
 def Stats(request):
     model = request.GET['model_name']
     pk = int(request.GET['pk'])
-    meter = int(request.GET['meter'])
+    meter = request.GET['meter']
+    controller_name = request.GET['controller_name']
     
-    meters = monitor.get_meters(meter, model, pk)
-    return json.dumps(meters)
+    meters = driver.get_meter(meter, model, pk)
+    return HttpResponse(json.dumps(meters))