Compare commits
11 Commits
e7b1e77d0a
...
feat/Adjus
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a2ce28b5f | |||
| 91887ec047 | |||
| 2fc371c219 | |||
| 9470e06c0f | |||
| 2f8665f1d4 | |||
| 4d4f35e2be | |||
| 609ea3a443 | |||
| 3e19b29cde | |||
| 1475b89660 | |||
| 3bb9a08630 | |||
| 252c4103f3 |
69
.gitea/workflows/publish-nuget.yml
Normal file
69
.gitea/workflows/publish-nuget.yml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
name: "Dev Publish: Nuget"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v2.1
|
||||||
|
paths:
|
||||||
|
- 'MoonlightServers.*/*.csproj'
|
||||||
|
|
||||||
|
env:
|
||||||
|
NUGET_SOURCE: https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json
|
||||||
|
NUGET_PUBLIC: https://api.nuget.org/v3/index.json
|
||||||
|
CONFIGURATION: Debug
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish ${{ matrix.project }}
|
||||||
|
runs-on: linux_amd64
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
project:
|
||||||
|
- MoonlightServers.Api
|
||||||
|
- MoonlightServers.Shared
|
||||||
|
- MoonlightServers.DaemonShared
|
||||||
|
- MoonlightServers.Frontend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Restore NuGet packages
|
||||||
|
run: >
|
||||||
|
dotnet restore ${{ matrix.project }}
|
||||||
|
--source ${{ env.NUGET_PUBLIC }}
|
||||||
|
--source ${{ env.NUGET_SOURCE }}
|
||||||
|
|
||||||
|
# Frontend requires a host build + Tailwind compilation first
|
||||||
|
- name: Build frontend host (Frontend only)
|
||||||
|
if: matrix.project == 'MoonlightServers.Frontend'
|
||||||
|
run: >
|
||||||
|
dotnet build Hosts/MoonlightServers.Frontend.Host
|
||||||
|
--configuration ${{ env.CONFIGURATION }}
|
||||||
|
|
||||||
|
- name: Build Tailwind styles (Frontend only)
|
||||||
|
if: matrix.project == 'MoonlightServers.Frontend'
|
||||||
|
working-directory: Hosts/MoonlightServers.Frontend.Host/Styles
|
||||||
|
run: npm install && npm run build
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: >
|
||||||
|
dotnet build ${{ matrix.project }}
|
||||||
|
--configuration ${{ env.CONFIGURATION }}
|
||||||
|
--no-restore
|
||||||
|
|
||||||
|
- name: Pack NuGet package
|
||||||
|
run: >
|
||||||
|
dotnet pack ${{ matrix.project }}
|
||||||
|
--configuration ${{ env.CONFIGURATION }}
|
||||||
|
--output ./artifacts
|
||||||
|
--no-build
|
||||||
|
|
||||||
|
- name: Push NuGet package
|
||||||
|
run: >
|
||||||
|
dotnet nuget push ./artifacts/*.nupkg
|
||||||
|
--skip-duplicate
|
||||||
|
--source ${{ env.NUGET_SOURCE }}
|
||||||
|
--api-key ${{ secrets.ACCESS_TOKEN }}
|
||||||
@@ -8,15 +8,14 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.3"/>
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.5"/>
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.3">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.5">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
||||||
<PackageReference Include="SimplePlugin" Version="1.0.2"/>
|
<PackageReference Include="SimplePlugin" Version="1.0.2"/>
|
||||||
|
|
||||||
<PackageReference Include="SimplePlugin.Abstractions" Version="1.0.2"/>
|
<PackageReference Include="SimplePlugin.Abstractions" Version="1.0.2"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.3"/>
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.3" PrivateAssets="all"/>
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.5" PrivateAssets="all"/>
|
||||||
<PackageReference Include="SimplePlugin" Version="1.0.2"/>
|
<PackageReference Include="SimplePlugin" Version="1.0.2"/>
|
||||||
<PackageReference Include="SimplePlugin.Abstractions" Version="1.0.2"/>
|
<PackageReference Include="SimplePlugin.Abstractions" Version="1.0.2"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export default function extractTailwindClasses(opts = {}) {
|
|||||||
},
|
},
|
||||||
OnceExit() {
|
OnceExit() {
|
||||||
const classArray = Array.from(classSet).sort();
|
const classArray = Array.from(classSet).sort();
|
||||||
fs.mkdirSync('../../../Servers.Frontend/Styles', { recursive: true });
|
fs.mkdirSync('../../../MoonlightServers.Frontend/Styles', { recursive: true });
|
||||||
fs.writeFileSync('../../../Servers.Frontend/Styles/Servers.Frontend.map', classArray.join('\n'));
|
fs.writeFileSync('../../../MoonlightServers.Frontend/Styles/MoonlightServers.Frontend.map', classArray.join('\n'));
|
||||||
console.log(`Extracted classes ${classArray.length}`);
|
console.log(`Extracted classes ${classArray.length}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
@import "../bin/ShadcnBlazor/default-theme.css";
|
@import "../bin/ShadcnBlazor/default-theme.css";
|
||||||
@import "./theme.css";
|
@import "./theme.css";
|
||||||
|
|
||||||
@source "../bin/Moonlight.Frontend/*.map";
|
@source "../bin/**/*.map";
|
||||||
|
|
||||||
@source "../../../MoonlightServers.Api/**/*.razor";
|
@source "../../../MoonlightServers.Api/**/*.razor";
|
||||||
@source "../../../MoonlightServers.Api/**/*.cs";
|
@source "../../../MoonlightServers.Api/**/*.cs";
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Caching.Hybrid;
|
using Microsoft.Extensions.Caching.Hybrid;
|
||||||
using Moonlight.Shared.Http.Requests;
|
using Moonlight.Shared.Shared;
|
||||||
using Moonlight.Shared.Http.Responses;
|
|
||||||
using MoonlightServers.Api.Infrastructure.Database;
|
using MoonlightServers.Api.Infrastructure.Database;
|
||||||
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
||||||
using MoonlightServers.Api.Infrastructure.Implementations.NodeToken;
|
using MoonlightServers.Api.Infrastructure.Implementations.NodeToken;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Moonlight.Shared.Http.Requests;
|
using Moonlight.Shared.Shared;
|
||||||
using Moonlight.Shared.Http.Responses;
|
|
||||||
using MoonlightServers.Api.Infrastructure.Database;
|
using MoonlightServers.Api.Infrastructure.Database;
|
||||||
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
||||||
using MoonlightServers.Api.Infrastructure.Database.Json;
|
using MoonlightServers.Api.Infrastructure.Database.Json;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Moonlight.Shared.Http.Responses;
|
using Moonlight.Shared.Shared;
|
||||||
using MoonlightServers.Api.Infrastructure.Database;
|
using MoonlightServers.Api.Infrastructure.Database;
|
||||||
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
||||||
using MoonlightServers.Shared;
|
using MoonlightServers.Shared;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Moonlight.Shared.Http.Responses;
|
using Moonlight.Shared.Shared;
|
||||||
using MoonlightServers.Api.Infrastructure.Database;
|
using MoonlightServers.Api.Infrastructure.Database;
|
||||||
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
||||||
using MoonlightServers.Shared;
|
using MoonlightServers.Shared;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Moonlight.Api.Configuration;
|
using Moonlight.Api.Infrastructure.Database;
|
||||||
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
using MoonlightServers.Api.Infrastructure.Database.Entities;
|
||||||
|
|
||||||
namespace MoonlightServers.Api.Infrastructure.Database;
|
namespace MoonlightServers.Api.Infrastructure.Database;
|
||||||
@@ -28,7 +28,12 @@ public class DataContext : DbContext
|
|||||||
$"Port={Options.Value.Port};" +
|
$"Port={Options.Value.Port};" +
|
||||||
$"Username={Options.Value.Username};" +
|
$"Username={Options.Value.Username};" +
|
||||||
$"Password={Options.Value.Password};" +
|
$"Password={Options.Value.Password};" +
|
||||||
$"Database={Options.Value.Database}"
|
$"Database={Options.Value.Database}",
|
||||||
|
builder =>
|
||||||
|
{
|
||||||
|
builder.MigrationsAssembly(typeof(DataContext).Assembly);
|
||||||
|
builder.MigrationsHistoryTable("MigrationsHistory", "servers");
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ public class DbMigrationService : IHostedLifecycleService
|
|||||||
await using var scope = ServiceProvider.CreateAsyncScope();
|
await using var scope = ServiceProvider.CreateAsyncScope();
|
||||||
var context = scope.ServiceProvider.GetRequiredService<DataContext>();
|
var context = scope.ServiceProvider.GetRequiredService<DataContext>();
|
||||||
|
|
||||||
|
var availableMigrations = context.Database.GetMigrations();
|
||||||
|
Logger.LogTrace("Available migrations: {names}", string.Join(", ", availableMigrations));
|
||||||
|
|
||||||
var pendingMigrations = await context.Database.GetPendingMigrationsAsync(cancellationToken);
|
var pendingMigrations = await context.Database.GetPendingMigrationsAsync(cancellationToken);
|
||||||
var migrationNames = pendingMigrations.ToArray();
|
var migrationNames = pendingMigrations.ToArray();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,313 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using MoonlightServers.Api.Infrastructure.Database;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace MoonlightServers.Api.Infrastructure.Database.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(DataContext))]
|
||||||
|
[Migration("20260312153948_AddedNullabilityForTemplateVariableDefaultValue")]
|
||||||
|
partial class AddedNullabilityForTemplateVariableDefaultValue
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasDefaultSchema("servers")
|
||||||
|
.HasAnnotation("ProductVersion", "10.0.3")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.Node", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset>("CreatedAt")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.Property<string>("HttpEndpointUrl")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("character varying(100)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Token")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)");
|
||||||
|
|
||||||
|
b.Property<string>("TokenId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset>("UpdatedAt")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Nodes", "servers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.Template", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<bool>("AllowUserDockerImageChange")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("Author")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(30)
|
||||||
|
.HasColumnType("character varying(30)");
|
||||||
|
|
||||||
|
b.Property<int?>("DefaultDockerImageId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)");
|
||||||
|
|
||||||
|
b.Property<string>("DonateUrl")
|
||||||
|
.HasMaxLength(2048)
|
||||||
|
.HasColumnType("character varying(2048)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(30)
|
||||||
|
.HasColumnType("character varying(30)");
|
||||||
|
|
||||||
|
b.Property<string>("UpdateUrl")
|
||||||
|
.HasMaxLength(2048)
|
||||||
|
.HasColumnType("character varying(2048)");
|
||||||
|
|
||||||
|
b.Property<string>("Version")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(30)
|
||||||
|
.HasColumnType("character varying(30)");
|
||||||
|
|
||||||
|
b.ComplexProperty(typeof(Dictionary<string, object>), "FilesConfig", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.FilesConfig#FilesConfig", b1 =>
|
||||||
|
{
|
||||||
|
b1.IsRequired();
|
||||||
|
|
||||||
|
b1.ComplexCollection(typeof(List<Dictionary<string, object>>), "ConfigurationFiles", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.FilesConfig#FilesConfig.ConfigurationFiles#ConfigurationFile", b2 =>
|
||||||
|
{
|
||||||
|
b2.IsRequired();
|
||||||
|
|
||||||
|
b2.Property<string>("Parser")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b2.Property<string>("Path")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b2.ComplexCollection(typeof(List<Dictionary<string, object>>), "Mappings", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.FilesConfig#FilesConfig.ConfigurationFiles#ConfigurationFile.Mappings#ConfigurationFileMapping", b3 =>
|
||||||
|
{
|
||||||
|
b3.IsRequired();
|
||||||
|
|
||||||
|
b3.Property<string>("Key")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b3.Property<string>("Value");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
b1
|
||||||
|
.ToJson("FilesConfig")
|
||||||
|
.HasColumnType("jsonb");
|
||||||
|
});
|
||||||
|
|
||||||
|
b.ComplexProperty(typeof(Dictionary<string, object>), "InstallationConfig", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.InstallationConfig#InstallationConfig", b1 =>
|
||||||
|
{
|
||||||
|
b1.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<string>("DockerImage")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<string>("Script")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<string>("Shell")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1
|
||||||
|
.ToJson("InstallationConfig")
|
||||||
|
.HasColumnType("jsonb");
|
||||||
|
});
|
||||||
|
|
||||||
|
b.ComplexProperty(typeof(Dictionary<string, object>), "LifecycleConfig", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.LifecycleConfig#LifecycleConfig", b1 =>
|
||||||
|
{
|
||||||
|
b1.IsRequired();
|
||||||
|
|
||||||
|
b1.PrimitiveCollection<string>("OnlineLogPatterns")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<string>("StopCommand")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.ComplexCollection(typeof(List<Dictionary<string, object>>), "StartupCommands", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.LifecycleConfig#LifecycleConfig.StartupCommands#StartupCommand", b2 =>
|
||||||
|
{
|
||||||
|
b2.IsRequired();
|
||||||
|
|
||||||
|
b2.Property<string>("Command")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b2.Property<string>("DisplayName")
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
b1
|
||||||
|
.ToJson("LifecycleConfig")
|
||||||
|
.HasColumnType("jsonb");
|
||||||
|
});
|
||||||
|
|
||||||
|
b.ComplexProperty(typeof(Dictionary<string, object>), "MiscellaneousConfig", "MoonlightServers.Api.Infrastructure.Database.Entities.Template.MiscellaneousConfig#MiscellaneousConfig", b1 =>
|
||||||
|
{
|
||||||
|
b1.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<bool>("UseLegacyStartup");
|
||||||
|
|
||||||
|
b1
|
||||||
|
.ToJson("MiscellaneousConfig")
|
||||||
|
.HasColumnType("jsonb");
|
||||||
|
});
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DefaultDockerImageId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("Templates", "servers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.TemplateDockerImage", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("DisplayName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(30)
|
||||||
|
.HasColumnType("character varying(30)");
|
||||||
|
|
||||||
|
b.Property<string>("ImageName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)");
|
||||||
|
|
||||||
|
b.Property<bool>("SkipPulling")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("TemplateId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TemplateId");
|
||||||
|
|
||||||
|
b.ToTable("TemplateDockerImages", "servers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.TemplateVariable", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("DefaultValue")
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("character varying(1024)");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)");
|
||||||
|
|
||||||
|
b.Property<string>("DisplayName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(30)
|
||||||
|
.HasColumnType("character varying(30)");
|
||||||
|
|
||||||
|
b.Property<string>("EnvName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(60)
|
||||||
|
.HasColumnType("character varying(60)");
|
||||||
|
|
||||||
|
b.Property<int>("TemplateId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TemplateId");
|
||||||
|
|
||||||
|
b.ToTable("TemplateVariablesVariables", "servers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.Template", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("MoonlightServers.Api.Infrastructure.Database.Entities.TemplateDockerImage", "DefaultDockerImage")
|
||||||
|
.WithOne()
|
||||||
|
.HasForeignKey("MoonlightServers.Api.Infrastructure.Database.Entities.Template", "DefaultDockerImageId")
|
||||||
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
|
|
||||||
|
b.Navigation("DefaultDockerImage");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.TemplateDockerImage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("MoonlightServers.Api.Infrastructure.Database.Entities.Template", "Template")
|
||||||
|
.WithMany("DockerImages")
|
||||||
|
.HasForeignKey("TemplateId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Template");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.TemplateVariable", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("MoonlightServers.Api.Infrastructure.Database.Entities.Template", "Template")
|
||||||
|
.WithMany("Variables")
|
||||||
|
.HasForeignKey("TemplateId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Template");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("MoonlightServers.Api.Infrastructure.Database.Entities.Template", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("DockerImages");
|
||||||
|
|
||||||
|
b.Navigation("Variables");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace MoonlightServers.Api.Infrastructure.Database.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddedNullabilityForTemplateVariableDefaultValue : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "DefaultValue",
|
||||||
|
schema: "servers",
|
||||||
|
table: "TemplateVariablesVariables",
|
||||||
|
type: "character varying(1024)",
|
||||||
|
maxLength: 1024,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(1024)",
|
||||||
|
oldMaxLength: 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "DefaultValue",
|
||||||
|
schema: "servers",
|
||||||
|
table: "TemplateVariablesVariables",
|
||||||
|
type: "character varying(1024)",
|
||||||
|
maxLength: 1024,
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(1024)",
|
||||||
|
oldMaxLength: 1024,
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -126,8 +126,7 @@ namespace MoonlightServers.Api.Infrastructure.Database.Migrations
|
|||||||
b3.Property<string>("Key")
|
b3.Property<string>("Key")
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b3.Property<string>("Value")
|
b3.Property<string>("Value");
|
||||||
.IsRequired();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -239,7 +238,6 @@ namespace MoonlightServers.Api.Infrastructure.Database.Migrations
|
|||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("DefaultValue")
|
b.Property<string>("DefaultValue")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(1024)
|
.HasMaxLength(1024)
|
||||||
.HasColumnType("character varying(1024)");
|
.HasColumnType("character varying(1024)");
|
||||||
|
|
||||||
|
|||||||
@@ -6,14 +6,23 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Label="Nuget Package Settings">
|
||||||
|
<Version>2.1.0</Version>
|
||||||
|
<Title>MoonlightServers.Api</Title>
|
||||||
|
<Authors>Moonlight Panel</Authors>
|
||||||
|
<Description>Development package of MoonlightServers.Api</Description>
|
||||||
|
<Copyright>Moonlight Panel</Copyright>
|
||||||
|
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Servers</PackageProjectUrl>
|
||||||
|
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Servers/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||||
|
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Servers</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SupportedPlatform Include="browser"/>
|
<SupportedPlatform Include="browser"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.3" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.3" />
|
|
||||||
<PackageReference Include="Moonlight.Api" Version="2.1.0">
|
<PackageReference Include="Moonlight.Api" Version="2.1.0">
|
||||||
<ExcludeAssets>content;contentfiles</ExcludeAssets>
|
<ExcludeAssets>content;contentfiles</ExcludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ using MoonlightServers.Api.Admin.Templates;
|
|||||||
using MoonlightServers.Api.Infrastructure.Configuration;
|
using MoonlightServers.Api.Infrastructure.Configuration;
|
||||||
using MoonlightServers.Api.Infrastructure.Database;
|
using MoonlightServers.Api.Infrastructure.Database;
|
||||||
using MoonlightServers.Api.Infrastructure.Implementations.NodeToken;
|
using MoonlightServers.Api.Infrastructure.Implementations.NodeToken;
|
||||||
|
using MoonlightServers.Shared;
|
||||||
using SimplePlugin.Abstractions;
|
using SimplePlugin.Abstractions;
|
||||||
using SerializationContext = MoonlightServers.Shared.SerializationContext;
|
|
||||||
|
|
||||||
namespace MoonlightServers.Api;
|
namespace MoonlightServers.Api;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,18 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Label="Nuget Package Settings">
|
||||||
|
<Version>2.1.0</Version>
|
||||||
|
<Title>MoonlightServers.DaemonShared</Title>
|
||||||
|
<Authors>Moonlight Panel</Authors>
|
||||||
|
<Description>Development package of MoonlightServers.DaemonShared</Description>
|
||||||
|
<Copyright>Moonlight Panel</Copyright>
|
||||||
|
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Servers</PackageProjectUrl>
|
||||||
|
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Servers/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||||
|
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Servers</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Http\Panel\" />
|
<Folder Include="Http\Panel\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@page "/admin/servers/nodes/create"
|
@page "/admin/servers/nodes/create"
|
||||||
|
|
||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Nodes
|
@using MoonlightServers.Shared.Admin.Nodes
|
||||||
@using ShadcnBlazor.Buttons
|
@using ShadcnBlazor.Buttons
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
@using System.Net
|
@using System.Net
|
||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Nodes
|
@using MoonlightServers.Shared.Admin.Nodes
|
||||||
@using ShadcnBlazor.Buttons
|
@using ShadcnBlazor.Buttons
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Shared.Http.Requests
|
@using Moonlight.Shared.Shared
|
||||||
@using Moonlight.Shared.Http.Responses
|
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Nodes
|
@using MoonlightServers.Shared.Admin.Nodes
|
||||||
@using ShadcnBlazor.DataGrids
|
@using ShadcnBlazor.DataGrids
|
||||||
@using ShadcnBlazor.Buttons
|
@using ShadcnBlazor.Buttons
|
||||||
@using ShadcnBlazor.Dropdowns
|
@using ShadcnBlazor.Dropdowns
|
||||||
@using ShadcnBlazor.Extras.AlertDialogs
|
@using ShadcnBlazor.Extras.AlertDialogs
|
||||||
@using ShadcnBlazor.Extras.Dialogs
|
|
||||||
@using ShadcnBlazor.Extras.Toasts
|
@using ShadcnBlazor.Extras.Toasts
|
||||||
@using ShadcnBlazor.Tabels
|
@using ShadcnBlazor.Tabels
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@page "/admin/servers/templates/create"
|
@page "/admin/servers/templates/create"
|
||||||
|
|
||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Buttons
|
@using ShadcnBlazor.Buttons
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
@using ShadcnBlazor.Extras.Toasts
|
@using ShadcnBlazor.Extras.Toasts
|
||||||
@using ShadcnBlazor.Fields
|
@using ShadcnBlazor.Fields
|
||||||
@using ShadcnBlazor.Inputs
|
@using ShadcnBlazor.Inputs
|
||||||
@using ShadcnBlazor.Tab
|
|
||||||
|
|
||||||
@inject HttpClient HttpClient
|
@inject HttpClient HttpClient
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Dialogs
|
@using ShadcnBlazor.Dialogs
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Dialogs
|
@using ShadcnBlazor.Dialogs
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@using System.Text.Json
|
@using System.Text.Json
|
||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Shared.Http.Responses
|
@using Moonlight.Shared.Shared
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Extras.Common
|
@using ShadcnBlazor.Extras.Common
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var problemDetails = await response.Content.ReadFromJsonAsync<ProblemDetails>(
|
var problemDetails = await response.Content.ReadFromJsonAsync<ProblemDetails>(
|
||||||
Moonlight.Shared.Http.SerializationContext.Default.Options
|
Moonlight.Shared.SerializationContext.Default.Options
|
||||||
);
|
);
|
||||||
|
|
||||||
if (problemDetails == null)
|
if (problemDetails == null)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Shared.Http.Requests
|
@using Moonlight.Shared.Shared
|
||||||
@using Moonlight.Shared.Http.Responses
|
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.DataGrids
|
@using ShadcnBlazor.DataGrids
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
@page "/admin/servers/templates/{Id:int}"
|
@page "/admin/servers/templates/{Id:int}"
|
||||||
|
|
||||||
@using System.Net
|
@using System.Net
|
||||||
@using System.Text.Json
|
|
||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Buttons
|
@using ShadcnBlazor.Buttons
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Frontend.Helpers
|
@using Moonlight.Frontend.Infrastructure.Helpers
|
||||||
@using MoonlightServers.Shared
|
@using MoonlightServers.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Accordions
|
@using ShadcnBlazor.Accordions
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
@using LucideBlazor
|
@using LucideBlazor
|
||||||
@using Moonlight.Shared.Http.Responses
|
@using Moonlight.Shared.Shared
|
||||||
@using MoonlightServers.Shared.Admin.Templates
|
@using MoonlightServers.Shared.Admin.Templates
|
||||||
@using ShadcnBlazor.Accordions
|
|
||||||
@using ShadcnBlazor.Buttons
|
@using ShadcnBlazor.Buttons
|
||||||
@using ShadcnBlazor.Extras.Common
|
@using ShadcnBlazor.Extras.Common
|
||||||
@using ShadcnBlazor.Extras.Dialogs
|
@using ShadcnBlazor.Extras.Dialogs
|
||||||
@using ShadcnBlazor.Fields
|
|
||||||
@using ShadcnBlazor.Inputs
|
|
||||||
|
|
||||||
@inject HttpClient HttpClient
|
@inject HttpClient HttpClient
|
||||||
@inject DialogService DialogService
|
@inject DialogService DialogService
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using LucideBlazor;
|
using LucideBlazor;
|
||||||
using Moonlight.Frontend.Interfaces;
|
using Moonlight.Frontend.Admin.Users.Shared;
|
||||||
using Moonlight.Frontend.Models;
|
using Moonlight.Frontend.Infrastructure.Hooks;
|
||||||
using MoonlightServers.Shared;
|
using MoonlightServers.Shared;
|
||||||
|
|
||||||
namespace MoonlightServers.Frontend.Infrastructure;
|
namespace MoonlightServers.Frontend.Infrastructure;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using LucideBlazor;
|
using LucideBlazor;
|
||||||
using Moonlight.Frontend.Interfaces;
|
using Moonlight.Frontend.Infrastructure.Hooks;
|
||||||
using Moonlight.Frontend.Models;
|
using Moonlight.Frontend.Infrastructure.Models;
|
||||||
using MoonlightServers.Shared;
|
using MoonlightServers.Shared;
|
||||||
|
|
||||||
namespace MoonlightServers.Frontend.Infrastructure;
|
namespace MoonlightServers.Frontend.Infrastructure;
|
||||||
|
|||||||
@@ -6,6 +6,17 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Label="Nuget Package Settings">
|
||||||
|
<Version>2.1.0</Version>
|
||||||
|
<Title>MoonlightServers.Frontend</Title>
|
||||||
|
<Authors>Moonlight Panel</Authors>
|
||||||
|
<Description>Development package of MoonlightServers.Frontend</Description>
|
||||||
|
<Copyright>Moonlight Panel</Copyright>
|
||||||
|
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Servers</PackageProjectUrl>
|
||||||
|
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Servers/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||||
|
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Servers</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SupportedPlatform Include="browser"/>
|
<SupportedPlatform Include="browser"/>
|
||||||
@@ -27,8 +38,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Styles/*" Pack="true" PackagePath="Styles/"/>
|
<None Include="Styles/*" Pack="true" PackagePath="Styles/"/>
|
||||||
<None Include="Servers.Frontend.targets" Pack="true" PackagePath="build\Servers.Frontend.targets"/>
|
<None Include="MoonlightServers.Frontend.targets" Pack="true" PackagePath="build\MoonlightServers.Frontend.targets" />
|
||||||
<None Include="Servers.Frontend.targets" Pack="true" PackagePath="buildTransitive\Servers.Frontend.targets"/>
|
<None Include="MoonlightServers.Frontend.targets" Pack="true" PackagePath="buildTransitive\MoonlightServers.Frontend.targets"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
15
MoonlightServers.Frontend/MoonlightServers.Frontend.targets
Normal file
15
MoonlightServers.Frontend/MoonlightServers.Frontend.targets
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<MoonlightServersCssClassDir Condition="'$(MoonlightServersCssClassDir)' == ''">
|
||||||
|
$(MSBuildProjectDirectory)\bin\MoonlightServers
|
||||||
|
</MoonlightServersCssClassDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="MoonlightServers_CopyContents" BeforeTargets="Build">
|
||||||
|
<ItemGroup>
|
||||||
|
<Files Include="$(MSBuildThisFileDirectory)..\Styles\**\*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Copy SourceFiles="@(Files)" DestinationFolder="$(MoonlightServersCssClassDir)" SkipUnchangedFiles="true" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<Project>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ServersCssClassDir Condition="'$(ServersCssClassDir)' == ''">
|
|
||||||
$(MSBuildProjectDirectory)\bin\Servers
|
|
||||||
</ServersCssClassDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="Servers_CopyContents" BeforeTargets="Build">
|
|
||||||
<ItemGroup>
|
|
||||||
<Files Include="$(MSBuildThisFileDirectory)..\Styles\**\*" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Copy SourceFiles="@(Files)" DestinationFolder="$(ServersCssClassDir)" SkipUnchangedFiles="true" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Moonlight.Frontend;
|
using Moonlight.Frontend;
|
||||||
using Moonlight.Frontend.Configuration;
|
using Moonlight.Frontend.Infrastructure.Configuration;
|
||||||
using Moonlight.Frontend.Interfaces;
|
using Moonlight.Frontend.Infrastructure.Hooks;
|
||||||
using MoonlightServers.Frontend.Infrastructure;
|
using MoonlightServers.Frontend.Infrastructure;
|
||||||
using SimplePlugin.Abstractions;
|
using SimplePlugin.Abstractions;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
THIS WILL BE AUTOGENERATED DURING PACKAGE BUILD
|
||||||
@@ -6,6 +6,18 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Label="Nuget Package Settings">
|
||||||
|
<Version>2.1.0</Version>
|
||||||
|
<Title>MoonlightServers.Shared</Title>
|
||||||
|
<Authors>Moonlight Panel</Authors>
|
||||||
|
<Description>Development package of MoonlightServers.Shared</Description>
|
||||||
|
<Copyright>Moonlight Panel</Copyright>
|
||||||
|
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Servers</PackageProjectUrl>
|
||||||
|
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Servers/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||||
|
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Servers</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Moonlight.Shared" Version="2.1.0" />
|
<PackageReference Include="Moonlight.Shared" Version="2.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Moonlight.Shared.Http.Responses;
|
using Moonlight.Shared.Shared;
|
||||||
using MoonlightServers.Shared.Admin.Nodes;
|
using MoonlightServers.Shared.Admin.Nodes;
|
||||||
using MoonlightServers.Shared.Admin.Templates;
|
using MoonlightServers.Shared.Admin.Templates;
|
||||||
|
|
||||||
@@ -21,19 +21,18 @@ namespace MoonlightServers.Shared;
|
|||||||
[JsonSerializable(typeof(DetailedTemplateDto))]
|
[JsonSerializable(typeof(DetailedTemplateDto))]
|
||||||
[JsonSerializable(typeof(PagedData<TemplateDto>))]
|
[JsonSerializable(typeof(PagedData<TemplateDto>))]
|
||||||
|
|
||||||
|
// - Template - Variables
|
||||||
[JsonSerializable(typeof(VariableDto))]
|
[JsonSerializable(typeof(VariableDto))]
|
||||||
[JsonSerializable(typeof(PagedData<VariableDto>))]
|
[JsonSerializable(typeof(PagedData<VariableDto>))]
|
||||||
[JsonSerializable(typeof(CreateVariableDto))]
|
[JsonSerializable(typeof(CreateVariableDto))]
|
||||||
[JsonSerializable(typeof(UpdateVariableDto))]
|
[JsonSerializable(typeof(UpdateVariableDto))]
|
||||||
|
|
||||||
|
// - Template - Docker Image
|
||||||
[JsonSerializable(typeof(DockerImageDto))]
|
[JsonSerializable(typeof(DockerImageDto))]
|
||||||
[JsonSerializable(typeof(PagedData<DockerImageDto>))]
|
[JsonSerializable(typeof(PagedData<DockerImageDto>))]
|
||||||
[JsonSerializable(typeof(CreateDockerImageDto))]
|
[JsonSerializable(typeof(CreateDockerImageDto))]
|
||||||
[JsonSerializable(typeof(UpdateDockerImageDto))]
|
[JsonSerializable(typeof(UpdateDockerImageDto))]
|
||||||
|
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(JsonSerializerDefaults.Web)]
|
[JsonSourceGenerationOptions(JsonSerializerDefaults.Web)]
|
||||||
public partial class SerializationContext : JsonSerializerContext
|
public partial class SerializationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
<Project Path="Hosts\MoonlightServers.Api.Host\MoonlightServers.Api.Host.csproj" />
|
<Project Path="Hosts\MoonlightServers.Api.Host\MoonlightServers.Api.Host.csproj" />
|
||||||
<Project Path="Hosts\MoonlightServers.Frontend.Host\MoonlightServers.Frontend.Host.csproj" />
|
<Project Path="Hosts\MoonlightServers.Frontend.Host\MoonlightServers.Frontend.Host.csproj" />
|
||||||
</Folder>
|
</Folder>
|
||||||
|
<Folder Name="/Panel/">
|
||||||
<Project Path="MoonlightServers.Api\MoonlightServers.Api.csproj" />
|
<Project Path="MoonlightServers.Api\MoonlightServers.Api.csproj" />
|
||||||
<Project Path="MoonlightServers.Frontend\MoonlightServers.Frontend.csproj" />
|
<Project Path="MoonlightServers.Frontend\MoonlightServers.Frontend.csproj" />
|
||||||
<Project Path="MoonlightServers.Shared\MoonlightServers.Shared.csproj" />
|
<Project Path="MoonlightServers.Shared\MoonlightServers.Shared.csproj" />
|
||||||
|
</Folder>
|
||||||
</Solution>
|
</Solution>
|
||||||
|
|||||||
Reference in New Issue
Block a user