mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
nest insights api response data
This commit is contained in:
parent
fb53ca8455
commit
9ba0ba07ec
@ -2077,6 +2077,7 @@ class HostInsights(GenericAPIView):
|
||||
def get(self, request, *args, **kwargs):
|
||||
host = self.get_object()
|
||||
cred = None
|
||||
ret = {}
|
||||
|
||||
if host.insights_system_id is None:
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
@ -2102,7 +2103,8 @@ class HostInsights(GenericAPIView):
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
try:
|
||||
return Response(res.json())
|
||||
ret['insights_content'] = res.json()
|
||||
return Response(ret)
|
||||
except ValueError:
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user