cleaned up diagnose feature
This commit is contained in:
@@ -1,12 +1,6 @@
|
|||||||
using System.IO.Compression;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging.Console;
|
|
||||||
using MoonCore.Attributes;
|
using MoonCore.Attributes;
|
||||||
using MoonCore.Exceptions;
|
|
||||||
using MoonCore.Helpers;
|
|
||||||
using Moonlight.ApiServer.Helpers;
|
|
||||||
using Moonlight.ApiServer.Interfaces;
|
using Moonlight.ApiServer.Interfaces;
|
||||||
using Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
using Moonlight.ApiServer.Services;
|
using Moonlight.ApiServer.Services;
|
||||||
using Moonlight.Shared.Http.Responses.Admin.Sys;
|
using Moonlight.Shared.Http.Responses.Admin.Sys;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using MoonCore.Helpers;
|
|
||||||
using Moonlight.ApiServer.Configuration;
|
using Moonlight.ApiServer.Configuration;
|
||||||
using Moonlight.ApiServer.Extensions;
|
using Moonlight.ApiServer.Extensions;
|
||||||
using Moonlight.ApiServer.Interfaces;
|
using Moonlight.ApiServer.Interfaces;
|
||||||
using Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
|
|
||||||
namespace Moonlight.ApiServer.Implementations.Diagnose;
|
namespace Moonlight.ApiServer.Implementations.Diagnose;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
|
|
||||||
namespace Moonlight.ApiServer.Interfaces;
|
namespace Moonlight.ApiServer.Interfaces;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
namespace Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
|
|
||||||
public class DiagnoseDirectory : DiagnoseEntry
|
|
||||||
{
|
|
||||||
public List<DiagnoseEntry> Children { get; set; } = new();
|
|
||||||
public override bool IsDirectory => true;
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
namespace Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
|
|
||||||
public abstract class DiagnoseEntry
|
|
||||||
{
|
|
||||||
public required string Name { get; set; } = "";
|
|
||||||
|
|
||||||
public abstract bool IsDirectory { get; }
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
namespace Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
|
|
||||||
public class DiagnoseFile : DiagnoseEntry
|
|
||||||
{
|
|
||||||
public Func<byte[]> GetContent = () => [];
|
|
||||||
|
|
||||||
public override bool IsDirectory => false;
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
using MoonCore.Helpers;
|
|
||||||
using Moonlight.ApiServer.Interfaces;
|
using Moonlight.ApiServer.Interfaces;
|
||||||
using Moonlight.ApiServer.Models.Diagnose;
|
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text;
|
|
||||||
using MoonCore.Attributes;
|
using MoonCore.Attributes;
|
||||||
using Moonlight.Shared.Http.Responses.Admin.Sys;
|
using Moonlight.Shared.Http.Responses.Admin.Sys;
|
||||||
using Moonlight.Shared.Misc;
|
|
||||||
|
|
||||||
namespace Moonlight.ApiServer.Services;
|
namespace Moonlight.ApiServer.Services;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user