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