Rename ResultStatus to Results
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user