mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-25 02:03:37 -05:00
24 lines
635 B
Python
24 lines
635 B
Python
# Copyright (c) 2018 Red Hat, Inc.
|
|
# All Rights Reserved.
|
|
|
|
from awx.main.models import InstanceLink, Instance
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from awx.api.generics import APIView, Response
|
|
|
|
from awx.api.serializers import InstanceLinkSerializer, InstanceNodeSerializer
|
|
|
|
|
|
class MeshVisualizer(APIView):
|
|
|
|
name = _("Mesh Visualizer")
|
|
|
|
def get(self, request, format=None):
|
|
|
|
data = {
|
|
'nodes': InstanceNodeSerializer(Instance.objects.all(), many=True).data,
|
|
'links': InstanceLinkSerializer(InstanceLink.objects.all(), many=True).data,
|
|
}
|
|
|
|
return Response(data)
|