From b691b8f06febdbfd9b317df1da4de9c930e8a44d Mon Sep 17 00:00:00 2001 From: antony1060 Date: Fri, 2 Apr 2021 21:32:30 +0200 Subject: [PATCH] Fixed /api/servers --- router/router_system.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/router/router_system.go b/router/router_system.go index b3eb1ce..f85dc38 100644 --- a/router/router_system.go +++ b/router/router_system.go @@ -28,7 +28,15 @@ func getSystemInformation(c *gin.Context) { // Returns all of the servers that are registered and configured correctly on // this wings instance. func getAllServers(c *gin.Context) { - c.JSON(http.StatusOK, middleware.ExtractManager(c).All()) + servers := middleware.ExtractManager(c).All() + var procData []serverProcData + for _, v := range servers { + procData = append(procData, serverProcData{ + ResourceUsage: v.Proc(), + Suspended: v.IsSuspended(), + }) + } + c.JSON(http.StatusOK, procData) } // Creates a new server on the wings daemon and begins the installation process