@page "/admin/system/diagnose" @using MoonCore.Attributes @using MoonCore.Helpers @using Moonlight.Shared.Http.Requests.Admin.Sys @using Moonlight.Shared.Http.Responses.Admin.Sys @attribute [RequirePermission("admin.system.diagnose")] @inject HttpApiClient ApiClient @inject DownloadService DownloadService
Diagnose

If you're experiencing issues or need help via our Discord, you're in the right place here! By pressing the button below, Moonlight will run all available diagnostic checks and package the results into a downloadable zip file. The report includes useful information about your system, plugins, and environment, making it easier to identify problems or share with support.

Generate diagnose
Advanced @if (DropdownOpen) { } else { }
@foreach (var item in AvailableProviders) {
}
@code { private bool DropdownOpen = false; private Dictionary AvailableProviders; private bool SelectAll { get => AvailableProviders.Values.All(v => v); set { foreach (var k in AvailableProviders.Keys) AvailableProviders[k] = value; } } private async Task Load(LazyLoader arg) { var providers = await ApiClient.GetJson( "api/admin/system/diagnose/providers" ); AvailableProviders = providers .ToDictionary(x => x, _ => true); } private async Task GenerateDiagnose(WButton _) { var request = new GenerateDiagnoseRequest(); if (!SelectAll) { // filter the providers which have been selected if not all providers have been selected request.Providers = AvailableProviders .Where(x => x.Value) .Select(x => x.Key.Type) .ToArray(); } var stream = await ApiClient.PostStream("api/admin/system/diagnose", request); await DownloadService.DownloadStream("diagnose.zip", stream); } private async Task ToggleDropDown() { DropdownOpen = !DropdownOpen; await InvokeAsync(StateHasChanged); } }