def bucket(request): bucketid = request.GET.get("id", "") if not bucketid: return HttpResponse("") oopses = cassandra.get_crashes_for_bucket(bucketid) stacktrace = cassandra.get_stacktrace_for_bucket(bucketid) c = {"bucket": "<br>".join(bucketid.split(":")), "oopses": oopses, "stacktrace": stacktrace} return render(request, "bucket.html", c)
def most_common_problems_in_the_past_interval(request): buckets = cassandra.get_bucket_counts_for_today(filter_less_than=20) rows = [] for bucket, count in buckets: package, version = cassandra.get_package_for_bucket(bucket) rows.append( { "count": count, "package": package, "seen": version, "function": bucket, "examples": cassandra.get_crashes_for_bucket(bucket, 5), "report": "", } ) c = {"rows": rows} return render(request, "most_common.html", c)