[CHANGE] Services view

This commit is contained in:
max
2025-09-09 19:51:07 +02:00
parent 2593d02a73
commit 9ff4fcded2
6 changed files with 66 additions and 17 deletions

View File

@@ -0,0 +1,26 @@
@page "/Services"
@using Manager.App.Services.System
@inject BackgroundServiceManager ServiceManager
<title>Services</title>
<MudDataGrid T="ExtendedBackgroundService" MultiSelection Items="@_backgroundServices">
<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.State" Title="Status"/>
<PropertyColumn Property="x => x.ExecuteInterval" Title="Execute interval"/>
<TemplateColumn></TemplateColumn>
</Columns>
<PagerContent>
<MudDataGridPager T="ExtendedBackgroundService" />
</PagerContent>
</MudDataGrid>

View File

@@ -0,0 +1,16 @@
using Manager.App.Services;
using Microsoft.AspNetCore.Components;
using MudBlazor;
namespace Manager.App.Components.Pages;
public partial class Services : ComponentBase
{
private string _searchText = "";
private List<ExtendedBackgroundService> _backgroundServices = [];
protected override void OnInitialized()
{
_backgroundServices = ServiceManager.GetServices();
}
}