@using NewLife;
@using NewLife.Web;
@using NewLife.Cube;
@using XCode;
@using Stardust.Data.Monitors;
@{
    var fact = ViewBag.Factory as IEntityFactory;
    var page = ViewBag.Page as Pager;

    var dic = AppTracer.FindAllWithCache().ToDictionary(e => e.ID, e => e + "");
    var appId = page["appId"].ToInt(-1);
}
@if (appId > 0)
{
    var app = AppTracer.FindByID(appId);
    <div class="form-group" style="width:160px;">
        <a href="appTracer?Id=@appId" class="btn btn-success btn-sm">@app</a>
    </div>
    <div class="form-group">
        @Html.ActionLink("每分钟", null, "appMinuteStat", new { appId })
        @Html.ActionLink("每天", null, "appDayStat", new { appId })
    </div>
}
<div class="form-group">
    <label for="appId" class="control-label">应用：</label>
    @Html.ForDropDownList("appId", dic, page["appId"], "全部", true)
</div>
@await Html.PartialAsync("_DateRange")