mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-31 04:00:18 -07:00
Free diskspace in UI
New: View Diskspace for root directories visible in UI #ND-98 fixed
This commit is contained in:
parent
2bd866f590
commit
4212da9146
9 changed files with 95 additions and 32 deletions
|
@ -1,5 +1,6 @@
|
|||
using System.Web.Mvc;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Web.Models;
|
||||
|
||||
namespace NzbDrone.Web.Controllers
|
||||
|
@ -7,10 +8,12 @@ namespace NzbDrone.Web.Controllers
|
|||
public class SharedController : Controller
|
||||
{
|
||||
private readonly EnvironmentProvider _environmentProvider;
|
||||
private readonly RootDirProvider _rootDirProvider;
|
||||
|
||||
public SharedController(EnvironmentProvider environmentProvider)
|
||||
public SharedController(EnvironmentProvider environmentProvider, RootDirProvider rootDirProvider)
|
||||
{
|
||||
_environmentProvider = environmentProvider;
|
||||
_rootDirProvider = rootDirProvider;
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
|
@ -24,5 +27,14 @@ namespace NzbDrone.Web.Controllers
|
|||
{
|
||||
return PartialView(new FooterModel { BuildTime = _environmentProvider.BuildDateTime, Version = _environmentProvider.Version });
|
||||
}
|
||||
|
||||
[ChildActionOnly]
|
||||
//[OutputCache(Duration = 600)]
|
||||
public ActionResult FreeSpace()
|
||||
{
|
||||
var rootDirs = _rootDirProvider.AllWithFreeSpace();
|
||||
|
||||
return PartialView(rootDirs);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue