initial upload
This commit is contained in:
parent
a0aa9cc28e
commit
f857f43df4
553 changed files with 46169 additions and 13 deletions
88
src/Web/Insight.Web/Pages/Management/Agents/Index.razor
Normal file
88
src/Web/Insight.Web/Pages/Management/Agents/Index.razor
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
@inherits ComponentBase
|
||||
|
||||
<TableContainer T="ViewModel"
|
||||
@ref="Container"
|
||||
@bind-Search="Search"
|
||||
Title="@Title"
|
||||
Breadcrumbs="@Breadcrumbs"
|
||||
Data="LoadDataAsync"
|
||||
OnFilter="()=>Filter = true"
|
||||
Filtered="Filtered">
|
||||
<Header>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Serial" T="ViewModel">
|
||||
Serial
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Hostname" T="ViewModel">
|
||||
Hostname
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Version" T="ViewModel">
|
||||
Version
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Assigned" T="ViewModel">
|
||||
Assigned
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Online" T="ViewModel">
|
||||
Online
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
</Header>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Serial">
|
||||
<MudLink Href="@Navigation.Management.Agents.DetailsHref(context?.Id.ToString())" Typo="Typo.inherit" Underline="Underline.None">
|
||||
@context?.Serial
|
||||
</MudLink>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Hostname">
|
||||
@context?.Hostname
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Version">
|
||||
@context?.Version
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Assigned">
|
||||
<MudCheckBox Checked="@(context.Hosts is not null && context.Hosts.Any())" Disabled DisableRipple />
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Online">
|
||||
<MudText Color="(context.Online ? Color.Success : Color.Error)" Typo="Typo.inherit">
|
||||
@(context.Online ? "Online" : "Offline")
|
||||
</MudText>
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
<ActionTemplate>
|
||||
<MudMenuItem OnClick="@(()=>OnDelete(context))">
|
||||
Delete
|
||||
</MudMenuItem>
|
||||
</ActionTemplate>
|
||||
</TableContainer>
|
||||
|
||||
<ActionDialog @bind-Visible="Filter">
|
||||
<Content>
|
||||
<MudSwitch @bind-Checked="FilterUnassignedHost" Color="Color.Primary">
|
||||
Unassigned
|
||||
</MudSwitch>
|
||||
</Content>
|
||||
<Actions>
|
||||
<MudButton OnClick="OnFilterReset">
|
||||
Reset
|
||||
</MudButton>
|
||||
<MudButton OnClick="() => Filter = false" Color="Color.Secondary">
|
||||
Done
|
||||
</MudButton>
|
||||
</Actions>
|
||||
</ActionDialog>
|
||||
|
||||
<CascadingValue Name="Agent" Value="@Model">
|
||||
<AgentDeleteDialog @ref="_deleteDialog" OnChanges="OnRefreshAsync" />
|
||||
</CascadingValue>
|
||||
|
||||
@code {
|
||||
private AgentDeleteDialog? _deleteDialog;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue