Improved node statistics. Added overview for single nodes and replaced mockup values with api fetched values for nodes list

This commit is contained in:
2025-05-27 00:17:42 +02:00
parent de682ab7ae
commit f2771acb49
19 changed files with 853 additions and 223 deletions

View File

@@ -0,0 +1,15 @@
namespace MoonlightServers.Shared.Http.Responses.Admin.Nodes.Statistics;
public class DockerStatisticsResponse
{
public string Version { get; set; }
public long ImagesUsed { get; set; }
public long ImagesReclaimable { get; set; }
public long ContainersUsed { get; set; }
public long ContainersReclaimable { get; set; }
public long BuildCacheUsed { get; set; }
public long BuildCacheReclaimable { get; set; }
}

View File

@@ -0,0 +1,36 @@
namespace MoonlightServers.Shared.Http.Responses.Admin.Nodes.Statistics;
public class StatisticsResponse
{
public CpuData Cpu { get; set; }
public MemoryData Memory { get; set; }
public DiskData[] Disks { get; set; }
public record DiskData
{
public string Device { get; set; }
public string MountPath { get; set; }
public ulong DiskTotal { get; set; }
public ulong DiskFree { get; set; }
public ulong InodesTotal { get; set; }
public ulong InodesFree { get; set; }
}
public record MemoryData
{
public long Total { get; set; }
public long Available { get; set; }
public long Free { get; set; }
public long Cached { get; set; }
public long SwapTotal { get; set; }
public long SwapFree { get; set; }
}
public record CpuData
{
public string Model { get; set; }
public double Usage { get; set; }
public double[] UsagePerCore { get; set; }
}
}