Update: Plugin Framework Install & UI

This commit is contained in:
Gary Sharp
2013-02-12 17:27:54 +11:00
parent b24253fd64
commit 734b02fa1d
35 changed files with 2792 additions and 1888 deletions
@@ -4,6 +4,7 @@ using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Services.Plugins;
using Disco.Services.Tasks;
using Disco.Web.Areas.Config.Models.Plugins;
namespace Disco.Web.Areas.Config.Controllers
@@ -65,5 +66,27 @@ namespace Disco.Web.Areas.Config.Controllers
}
#endregion
public virtual ActionResult Install()
{
// Check for recent catalogue
var catalogue = Plugins.LoadCatalogue(dbContext);
if (catalogue == null || catalogue.ResponseTimestamp < DateTime.Now.AddMinutes(-15))
{
// Need to Update Catalogue
return RedirectToAction(MVC.API.Plugin.UpdateLibraryCatalogue());
}
else
{
var model = new Models.Plugins.InstallModel()
{
Catalogue = catalogue
};
return View(model);
}
}
}
}