started moving api layer to shared abstract class
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
@using Web.Shared.Models
|
||||
<EditForm Model="@_serverModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator/>
|
||||
<ValidationSummary/>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Web.Shared.Models
|
||||
{
|
||||
public class ServerLimitsModel
|
||||
{
|
||||
public int Memory { get; set; }
|
||||
public int Swap { get; set; }
|
||||
public int Disk { get; set; }
|
||||
public int Io { get; set; }
|
||||
public int Cpu { get; set; }
|
||||
}
|
||||
public class ServerFeatureLimits
|
||||
{
|
||||
public int Databases { get; set; }
|
||||
public int Backups { get; set; }
|
||||
public int Allocations { get; set; }
|
||||
}
|
||||
public class ServerAllocationModel
|
||||
{
|
||||
public int Default { get; set; }
|
||||
}
|
||||
public class ServerModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int User { get; set; }
|
||||
public int Egg { get; set; }
|
||||
[JsonPropertyName("docker_image")]
|
||||
public string DockerImage { get; set; }
|
||||
public string Startup { get; set; }
|
||||
public Dictionary<string, string> Environment { get; set; }
|
||||
public ServerLimitsModel Limits { get; set; }
|
||||
[JsonPropertyName("feature_limits")]
|
||||
public ServerFeatureLimits FeatureLimits { get; set; }
|
||||
public ServerAllocationModel Allocation { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,4 +10,12 @@
|
||||
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.13.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Shared\Models" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebAPI\WebAPI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
@using Microsoft.JSInterop
|
||||
@using Web
|
||||
@using Web.Shared
|
||||
@using Web.Shared.Forms
|
||||
@using Web.Shared.Forms
|
||||
@using WebAPI.Data.Dto
|
||||
Reference in New Issue
Block a user