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
@@ -1,7 +1,7 @@
using System;
using System.Linq;
using LeafWeb.Core.Entities;
using LeafWeb.Web.ViewModels.ResultStatus;
using LeafWeb.Web.ViewModels.Results;
using NUnit.Framework;
namespace LeafWeb.Web.Tests.ViewModels.ResultStatus
-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 };
}
}
}
@@ -2,7 +2,7 @@
using AutoMapper;
using LeafWeb.Core.Entities;
namespace LeafWeb.Web.ViewModels.ResultStatus
namespace LeafWeb.Web.ViewModels.Results
{
public class ResultStatusViewModel
{
@@ -1,7 +1,7 @@
@model IEnumerable<LeafWeb.Web.ViewModels.ResultStatus.ResultStatusViewModel>
@model IEnumerable<LeafWeb.Web.ViewModels.Results.ResultStatusViewModel>
@{
ViewBag.Title = "Results";
ViewBag.Title = "Result Status";
var grid = new WebGrid(Model, rowsPerPage: 45);
}
+1 -1
View File
@@ -49,7 +49,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Leaf Data <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/LeafInput">Submit Data</a></li>
<li><a href="/ResultStatus">Result Status</a></li>
<li><a href="/Results">Result Status</a></li>
</ul>
</li>
<li>
+3 -3
View File
@@ -965,7 +965,7 @@
<Compile Include="Controllers\FluxnetSiteController.cs" />
<Compile Include="Controllers\LeafCharterController.cs" />
<Compile Include="Controllers\LeafInputController.cs" />
<Compile Include="Controllers\ResultStatusController.cs" />
<Compile Include="Controllers\ResultsController.cs" />
<Compile Include="Controllers\PagesController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
@@ -985,7 +985,7 @@
<Compile Include="ViewModels\LeafCharter\LeafCharterViewModel.cs" />
<Compile Include="ViewModels\LeafInput\ConfirmViewModel.cs" />
<Compile Include="ViewModels\LeafInput\CreateViewModel.cs" />
<Compile Include="ViewModels\ResultStatus\ResultStatusViewModel.cs" />
<Compile Include="ViewModels\Results\ResultStatusViewModel.cs" />
<Compile Include="ViewModels\SelectListViewModel.cs" />
</ItemGroup>
<ItemGroup>
@@ -1018,7 +1018,7 @@
<Content Include="Views\Shared\_StatusMessage.cshtml" />
<Content Include="Views\Shared\_ValidationField.cshtml" />
<Content Include="Views\Shared\EditorTemplates\SelectListViewModel.cshtml" />
<Content Include="Views\ResultStatus\Index.cshtml" />
<Content Include="Views\Results\Index.cshtml" />
<Content Include="Views\Pages\Information.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>