diff --git a/WebCms/Controllers/QueueController.cs b/WebCms/Controllers/QueueController.cs index c5488e5..36a78ea 100644 --- a/WebCms/Controllers/QueueController.cs +++ b/WebCms/Controllers/QueueController.cs @@ -44,14 +44,14 @@ namespace LeafWeb.WebCms.Controllers [HttpPost] - public ActionResult Search(LeafDataQuery q) + public ActionResult Search(LeafDataQuery query) { if (!ModelState.IsValid) { return CurrentUmbracoPage(); } - return RedirectToCurrentUmbracoPage(q.GetNameValueCollection()); + return RedirectToCurrentUmbracoPage(query.GetNameValueCollection()); } private TimeInProgressEstimater TimeInProgressEstimater() @@ -127,14 +127,14 @@ namespace LeafWeb.WebCms.Controllers return GetOutputZip(id, LeafOutputFileType.CleanedInput); } - public ActionResult DownloadResultsInputZip(LeafDataQuery q) + public ActionResult DownloadResultsInputZip(LeafDataQuery query) { - return GetResults(q, LeafInput.GetInputFilesZip, $"LeafWeb_{DateTime.Now:yyyy-dd-MM--HH-mm-ss}_Input.zip"); + return GetResults(query, LeafInput.GetInputFilesZip, $"LeafWeb_{DateTime.Now:yyyy-dd-MM--HH-mm-ss}_Input.zip"); } - public ActionResult DownloadResultsOutputZip(LeafDataQuery q) + public ActionResult DownloadResultsOutputZip(LeafDataQuery query) { - return GetResults(q, LeafInput.GetOutputFilesZip_ToUser, $"LeafWeb_{DateTime.Now:yyyy-dd-MM--HH-mm-ss}_Output.zip"); + return GetResults(query, LeafInput.GetOutputFilesZip_ToUser, $"LeafWeb_{DateTime.Now:yyyy-dd-MM--HH-mm-ss}_Output.zip"); } private ActionResult GetOutputZip(int id, LeafOutputFileType type) diff --git a/WebCms/Views/Queue/Index.cshtml b/WebCms/Views/Queue/Index.cshtml index d2ad47b..55fbf8c 100644 --- a/WebCms/Views/Queue/Index.cshtml +++ b/WebCms/Views/Queue/Index.cshtml @@ -4,99 +4,24 @@ @model QueueViewModel @{ - Html.RequiresJs("~/scripts/jquery.validate.min.js", 2); - Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.min.js", 2); - Html.RequiresJs("~/scripts/jquery.validate.custom.js", 2); - Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.js", 2); Html.RequiresJs("~/scripts/Queue.js"); var grid = new WebGrid(Model.Items, rowsPerPage: 45); } -@using (Html.BeginUmbracoForm("Search", "Queue", null, new { @action = "/leaf-data/manage-queue/" })) -{ -
-
- @Model.Items.Count() results
- Service description: @Model.ServerDescription - @*Est. processing time by LeafInput size - - 1: @Model.TimeInProgressEstimater.EstimateTimeInProgress(1).ToRoundedReadableString() - 10: @Model.TimeInProgressEstimater.EstimateTimeInProgress(10).ToRoundedReadableString() - 100: @Model.TimeInProgressEstimater.EstimateTimeInProgress(100).ToRoundedReadableString()*@ -
-
-
- - - - - -
-
+
+
+ @Model.Items.Count() results
+ Service description: @Model.ServerDescription + @*Est. processing time by LeafInput size - + 1: @Model.TimeInProgressEstimater.EstimateTimeInProgress(1).ToRoundedReadableString() + 10: @Model.TimeInProgressEstimater.EstimateTimeInProgress(10).ToRoundedReadableString() + 100: @Model.TimeInProgressEstimater.EstimateTimeInProgress(100).ToRoundedReadableString()*@
-
- -
-
-
- @Html.EditorFor(m => m.Q.siteid) -
-
- @Html.EditorFor(m => m.Q.species) -
-
-
-
-
-
-
- @Html.EditorFor(m => m.Q.lat, new { size = "small", append = "°" }) -
-
- @Html.EditorFor(m => m.Q.latr, new { size = "small", prepend = "±", append = "°" }) -
-
-
-
-
-
- @Html.EditorFor(m => m.Q.lon, new { size = "small", append = "°" }) -
-
- @Html.EditorFor(m => m.Q.lonr, new { size = "small", prepend = "±", append = "°" }) -
-
-
-
-
-
Curve Variation range minimum
-
-
- @Html.EditorFor(m => m.Q.co2s, new { size = "small", append = "umol/m", prepend = ">" }) -
-
- @Html.EditorFor(m => m.Q.pari, new { size = "small", append = "umol/m2/s", prepend = ">" }) -
-
- @Html.EditorFor(m => m.Q.tleaf, new { size = "small", append = "oC", prepend = ">" }) -
-
- @Html.EditorFor(m => m.Q.phips2, new { size = "small", prepend = ">" }) -
-
-
-
-
- @Html.EditorFor(m => m.Q.completed) -
-
-
+
+ @Html.Partial("_LeafDataQuery", Model.Q)
-} - +
@if (Model.Items.Any()) { @@ -281,5 +206,4 @@ else Output
-} - +} \ No newline at end of file diff --git a/WebCms/Views/Shared/_LeafDataQuery.cshtml b/WebCms/Views/Shared/_LeafDataQuery.cshtml new file mode 100644 index 0000000..8497bda --- /dev/null +++ b/WebCms/Views/Shared/_LeafDataQuery.cshtml @@ -0,0 +1,81 @@ +@using ClientDependency.Core.Mvc +@model LeafDataQuery +@{ + Html.RequiresJs("~/scripts/jquery.validate.min.js", 2); + Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.min.js", 2); + Html.RequiresJs("~/scripts/jquery.validate.custom.js", 2); + Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.js", 2); +} +@using (Html.BeginUmbracoForm("Search", "Queue", null, new {action = "/leaf-data/manage-queue/"})) +{ +
+ + + + + +
+ +
+
+
+
+
+ @Html.EditorFor(m => m.siteid) +
+
+ @Html.EditorFor(m => m.species) +
+
+
+
+
+
+
+ @Html.EditorFor(m => m.lat, new {size = "small", append = "°"}) +
+
+ @Html.EditorFor(m => m.latr, new {size = "small", prepend = "±", append = "°"}) +
+
+
+
+
+
+ @Html.EditorFor(m => m.lon, new {size = "small", append = "°"}) +
+
+ @Html.EditorFor(m => m.lonr, new {size = "small", prepend = "±", append = "°"}) +
+
+
+
+
+
Curve Variation range minimum
+
+
+ @Html.EditorFor(m => m.co2s, new {size = "small", prepend = ">", append = "umol/m"}) +
+
+ @Html.EditorFor(m => m.pari, new {size = "small", prepend = ">", append = "umol/m2/s"}) +
+
+ @Html.EditorFor(m => m.tleaf, new {size = "small", prepend = ">", append = "oC"}) +
+
+ @Html.EditorFor(m => m.phips2, new {size = "small", prepend = ">"}) +
+
+
+
+
+ @Html.EditorFor(m => m.completed) +
+
+
+
+
+} \ No newline at end of file diff --git a/WebCms/WebCms.csproj b/WebCms/WebCms.csproj index c8f8f69..3c8bc85 100644 --- a/WebCms/WebCms.csproj +++ b/WebCms/WebCms.csproj @@ -1068,6 +1068,7 @@ + Web.config