Improved node statistics. Added overview for single nodes and replaced mockup values with api fetched values for nodes list
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace MoonlightServers.DaemonShared.DaemonSide.Http.Responses.Statistics;
|
||||
|
||||
public class StatisticsHostResponse
|
||||
{
|
||||
public string OperatingSystem { get; set; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user