Implemented node crud and status health check. Added daemon status health endpoint. Refactored project structure. Added sidebar items and ui views
This commit is contained in:
14
MoonlightServers.Shared/Admin/Nodes/CreateNodeDto.cs
Normal file
14
MoonlightServers.Shared/Admin/Nodes/CreateNodeDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MoonlightServers.Shared.Admin.Nodes;
|
||||
|
||||
public class CreateNodeDto
|
||||
{
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string HttpEndpointUrl { get; set; }
|
||||
}
|
||||
9
MoonlightServers.Shared/Admin/Nodes/NodeDto.cs
Normal file
9
MoonlightServers.Shared/Admin/Nodes/NodeDto.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace MoonlightServers.Shared.Admin.Nodes;
|
||||
|
||||
public record NodeDto(
|
||||
int Id,
|
||||
string Name,
|
||||
string HttpEndpointUrl,
|
||||
DateTimeOffset CreatedAt,
|
||||
DateTimeOffset UpdatedAt
|
||||
);
|
||||
8
MoonlightServers.Shared/Admin/Nodes/NodeHealthDto.cs
Normal file
8
MoonlightServers.Shared/Admin/Nodes/NodeHealthDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace MoonlightServers.Shared.Admin.Nodes;
|
||||
|
||||
public class NodeHealthDto
|
||||
{
|
||||
public int RemoteStatusCode { get; set; }
|
||||
public int StatusCode { get; set; }
|
||||
public bool IsHealthy { get; set; }
|
||||
}
|
||||
14
MoonlightServers.Shared/Admin/Nodes/UpdateNodeDto.cs
Normal file
14
MoonlightServers.Shared/Admin/Nodes/UpdateNodeDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MoonlightServers.Shared.Admin.Nodes;
|
||||
|
||||
public class UpdateNodeDto
|
||||
{
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string HttpEndpointUrl { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user