added json to timerange failures
This commit is contained in:
@@ -89,6 +89,10 @@ def failswindow(request):
|
||||
period=request.GET['window']
|
||||
m = re.match("(\d+)([ymwdh])", 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':
|
||||
prd='days'
|
||||
elif m.group(2) == 'h':
|
||||
|
||||
Reference in New Issue
Block a user