@model TightWiki.Models.ViewModels.Admin.ExceptionsViewModel
@using TightWiki.Library
@using TightWiki.Models
@{
Layout = "/Views/Shared/_Layout.cshtml";
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
}
全局异常
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
{
@Html.Raw(Model.ErrorMessage)
}
@if (!string.IsNullOrEmpty(Model.SuccessMessage))
{
@Html.Raw(Model.SuccessMessage)
}
@Html.Raw(TightWiki.Library.ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath,
"这将永久清除所有异常. 继续吗?",
"清除所有异常", "/Admin/PurgeExceptions", Context.Request.Path.Value))
@using (Html.BeginForm(null, null, FormMethod.Get, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" }))
{
@if (Model.Exceptions.Count > 0)
{
| Id |
异常 |
异常明细 |
时间 |
@foreach (var ex in Model.Exceptions)
{
| @ex.Id |
@ex.Text |
@ex.ExceptionText |
@ex.CreatedDate |
}
@Html.Raw(TightWiki.Library.PageSelectorGenerator.Generate(Context.Request.QueryString, Model.PaginationPageCount))
}
else
{
暂无异常
}
}