Implemented server list and power state display
This commit is contained in:
10
MoonlightServers.Shared/Enums/ServerPowerState.cs
Normal file
10
MoonlightServers.Shared/Enums/ServerPowerState.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace MoonlightServers.Shared.Enums;
|
||||
|
||||
public enum ServerPowerState
|
||||
{
|
||||
Offline = 0,
|
||||
Starting = 1,
|
||||
Online = 2,
|
||||
Stopping = 3,
|
||||
Installing = 4
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.User.Allocations;
|
||||
|
||||
public class AllocationDetailResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string IpAddress { get; set; }
|
||||
public int Port { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using MoonlightServers.Shared.Http.Responses.User.Allocations;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Responses.Users.Servers;
|
||||
|
||||
public class ServerDetailResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string NodeName { get; set; }
|
||||
public string StarName { get; set; }
|
||||
|
||||
public AllocationDetailResponse[] Allocations { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using MoonlightServers.Shared.Enums;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Responses.Users.Servers;
|
||||
|
||||
public class ServerStatusResponse
|
||||
{
|
||||
public ServerPowerState PowerState { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user