瀏覽代碼

Started adding a way to edit allocations via wip mooncore

Marcel Baumgartner 1 年之前
父節點
當前提交
9ca6b71467

+ 4 - 0
Moonlight/Features/Servers/Models/Forms/Admin/Servers/CreateServerForm.cs

@@ -44,4 +44,8 @@ public class CreateServerForm
     [Selector(SelectorProp = "Name", DisplayProp = "Name", UseDropdown = true)]
     [Section("Deployment")]
     public ServerNode Node { get; set; }
+    
+    [MultiSelection(DisplayProp = "{{IpAddress}}:{{Port}}", SearchProp = "Port", ItemColor = "primary")]
+    [Section("Deployment")]
+    public List<ServerAllocation> Allocations { get; set; } = new();
 }

+ 2 - 0
Moonlight/Features/Servers/UI/Views/Admin/Index.razor

@@ -58,6 +58,8 @@
             .Include(x => x.Owner)
             .Include(x => x.Image)
             .Include(x => x.Node)
+            .Include(x => x.Allocations)
+            .Include(x => x.MainAllocation)
             .ToArray();
     }
 

+ 7 - 2
Moonlight/Moonlight.csproj

@@ -89,8 +89,7 @@
         <PrivateAssets>all</PrivateAssets>
         <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       </PackageReference>
-      <PackageReference Include="MoonCore" Version="1.2.7" />
-      <PackageReference Include="MoonCoreUI" Version="1.1.6" />
+      <PackageReference Include="MoonCore" Version="1.2.9" />
       <PackageReference Include="Otp.NET" Version="1.3.0" />
       <PackageReference Include="QRCoder" Version="1.4.3" />
       <PackageReference Include="XtermBlazor" Version="1.10.2" />
@@ -116,4 +115,10 @@
       <_ContentIncludedByDefault Remove="storage\configs\core.json" />
     </ItemGroup>
 
+    <ItemGroup>
+      <Reference Include="MoonCoreUI">
+        <HintPath>..\..\..\Masu-Baumgartner\MoonCore\MoonCore\MoonCoreUI\bin\Debug\net7.0\MoonCoreUI.dll</HintPath>
+      </Reference>
+    </ItemGroup>
+
 </Project>