2018-06-07 00:45:47 +08:00
|
|
|
|
using Bootstrap.DataAccess;
|
|
|
|
|
using Longbow.Web.Mvc;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Query
|
|
|
|
|
{
|
2018-10-28 15:08:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2018-06-07 00:45:47 +08:00
|
|
|
|
public class QueryExceptionOption : PaginationOption
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2018-11-25 14:28:32 +08:00
|
|
|
|
public DateTime? StartTime { get; set; }
|
2018-06-07 00:45:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2018-11-25 14:28:32 +08:00
|
|
|
|
public DateTime? EndTime { get; set; }
|
2018-06-07 00:45:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2019-01-11 23:20:28 +08:00
|
|
|
|
public QueryData<object> Retrieves()
|
2018-06-07 00:45:47 +08:00
|
|
|
|
{
|
2019-01-11 23:20:28 +08:00
|
|
|
|
var data = ExceptionsHelper.RetrievePages(this, StartTime, EndTime);
|
2018-10-30 13:07:29 +08:00
|
|
|
|
var ret = new QueryData<object>();
|
2019-01-11 23:20:28 +08:00
|
|
|
|
ret.total = (int)data.TotalItems;
|
|
|
|
|
ret.rows = data.Items.Select(ex => new { ex.UserId, ex.UserIp, ex.LogTime, ex.Message, ex.ErrorPage, ex.ExceptionType });
|
2018-06-07 00:45:47 +08:00
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|