Rename ResultStatus to Results

This commit is contained in:
2016-05-06 11:16:43 -04:00
parent e0788154ec
commit cf3a13b77b
8 changed files with 41 additions and 36 deletions
-9
View File
@@ -100,15 +100,6 @@ namespace LeafWeb.Web.Controllers
return View("Index", viewModel);
}
public FileContentResult DownloadResults(int id)
{
var leafInput = DataService.GetLeafInput(id);
var zip = leafInput.GetOutputFileZip();
return new FileContentResult(zip, "application/zip") {FileDownloadName = leafInput.Identifier + ".zip"};
}
public void NotifyComplete()
{
HangfireStartup.TriggerPiscalProcessQueue();
-19
View File
@@ -1,19 +0,0 @@
using System.Linq;
using System.Web.Mvc;
using LeafWeb.Web.ViewModels.ResultStatus;
namespace LeafWeb.Web.Controllers
{
public class ResultStatusController : ControllerBase
{
public ActionResult Index()
{
var viewModel =
DataService.GetLeafInputs()
.OrderByDescending(f => f.Id)
.ToList()
.Select(leafInput => new ResultStatusViewModel(leafInput));
return View(viewModel);
}
}
}
+33
View File
@@ -0,0 +1,33 @@
using System.Linq;
using System.Web.Mvc;
using LeafWeb.Core.Utility;
using LeafWeb.Web.Attributes;
using LeafWeb.Web.ViewModels.Results;
namespace LeafWeb.Web.Controllers
{
public class ResultsController : ControllerBase
{
public ActionResult Index()
{
var viewModel =
DataService.GetLeafInputs()
.OrderByDescending(f => f.Id)
.ToList()
.Select(leafInput => new ResultStatusViewModel(leafInput));
return View(viewModel);
}
[ActionLog]
public FileContentResult DownloadResults(int id)
{
var leafInput = DataService.GetLeafInput(id);
var zip = leafInput.GetOutputFileZip();
var filename = leafInput.Identifier.FilterValidFilename() + ".zip";
return new FileContentResult(zip, "application/zip") { FileDownloadName = filename };
}
}
}