You've already forked onecmonitor
mirror of
https://github.com/akpaevj/onecmonitor.git
synced 2026-06-17 22:34:48 +02:00
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
@page "/configurationrepositories"
|
|
@using Microsoft.EntityFrameworkCore
|
|
@using OneSwiss.Server.Attributes
|
|
@using OneSwiss.Server.Models
|
|
@using OneSwiss.Server.Components.Shared
|
|
@rendermode InteractiveServer
|
|
|
|
@attribute [ExtAuthorize(Roles.ReadMaintenanceTasks, Roles.WriteMaintenanceTasks)]
|
|
|
|
<DatabaseObjectsTable TModel="ConfigurationRepository" TViewModel="ConfigurationRepository"
|
|
NameSelector="arg => arg.Name"
|
|
Route="configurationrepositories"
|
|
Title="Хранилища конфигураций"
|
|
DisableTableActions="true"
|
|
ItemsSelector="ItemsSelector"
|
|
ShowDeleteButton="false">
|
|
<ColumnsContent>
|
|
<MudTh>Агент</MudTh>
|
|
<MudTh>Имя</MudTh>
|
|
<MudTh>Хост</MudTh>
|
|
<MudTh>Порт</MudTh>
|
|
</ColumnsContent>
|
|
<RowTemplate>
|
|
<MudTd DataLabel="Агент">@context.Agent.InstanceName</MudTd>
|
|
<MudTd DataLabel="Порт">@context.Name</MudTd>
|
|
<MudTd DataLabel="Имя">@context.Host</MudTd>
|
|
<MudTd DataLabel="Хост">@context.Port</MudTd>
|
|
</RowTemplate>
|
|
</DatabaseObjectsTable>
|
|
|
|
@code {
|
|
|
|
private static IQueryable<ConfigurationRepository> ItemsSelector(IQueryable<ConfigurationRepository> arg)
|
|
{
|
|
return arg.Include(c => c.Agent);
|
|
}
|
|
|
|
} |