Default Log view uses client operations, added all logs view that uses paging (No support for sorting or filtering).

This commit is contained in:
Mark McDowall 2011-09-05 12:59:39 -07:00
parent 179de93a6e
commit c13c9d15c4
11 changed files with 146 additions and 15 deletions

View file

@ -2,6 +2,7 @@
using NzbDrone.Core.Instrumentation;
using NzbDrone.Web.Models;
using Telerik.Web.Mvc;
using System.Linq;
namespace NzbDrone.Web.Controllers
{
@ -19,15 +20,28 @@ namespace NzbDrone.Web.Controllers
return View();
}
public ActionResult All()
{
return View();
}
public JsonResult Clear()
{
_logProvider.DeleteAll();
return Json(new NotificationResult() { Title = "Logs Cleared" });
return Json(new NotificationResult { Title = "Logs Cleared" });
}
[GridAction]
public ActionResult _TopAjaxBinding()
{
var logs = _logProvider.TopLogs();
return View(new GridModel(logs));
}
[GridAction(EnableCustomBinding = true)]
public ActionResult _AjaxBinding(GridCommand gridCommand)
public ActionResult _AllAjaxBinding(GridCommand gridCommand)
{
var logs = _logProvider.GetPagedLogs(gridCommand.Page, gridCommand.PageSize);