Files
YouTube-Manager/Manager.App/Components/Application/System/EventConsole.razor
2025-09-10 18:19:36 +02:00

21 lines
1.0 KiB
Plaintext

@inject IJSRuntime JsRuntime
@implements IDisposable
<MudPaper Elevation="Elevation" Class="@Class" Style="@Style">
<MudStack Class="ml-2 mb-2" Spacing="2" Row>
<MudStack Spacing="1">
<MudText Typo="Typo.h5">Live service events</MudText>
<MudText Typo="Typo.caption">@($"{_serviceEvents.Count} events")</MudText>
</MudStack>
<MudSwitch @bind-Value="@_autoScroll">Auto-scroll</MudSwitch>
</MudStack>
<div @ref="@_consoleContainer" class="console-container" @onwheel="OnUserScroll">
<Virtualize ItemsProvider="VirtualizedItemsProvider" Context="serviceEvent">
<div class="log-line">
@TimeZoneInfo.ConvertTime(serviceEvent.DateUtc, _timeZone)&nbsp;
<span class="log-severity @GetLogClass(serviceEvent)">@serviceEvent.Severity</span>&nbsp;[<span style="color: #1565c0">@serviceEvent.Source</span>]&nbsp;
<span style="color: snow">@serviceEvent.Message</span>
</div>
</Virtualize>
</div>
</MudPaper>