Log grid will reload when logs are cleared.

History grid will reload when history is trimmed or purged.
This commit is contained in:
Mark McDowall 2012-02-10 21:00:22 -08:00
parent d7965022db
commit bc3e7239c2
7 changed files with 106 additions and 49 deletions

View file

@ -19,6 +19,11 @@ namespace NzbDrone.Web.Controllers
}
public ActionResult Index()
{
return View();
}
public JsonResult AjaxBinding()
{
var history = _historyProvider.AllItemsWithRelationships().Select(h => new HistoryModel
{
@ -36,9 +41,11 @@ namespace NzbDrone.Web.Controllers
EpisodeId = h.EpisodeId
}).OrderByDescending(h => h.Date).ToList();
var serialized = new JavaScriptSerializer().Serialize(history);
return View((object)serialized);
return Json(new
{
aaData = history
},
JsonRequestBehavior.AllowGet);
}
public JsonResult Trim()