diff --git a/gns3server/handlers/api/controller/server_handler.py b/gns3server/handlers/api/controller/server_handler.py index a3bcf478..a033ac88 100644 --- a/gns3server/handlers/api/controller/server_handler.py +++ b/gns3server/handlers/api/controller/server_handler.py @@ -139,11 +139,11 @@ class ServerHandler: }) async def statistics(request, response): - compute_statistics = {} + compute_statistics = [] for compute in list(Controller.instance().computes.values()): try: r = await compute.get("/statistics") - compute_statistics[compute.name] = r.json + compute_statistics.append({"compute_id": compute.id, "compute_name": compute.name, "statistics": r.json}) except HTTPConflict as e: log.error("Could not retrieve statistics on compute {}: {}".format(compute.name, e.text)) response.json(compute_statistics)