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,5 +1,6 @@
|
||||
using MoonCore.Attributes;
|
||||
using MoonCore.Helpers;
|
||||
using MoonlightServers.Shared.Http.Responses.Admin.Nodes.Statistics;
|
||||
using MoonlightServers.Shared.Http.Responses.Admin.Nodes.Sys;
|
||||
|
||||
namespace MoonlightServers.Frontend.Services;
|
||||
@@ -18,4 +19,18 @@ public class NodeService
|
||||
{
|
||||
return await HttpApiClient.GetJson<NodeSystemStatusResponse>($"api/admin/servers/nodes/{nodeId}/system/status");
|
||||
}
|
||||
|
||||
public async Task<StatisticsResponse> GetStatistics(int nodeId)
|
||||
{
|
||||
return await HttpApiClient.GetJson<StatisticsResponse>(
|
||||
$"api/admin/servers/nodes/{nodeId}/statistics"
|
||||
);
|
||||
}
|
||||
|
||||
public async Task<DockerStatisticsResponse> GetDockerStatistics(int nodeId)
|
||||
{
|
||||
return await HttpApiClient.GetJson<DockerStatisticsResponse>(
|
||||
$"api/admin/servers/nodes/{nodeId}/statistics/docker"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user