@page "/gateway/realalarm"
@namespace ThingsGateway.Gateway.Razor
@using ThingsGateway.Admin.Application
@using ThingsGateway.Admin.Razor
@using ThingsGateway.Gateway.Application
@attribute [Authorize]
@attribute [RolePermission]
@inherits ComponentDefault


<div class="h-100">

    <AdminTable @ref=table TItem="AlarmVariable"
                AutoGenerateColumns="false"
                ShowAdvancedSearch=false
                EditDialogSize="Size.Large"
                AllowResizing="true"
                IsFixedHeader=true
                IsMultipleSelect=false
                SearchModel=SearchModel
                ShowExtendButtons=false
                ShowExportButton=false
                ShowExtendDeleteButton=false
                ShowExtendEditButton=false
                ShowSearch="false"
                ShowDefaultButtons=false
                ExtendButtonColumnWidth=150
                AutoRefreshInterval="2000"
                IsAutoRefresh
                OnQueryAsync="OnQueryAsync"
                IsPagination=true>

        <TableColumns>
            <TableColumn Field="@context.DeviceName" FieldExpression=@(()=>context.DeviceName) Filterable="true" Sortable="true" Visible="true" />
            <TableColumn @bind-Field="@context.Name" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.Description" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.DataType" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.AlarmTime" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.AlarmCode" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.AlarmLimit" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.AlarmText" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.AlarmType" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.RecoveryCode" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.EventTime" Filterable=true Sortable=true Visible=true />
            <TableColumn @bind-Field="@context.EventType" Filterable=true Sortable=true Visible=true />

        </TableColumns>

    </AdminTable>
</div>

@code {
    AdminTable<AlarmVariable> table;
}
