allow returning all check data

This commit is contained in:
sadnub
2021-01-10 15:14:02 -05:00
parent 4a649a6b8b
commit c9d6fe9dcd
2 changed files with 7 additions and 5 deletions

View File

@@ -146,11 +146,12 @@ class CheckHistory(APIView):
timeFilter = Q()
if "timeFilter" in request.data:
timeFilter = Q(
x__lte=djangotime.make_aware(dt.today()),
x__gt=djangotime.make_aware(dt.today())
- djangotime.timedelta(days=request.data["timeFilter"]),
)
if timeFilter != 0:
timeFilter = Q(
x__lte=djangotime.make_aware(dt.today()),
x__gt=djangotime.make_aware(dt.today())
- djangotime.timedelta(days=request.data["timeFilter"]),
)
check_history = check.check_history.filter(timeFilter).order_by("-x")

View File

@@ -54,6 +54,7 @@ export default {
{ value: 1, label: "Last 24 Hours" },
{ value: 7, label: "Last 7 Days" },
{ value: 30, label: "Last 30 Days" },
{ value: 0, label: "Everything" },
],
chartOptions: {
tooltip: {