[CHANGE] Reworked event console
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
@page "/Services"
|
||||
@using Manager.App.Services.System
|
||||
@using Manager.App.Components.Application.System
|
||||
@implements IDisposable
|
||||
|
||||
@inject BackgroundServiceManager ServiceManager
|
||||
@inject BackgroundServiceRegistry ServiceRegistry
|
||||
|
||||
<title>Services</title>
|
||||
|
||||
@@ -37,47 +38,5 @@
|
||||
</PagerContent>
|
||||
</MudDataGrid>
|
||||
|
||||
<MudPaper Elevation="0" Class="mt-3" Style="flex: 1; display: flex; flex-direction: column; min-height: 0;">
|
||||
<MudStack Class="ml-2 mb-2" Spacing="1">
|
||||
<MudText Typo="Typo.h5">Service events</MudText>
|
||||
<MudText Typo="Typo.caption">@($"{_serviceEvents.Count}/{VisibleEventCapacity} events")</MudText>
|
||||
</MudStack>
|
||||
<div class="console-container">
|
||||
<Virtualize Items="_serviceEvents" Context="serviceEvent">
|
||||
<div class="log-line">
|
||||
@($"{serviceEvent.Date:HH:mm:ss} | {serviceEvent.Severity} | {serviceEvent.Source} - {serviceEvent.Message}")
|
||||
</div>
|
||||
</Virtualize>
|
||||
</div>
|
||||
</MudPaper>
|
||||
|
||||
<style>
|
||||
.console-container {
|
||||
background-color: #1e1e1e;
|
||||
color: #9c9898;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.log-line {
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.log-info {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.log-warning {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.log-error {
|
||||
color: #f44747;
|
||||
}
|
||||
</style>
|
||||
<EventConsole AsyncEnumerable="@GetEventAsyncEnumerable()" InitialEvents="@GetInitialEvents()"
|
||||
Elevation="0" Class="mt-3" Style="flex: 1; display: flex; flex-direction: column; min-height: 0;"/>
|
||||
|
Reference in New Issue
Block a user