mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 18:28:19 +00:00
ae0648b8f4
Fixed: Free space widgets take up less space on smaller screens
40 lines
No EOL
1.1 KiB
C#
40 lines
No EOL
1.1 KiB
C#
using System.Web.Mvc;
|
|
using NzbDrone.Common;
|
|
using NzbDrone.Core.Providers;
|
|
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.FreeSpaceOnDrives();
|
|
|
|
return PartialView(rootDirs);
|
|
}
|
|
}
|
|
} |