68 lines
2.2 KiB
Plaintext
68 lines
2.2 KiB
Plaintext
@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.");
|
|
}
|
|
|
|
<h3>
|
|
全局异常
|
|
</h3>
|
|
|
|
<p>
|
|
<br /><br />
|
|
</p>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
|
|
{
|
|
<div class="alert alert-danger">@Html.Raw(Model.ErrorMessage)</div>
|
|
}
|
|
@if (!string.IsNullOrEmpty(Model.SuccessMessage))
|
|
{
|
|
<div class="alert alert-success">@Html.Raw(Model.SuccessMessage)</div>
|
|
}
|
|
|
|
@Html.Raw(TightWiki.Library.ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath,
|
|
"这将永久清除所有异常. 继续吗?",
|
|
"清除所有异常", "/Admin/PurgeExceptions", Context.Request.Path.Value))
|
|
<br />
|
|
<br />
|
|
|
|
@using (Html.BeginForm(null, null, FormMethod.Get, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" }))
|
|
{
|
|
@if (Model.Exceptions.Count > 0)
|
|
{
|
|
<table class="table fixedTable100 table-striped" border="0" cellspacing="0" cellpadding="0">
|
|
<thead>
|
|
<tr>
|
|
<td><strong><a href="?@QueryStringConverter.OrderHelper(sessionState, "Id")">Id</a></strong></td>
|
|
<td><strong>异常</strong></td>
|
|
<td><strong>异常明细</strong></td>
|
|
<td><strong><a href="?@QueryStringConverter.OrderHelper(sessionState, "CreatedDate")">时间</a></strong></td>
|
|
</tr>
|
|
</thead>
|
|
|
|
@foreach (var ex in Model.Exceptions)
|
|
{
|
|
<tr>
|
|
<td><a href="@GlobalConfiguration.BasePath/Admin/Exception/@ex.Id">@ex.Id</a></td>
|
|
<td>@ex.Text</td>
|
|
<td>@ex.ExceptionText</td>
|
|
<td>@ex.CreatedDate</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
|
|
@Html.Raw(TightWiki.Library.PageSelectorGenerator.Generate(Context.Request.QueryString, Model.PaginationPageCount))
|
|
}
|
|
else
|
|
{
|
|
<div class="d-flex small text-muted mb-0">
|
|
<strong>
|
|
暂无异常
|
|
</strong>
|
|
</div>
|
|
}
|
|
}
|