Remove basic option from api view
This commit is contained in:
parent
d9bbeea892
commit
b7f2e9cfe6
@ -28,7 +28,6 @@ class DashboardApiView(ApiTokenRequiredMixin, DateRangeMixin, View):
|
|||||||
if uuid and is_valid_uuid(uuid):
|
if uuid and is_valid_uuid(uuid):
|
||||||
services = services.filter(uuid=uuid)
|
services = services.filter(uuid=uuid)
|
||||||
|
|
||||||
basic = request.GET.get('basic', '0').lower() in ('1', 'true')
|
|
||||||
try:
|
try:
|
||||||
start = self.get_start_date()
|
start = self.get_start_date()
|
||||||
end = self.get_end_date()
|
end = self.get_end_date()
|
||||||
@ -40,13 +39,12 @@ class DashboardApiView(ApiTokenRequiredMixin, DateRangeMixin, View):
|
|||||||
'name': s.name,
|
'name': s.name,
|
||||||
'uuid': s.uuid,
|
'uuid': s.uuid,
|
||||||
'link': s.link,
|
'link': s.link,
|
||||||
'stats': s.get_core_stats(start, end, basic),
|
'stats': s.get_core_stats(start, end),
|
||||||
}
|
}
|
||||||
for s in services
|
for s in services
|
||||||
]
|
]
|
||||||
|
|
||||||
if not basic:
|
services_data = self._convert_querysets_to_lists(services_data)
|
||||||
services_data = self._convert_querysets_to_lists(services_data)
|
|
||||||
|
|
||||||
return JsonResponse(data={'services': services_data})
|
return JsonResponse(data={'services': services_data})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user