v7.3.2018.0614   重构高性能资源池,减少GC压力,增加线程池,让异步任务得到平等竞争CPU的机会
大石头 authored at 2018-06-14 17:56:44
3.02 KiB
X
@model IList<XCode.Membership.UserOnline>
@using NewLife;
@using NewLife.Web;
@using XCode;
@using XCode.Configuration;
@using System.Web.Mvc;
@using System.Web.Mvc.Ajax;
@using System.Web.Mvc.Html;
@using System.Web.Routing;
@{
    var fact = ViewBag.Factory as IEntityOperate;
    var page = ViewBag.Page as Pager;
    var fields = ViewBag.Fields as IList<FieldItem>;
    var enableSelect = this.EnableSelect();
}
<table class="table table-bordered table-hover table-striped table-condensed">
    <thead>
        <tr>
            @if (enableSelect)
            {
                <th class="text-center" style="width:10px;"><input type="checkbox" id="chkAll" title="全选" /></th>
            }
            <th class="text-center hidden-md hidden-sm hidden-xs"><a href="@Html.Raw(page.GetSortUrl("ID"))">编号</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Name"))">名称</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Times"))">次数</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Status"))">状态</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("OnlineTime"))">在线时间</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("CreateIP"))">创建地址</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("CreateAddress"))">物理地址</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("CreateTime"))">创建时间</a></th>
            <th class="text-center"><a href="@Html.Raw(page.GetSortUrl("UpdateTime"))">修改时间</a></th>
            @if (this.Has(PermissionFlags.Detail, PermissionFlags.Update, PermissionFlags.Delete))
            {
                <th class="text-center">操作</th>
            }
        </tr>
    </thead>
    <tbody>
        @foreach (var entity in Model)
        {
            <tr>
                @if (enableSelect)
                {
                    <td class="text-center"><input type="checkbox" name="keys" value="@entity.ID" /></td>
                }
                <td class="text-center hidden-md hidden-sm hidden-xs">@entity.ID</td>
                <td>@entity.Name</td>
                <td class="text-right">@entity.Times.ToString("n0")</td>
                <td style="max-width:600px;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;" title="@entity.Status">@entity.Status</td>
                <td class="text-right">@entity.OnlineTime.ToString("n0")</td>
                <td>@entity.CreateIP</td>
                <td>@entity.CreateAddress</td>
                <td>@entity.CreateTime.ToFullString("")</td>
                <td>@entity.UpdateTime.ToFullString("")</td>
                @if (this.Has(PermissionFlags.Detail, PermissionFlags.Update, PermissionFlags.Delete))
                {
                    <td class="text-center">
                        @Html.Partial("_List_Data_Action", (Object)entity)
                    </td>
                }
            </tr>
        }
    </tbody>
</table>