refactor(recorder): Render each call separately

This commit is contained in:
Aditya Hase 2018-10-22 21:33:59 +05:30
parent a8341a2c3e
commit 8a6017a78e
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,8 @@
<template>
<div>
{{ calls }}
<div v-for="call in calls" :key="call.function">
{{ call }}
</div>
</div>
</template>

View file

@ -17,7 +17,6 @@ def get_paths():
counts = super(redis.Redis, frappe.cache()).hgetall(frappe.cache().make_key("recorder-paths-counts"))
paths = [{"path": path.decode(), "count": int(counts[path])} for path in paths]
print(counts, paths)
return paths
@frappe.whitelist()
@ -29,5 +28,5 @@ def get_requests(path):
@frappe.whitelist()
def get_calls(uuid):
calls = frappe.cache().lrange("recorder-calls-{}".format(uuid), 0, -1)
calls = list(map(lambda call: call.decode(), calls))
calls = list(map(lambda call: json.loads(call.decode()), calls))
return calls