mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Hidden startup, shutodwn and restart
New: Run without console window by default New: Added NzbDrone.Console to run with console window New: Shutdown from UI New: Restart from UI
This commit is contained in:
@@ -36,6 +36,16 @@ namespace NzbDrone.Web.Controllers
|
||||
_statsProvider = statsProvider;
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Logs()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Jobs()
|
||||
{
|
||||
var queue = _jobProvider.Queue.Select(c => new JobQueueItemModel
|
||||
@@ -80,32 +90,6 @@ namespace NzbDrone.Web.Controllers
|
||||
return View((object)serialized);
|
||||
}
|
||||
|
||||
public JsonResult SelectConfigAjax()
|
||||
{
|
||||
var config = _configProvider.All();
|
||||
|
||||
return Json(new
|
||||
{
|
||||
iTotalRecords = config.Count(),
|
||||
iTotalDisplayRecords = config.Count(),
|
||||
aaData = config
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string SaveConfigAjax(string id, string value)
|
||||
{
|
||||
_configProvider.SetValue(id, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string InsertConfigAjax(string key, string value)
|
||||
{
|
||||
_configProvider.SetValue(key, value);
|
||||
return key;
|
||||
}
|
||||
|
||||
//PostDownloadView
|
||||
public ActionResult PendingProcessing()
|
||||
{
|
||||
@@ -184,5 +168,43 @@ namespace NzbDrone.Web.Controllers
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public JsonResult Restart()
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(AppRestartJob));
|
||||
return JsonNotificationResult.Info("NzbDrone will restart shortly");
|
||||
}
|
||||
|
||||
public JsonResult Shutdown()
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(AppShutdownJob));
|
||||
return JsonNotificationResult.Info("NzbDrone will shutdown shortly");
|
||||
}
|
||||
|
||||
public JsonResult SelectConfigAjax()
|
||||
{
|
||||
var config = _configProvider.All();
|
||||
|
||||
return Json(new
|
||||
{
|
||||
iTotalRecords = config.Count(),
|
||||
iTotalDisplayRecords = config.Count(),
|
||||
aaData = config
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string SaveConfigAjax(string id, string value)
|
||||
{
|
||||
_configProvider.SetValue(id, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string InsertConfigAjax(string key, string value)
|
||||
{
|
||||
_configProvider.SetValue(key, value);
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user