Removed old typeahead. Added own solution. Lang file, notes
This commit is contained in:
@@ -46,7 +46,7 @@ public class WingsServerConverter
|
||||
}
|
||||
|
||||
// Build
|
||||
wingsServer.Settings.Build.Swap = server.Memory * 2;
|
||||
wingsServer.Settings.Build.Swap = server.Memory * 2; //TODO: Add config option
|
||||
wingsServer.Settings.Build.Threads = null!;
|
||||
wingsServer.Settings.Build.Cpu_Limit = server.Cpu;
|
||||
wingsServer.Settings.Build.Disk_Space = server.Disk;
|
||||
|
||||
18
Moonlight/App/Models/Forms/DomainDataModel.cs
Normal file
18
Moonlight/App/Models/Forms/DomainDataModel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Moonlight.App.Database.Entities;
|
||||
|
||||
namespace Moonlight.App.Models.Forms;
|
||||
|
||||
public class DomainDataModel
|
||||
{
|
||||
[Required(ErrorMessage = "You need to specify a name")]
|
||||
[MaxLength(32, ErrorMessage = "The max lenght for the name is 32 characters")]
|
||||
[RegularExpression(@"^[a-z]+$", ErrorMessage = "The name should only consist of lower case characters")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[Required(ErrorMessage = "You need to specify a shared domain")]
|
||||
public SharedDomain SharedDomain { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "You need to specify a owner")]
|
||||
public User Owner { get; set; }
|
||||
}
|
||||
30
Moonlight/App/Models/Forms/ServerDataModel.cs
Normal file
30
Moonlight/App/Models/Forms/ServerDataModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Moonlight.App.Database.Entities;
|
||||
|
||||
namespace Moonlight.App.Models.Forms;
|
||||
|
||||
public class ServerDataModel
|
||||
{
|
||||
[Required(ErrorMessage = "You need to enter a name")]
|
||||
[MaxLength(32, ErrorMessage = "The name cannot be longer that 32 characters")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "You need to specify a owner")]
|
||||
public User Owner { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "You need to specify cpu amount")]
|
||||
public int Cpu { get; set; } = 100;
|
||||
|
||||
[Required(ErrorMessage = "You need to specify a memory amount")]
|
||||
public int Memory { get; set; } = 1024;
|
||||
|
||||
[Required(ErrorMessage = "You need to specify a disk amount")]
|
||||
public int Disk { get; set; } = 1024;
|
||||
|
||||
[Required(ErrorMessage = "You need to specify a image")]
|
||||
public Image Image { get; set; }
|
||||
|
||||
public string OverrideStartup { get; set; } = "";
|
||||
|
||||
public int DockerImageIndex { get; set; }
|
||||
}
|
||||
10
Moonlight/App/Models/Forms/TestDataModel.cs
Normal file
10
Moonlight/App/Models/Forms/TestDataModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Moonlight.App.Database.Entities;
|
||||
|
||||
namespace Moonlight.App.Models.Forms;
|
||||
|
||||
public class TestDataModel
|
||||
{
|
||||
[Required]
|
||||
public User User { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user