46 lines
2.0 KiB
Plaintext
46 lines
2.0 KiB
Plaintext
@page "/Services"
|
|
@using Manager.App.Services.System
|
|
@using Manager.App.Components.Application.System
|
|
@implements IDisposable
|
|
|
|
@inject BackgroundServiceRegistry ServiceRegistry
|
|
|
|
<PageTitle>Services</PageTitle>
|
|
|
|
<MudDataGrid T="ExtendedBackgroundService" Items="@_backgroundServices" Filterable QuickFilter="@QuickFilter" Dense>
|
|
<ToolBarContent>
|
|
<MudText Typo="Typo.h6">Services</MudText>
|
|
<MudSpacer/>
|
|
<MudTextField T="string" @bind-Value="@_searchText" Immediate
|
|
Placeholder="Search" Adornment="Adornment.Start"
|
|
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium"/>
|
|
</ToolBarContent>
|
|
<Columns>
|
|
<PropertyColumn Property="x => x.Name" Title="Service"/>
|
|
<PropertyColumn Property="x => x.Description" Title="Description"/>
|
|
<PropertyColumn Property="x => x.State" Title="Status"/>
|
|
<PropertyColumn Property="x => x.ExecuteInterval" Title="Execute interval"/>
|
|
<TemplateColumn Title="Actions">
|
|
<CellTemplate>
|
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert"
|
|
AriaLabel="Actions">
|
|
@foreach (var action in context.Item?.Actions ?? [])
|
|
{
|
|
<MudMenuItem OnClick="@action.Action" Disabled="@(!action.IsEnabled())">
|
|
<MudTooltip Text="@action.Description">
|
|
<span>@action.Id</span>
|
|
</MudTooltip>
|
|
</MudMenuItem>
|
|
}
|
|
</MudMenu>
|
|
</CellTemplate>
|
|
</TemplateColumn>
|
|
</Columns>
|
|
<PagerContent>
|
|
<MudDataGridPager T="ExtendedBackgroundService"/>
|
|
</PagerContent>
|
|
</MudDataGrid>
|
|
|
|
<EventConsole AsyncEnumerable="@GetEventAsyncEnumerable()" InitialEvents="@GetInitialEvents()"
|
|
Elevation="0" Class="mt-3" Style="flex: 1; display: flex; flex-direction: column; min-height: 350px;"/>
|