1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/NzbDrone.Web/Controllers/SharedController.cs

41 lines
1.2 KiB
C#
Raw Normal View History

using System.Web.Mvc;
2011-11-08 20:48:34 +03:00
using NzbDrone.Common;
using NzbDrone.Core.Providers;
2013-02-04 07:18:59 +03:00
using NzbDrone.Core.RootFolders;
2011-11-08 20:48:34 +03:00
using NzbDrone.Web.Models;
namespace NzbDrone.Web.Controllers
{
public class SharedController : Controller
{
private readonly EnvironmentProvider _environmentProvider;
2013-02-04 07:18:59 +03:00
private readonly RootFolderService _rootFolderService;
2013-02-04 07:18:59 +03:00
public SharedController(EnvironmentProvider environmentProvider, RootFolderService rootFolderService)
{
_environmentProvider = environmentProvider;
2013-02-04 07:18:59 +03:00
_rootFolderService = rootFolderService;
}
public ActionResult Index()
{
return RedirectToAction("Index", "Series");
}
[ChildActionOnly]
[OutputCache(Duration = 3600)]
public ActionResult Footer()
{
return PartialView(new FooterModel { BuildTime = _environmentProvider.BuildDateTime, Version = _environmentProvider.Version });
}
[ChildActionOnly]
2012-12-23 09:03:26 +03:00
[OutputCache(Duration = 600)]
public ActionResult FreeSpace()
{
2013-02-04 07:18:59 +03:00
var rootDirs = _rootFolderService.FreeSpaceOnDrives();
return PartialView(rootDirs);
}
}
2011-04-10 05:44:01 +03:00
}