added json to timerange failures
This commit is contained in:
@@ -89,6 +89,10 @@ def failswindow(request):
|
|||||||
period=request.GET['window']
|
period=request.GET['window']
|
||||||
m = re.match("(\d+)([ymwdh])", period)
|
m = re.match("(\d+)([ymwdh])", period)
|
||||||
failures = get_fails_in_timerange(period)
|
failures = get_fails_in_timerange(period)
|
||||||
|
if request.GET.has_key('json'):
|
||||||
|
jtext = list(failures)
|
||||||
|
return HttpResponse(json.dumps(jtext))
|
||||||
|
else:
|
||||||
if m.group(2) == 'd':
|
if m.group(2) == 'd':
|
||||||
prd='days'
|
prd='days'
|
||||||
elif m.group(2) == 'h':
|
elif m.group(2) == 'h':
|
||||||
|
|||||||
Reference in New Issue
Block a user