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

@@ -1,8 +0,0 @@
namespace MoonlightServers.DaemonShared.DaemonSide.Http.Responses.Statistics;
public class StatisticsApplicationResponse
{
public int CpuUsage { get; set; }
public long MemoryUsage { get; set; }
public TimeSpan Uptime { get; set; }
}

View File

@@ -1,6 +0,0 @@
namespace MoonlightServers.DaemonShared.DaemonSide.Http.Responses.Statistics;
public class StatisticsHostResponse
{
public string OperatingSystem { get; set; }
}

View File

@@ -0,0 +1,36 @@
namespace MoonlightServers.DaemonShared.DaemonSide.Http.Responses.Statistics;
public class StatisticsResponse
{
public CpuData Cpu { get; set; } = new();
public MemoryData Memory { get; set; } = new();
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; }
}
}