mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Join across the InstanceLink.target to the underlying Instance
to avoid having to do a lookup for every instance in the list for the mesh visualizer endpoint.
This commit is contained in:
parent
7a1ed406da
commit
8c7c00451a
@ -17,7 +17,7 @@ class MeshVisualizer(APIView):
|
||||
def get(self, request, format=None):
|
||||
data = {
|
||||
'nodes': InstanceNodeSerializer(Instance.objects.all(), many=True).data,
|
||||
'links': InstanceLinkSerializer(InstanceLink.objects.select_related('target', 'source'), many=True).data,
|
||||
'links': InstanceLinkSerializer(InstanceLink.objects.select_related('target__instance', 'source'), many=True).data,
|
||||
}
|
||||
|
||||
return Response(data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user