1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Web/Controllers/SharedController.cs

40 lines
1.1 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;
2011-11-08 20:48:34 +03:00
using NzbDrone.Web.Models;
namespace NzbDrone.Web.Controllers
{
public class SharedController : Controller
{
private readonly EnvironmentProvider _environmentProvider;
private readonly RootDirProvider _rootDirProvider;
public SharedController(EnvironmentProvider environmentProvider, RootDirProvider rootDirProvider)
{
_environmentProvider = environmentProvider;
_rootDirProvider = rootDirProvider;
}
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]
//[OutputCache(Duration = 600)]
public ActionResult FreeSpace()
{
var rootDirs = _rootDirProvider.AllWithFreeSpace();
return PartialView(rootDirs);
}
}
2011-04-10 05:44:01 +03:00
}