|
|
@ -19,13 +19,17 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
private readonly IndexerProvider _indexerProvider;
|
|
|
|
private readonly IndexerProvider _indexerProvider;
|
|
|
|
private readonly ConfigProvider _configProvider;
|
|
|
|
private readonly ConfigProvider _configProvider;
|
|
|
|
private readonly DiskProvider _diskProvider;
|
|
|
|
private readonly DiskProvider _diskProvider;
|
|
|
|
|
|
|
|
private readonly ArchiveProvider _archiveProvider;
|
|
|
|
|
|
|
|
|
|
|
|
public SystemController(JobProvider jobProvider, IndexerProvider indexerProvider, ConfigProvider configProvider, DiskProvider diskProvider)
|
|
|
|
public SystemController(JobProvider jobProvider, IndexerProvider indexerProvider,
|
|
|
|
|
|
|
|
ConfigProvider configProvider, DiskProvider diskProvider,
|
|
|
|
|
|
|
|
ArchiveProvider archiveProvider)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_jobProvider = jobProvider;
|
|
|
|
_jobProvider = jobProvider;
|
|
|
|
_indexerProvider = indexerProvider;
|
|
|
|
_indexerProvider = indexerProvider;
|
|
|
|
_configProvider = configProvider;
|
|
|
|
_configProvider = configProvider;
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
|
|
|
|
_archiveProvider = archiveProvider;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ActionResult Jobs()
|
|
|
|
public ActionResult Jobs()
|
|
|
@ -48,13 +52,11 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
return View(_indexerProvider.All());
|
|
|
|
return View(_indexerProvider.All());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ActionResult Config()
|
|
|
|
public ActionResult Config()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return View(_configProvider.All());
|
|
|
|
return View(_configProvider.All());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[GridAction]
|
|
|
|
[GridAction]
|
|
|
|
public ActionResult _SelectAjaxEditing()
|
|
|
|
public ActionResult _SelectAjaxEditing()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -144,5 +146,11 @@ namespace NzbDrone.Web.Controllers
|
|
|
|
|
|
|
|
|
|
|
|
return JsonNotificationResult.Info("Job Queued");
|
|
|
|
return JsonNotificationResult.Info("Job Queued");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ActionResult Backup()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var file = _archiveProvider.CreateBackupZip();
|
|
|
|
|
|
|
|
return File(file.FullName, "application/binary", file.Name);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|