Log view now uses proper paging so it doesn't take a year to load up each page.

This commit is contained in:
Mark McDowall 2011-09-02 23:41:50 -07:00
commit 780abad3f7
3 changed files with 13 additions and 5 deletions

View file

@ -26,10 +26,12 @@ namespace NzbDrone.Web.Controllers
return Json(new NotificationResult() { Title = "Logs Cleared" });
}
[GridAction]
public ActionResult _AjaxBinding()
[GridAction(EnableCustomBinding = true)]
public ActionResult _AjaxBinding(GridCommand gridCommand)
{
return View(new GridModel(_logProvider.GetAllLogs()));
var logs = _logProvider.GetPagedLogs(gridCommand.Page, gridCommand.PageSize);
return View(new GridModel{ Data = logs.Items, Total = (int)logs.TotalItems });
}
}
}