Switched dotnet version. Upgraded mooncoreui. Added better allocation display function
Dotnet version has been changed because it caused build errors. We change it back to dotnet 8 when every dependency in relation with blazor (mooncore, mooncoreui) has been updated
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["Moonlight/Moonlight.csproj", "Moonlight/"]
|
||||
|
||||
@@ -51,5 +51,6 @@ public class CreateServerForm
|
||||
[MultiSelection("Port", "Port", Icon = "bx-network-chart")]
|
||||
[Section("Deployment", Icon = "bx-cube")]
|
||||
[CustomItemLoader("FreeAllocations")]
|
||||
[CustomDisplayFunction("AllocationWithIp")]
|
||||
public List<ServerAllocation> Allocations { get; set; } = new();
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
@using MoonCore.Abstractions
|
||||
@using MoonCore.Exceptions
|
||||
@using MoonCore.Helpers
|
||||
@using MoonCoreUI.Models
|
||||
@using MoonCoreUI.Services
|
||||
@using Moonlight.Features.Servers.Entities
|
||||
@using Moonlight.Features.Servers.Models.Enums
|
||||
@@ -26,7 +27,8 @@
|
||||
CustomAdd="CustomAdd"
|
||||
CustomUpdate="CustomUpdate"
|
||||
ValidateUpdate="ValidateUpdate"
|
||||
CustomDelete="CustomDelete">
|
||||
CustomDelete="CustomDelete"
|
||||
OnConfigure="OnConfigure">
|
||||
<View>
|
||||
<CrudColumn TItem="Server" Field="@(x => x.Id)" Title="Id" Filterable="true"/>
|
||||
<CrudColumn TItem="Server" Field="@(x => x.Name)" Title="Name" Filterable="true"/>
|
||||
@@ -46,9 +48,6 @@
|
||||
</Template>
|
||||
</CrudColumn>
|
||||
</View>
|
||||
<CustomLoaders>
|
||||
<DefineCustomLoader TItem="Server" T="ServerAllocation" Id="FreeAllocations" Func="LoadFreeAllocations"/>
|
||||
</CustomLoaders>
|
||||
<NoItemsView>
|
||||
<IconAlert Title="No servers found" Color="primary" Icon="bx-search-alt">
|
||||
Create a new server in order to manage it using this page. Need help? Check out our <a href="https://docs.moonlightpanel.xyz">documentation</a>
|
||||
@@ -58,6 +57,14 @@
|
||||
|
||||
@code
|
||||
{
|
||||
private void OnConfigure(AutoCrudOptions options)
|
||||
{
|
||||
options.AddCustomItemLoader<Server, ServerAllocation>("FreeAllocations", LoadFreeAllocations);
|
||||
|
||||
options.AddCustomDisplayFunction<ServerAllocation>("AllocationWithIp",
|
||||
allocation => allocation.IpAddress + ":" + allocation.Port);
|
||||
}
|
||||
|
||||
private IEnumerable<Server> Load(Repository<Server> repository)
|
||||
{
|
||||
return repository
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
@@ -92,7 +92,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MoonCore" Version="1.3.4" />
|
||||
<PackageReference Include="MoonCoreUI" Version="1.1.9" />
|
||||
<PackageReference Include="MoonCoreUI" Version="1.2.0" />
|
||||
<PackageReference Include="Otp.NET" Version="1.3.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.4.3" />
|
||||
<PackageReference Include="XtermBlazor" Version="1.10.2" />
|
||||
|
||||
Reference in New Issue
Block a user