mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 04:51:45 +02:00
Free diskspace in UI
New: View Diskspace for root directories visible in UI #ND-98 fixed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user