2011-04-10 04:44:01 +02:00
|
|
|
|
using System.Web.Mvc;
|
2010-10-24 09:46:58 +02:00
|
|
|
|
using NzbDrone.Core.Instrumentation;
|
|
|
|
|
using Telerik.Web.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Web.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class LogController : Controller
|
|
|
|
|
{
|
2011-04-10 02:14:51 +02:00
|
|
|
|
private readonly LogProvider _logProvider;
|
2010-10-24 09:46:58 +02:00
|
|
|
|
|
2011-04-10 02:14:51 +02:00
|
|
|
|
public LogController(LogProvider logProvider)
|
2010-10-24 09:46:58 +02:00
|
|
|
|
{
|
|
|
|
|
_logProvider = logProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ActionResult Index()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ActionResult Clear()
|
|
|
|
|
{
|
|
|
|
|
_logProvider.DeleteAll();
|
|
|
|
|
return RedirectToAction("Index");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[GridAction]
|
|
|
|
|
public ActionResult _AjaxBinding()
|
|
|
|
|
{
|
|
|
|
|
return View(new GridModel(_logProvider.GetAllLogs()));
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-04-10 04:44:01 +02:00
|
|
|
|
}
|