@page "/admin/system/diagnose" @using MoonCore.Attributes @using MoonCore.Helpers @using Moonlight.Shared.Http.Responses.Admin.Sys @using Moonlight.Shared.Misc @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
@foreach (var item in AvailableProviders) {
}
@code { private async Task GenerateDiagnose(WButton _) { string[] payload = []; if (!SelectAll) { // filter the providers which have been selected if not all providers have been selected payload = AvailableProviders .Where(x => x.Value) .Select(x => x.Key) .Select(x => x.Type) .ToArray(); } var stream = await ApiClient.PostStream("api/admin/system/diagnose", payload); await DownloadService.DownloadStream("diagnose.zip", stream); } private bool DropdownOpen = false; private bool AllSelected = true; private Dictionary AvailableProviders; private async Task ToggleDropDown() { DropdownOpen = !DropdownOpen; await InvokeAsync(StateHasChanged); } private async Task Load(LazyLoader arg) { AvailableProviders = (await ApiClient.GetJson("api/admin/system/diagnose/available")) .ToDictionary(x => x, _ => true); } private bool SelectAll { get => AvailableProviders.Values.All(v => v); set { // flip every entry to the new value var keys = AvailableProviders.Keys.ToList(); foreach (var k in keys) { AvailableProviders[k] = value; } } } }