Time estimation work
This commit is contained in:
@@ -1 +1 @@
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.g_xi0dfe.dll
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.re2ngwmg.dll
|
||||
@@ -35,8 +35,8 @@ namespace LeafWeb.WebCms.Controllers
|
||||
}
|
||||
|
||||
// completed leaf input for computing runtime statistics
|
||||
var completedLeafInput = DataService.GetLeafInputsOrdered().Where(li => li.CurrentStatus == LeafInputStatusType.Complete);
|
||||
var timeInProgressEstimater = new TimeInProgressEstimater(completedLeafInput.Take(20));
|
||||
var completedLeafInput = DataService.GetLeafInputRecentlyCompleted(100);
|
||||
var timeInProgressEstimater = new TimeInProgressEstimater(completedLeafInput);
|
||||
|
||||
var serviceDescription = ServiceDescription();
|
||||
|
||||
@@ -49,6 +49,14 @@ namespace LeafWeb.WebCms.Controllers
|
||||
return View(queueViewModel);
|
||||
}
|
||||
|
||||
public ActionResult LeafInputStatistics()
|
||||
{
|
||||
var data =
|
||||
from li in DataService.GetLeafInputRecentlyCompleted(100)
|
||||
select $"{li.InputFiles.Count}, {li.TimeInProgress.TotalSeconds}";
|
||||
return Content(string.Join("<br />", data));
|
||||
}
|
||||
|
||||
public ActionResult Search(string query)
|
||||
{
|
||||
var nameValueCollection = new NameValueCollection {{"query", query}};
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
<span class="glyphicon glyphicon-download"></span> Download ToUser
|
||||
</a>
|
||||
|
||||
<a href="@Url.Action("DownloadOutputNotToUser", "Queue", new {id = Model.LeafInputId})"
|
||||
class="btn btn-default@{if (!Model.HasOutputFiles)
|
||||
{<text> disabled</text>}}" role="button">
|
||||
<span class="glyphicon glyphicon-download"></span> Download NotToUser
|
||||
</a>
|
||||
|
||||
@using (Html.BeginUmbracoForm<QueueController>(
|
||||
"SendUserDownloadLink", null, new { @class = "confirm", confirm_msg = "Confirm sending email to user" }))
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="col-lg-8">
|
||||
Service description: @Model.ServerDescription<br/>
|
||||
Est. processing time by LeafInput size -
|
||||
<i class="fa fa-file-o"></i> < 1: <strong>@Model.TimeInProgressEstimater.EstimateTimeInProgress(1).ToRoundedReadableString()</strong>
|
||||
<i class="fa fa-file-o"></i> 1: <strong>@Model.TimeInProgressEstimater.EstimateTimeInProgress(1).ToRoundedReadableString()</strong>
|
||||
<i class="fa fa-file-o"></i> 10: <strong>@Model.TimeInProgressEstimater.EstimateTimeInProgress(10).ToRoundedReadableString()</strong>
|
||||
<i class="fa fa-file-o"></i> 100: <strong>@Model.TimeInProgressEstimater.EstimateTimeInProgress(100).ToRoundedReadableString()</strong>
|
||||
</div>
|
||||
@@ -59,7 +59,16 @@ if (leafInput.IsPending)
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-nowrap">
|
||||
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput.CurrentStatus.ToString())
|
||||
@if (leafInput.OutputErrorMessage != null)
|
||||
{
|
||||
<i class="fa fa-warning text-danger"></i>
|
||||
} else if (leafInput.OutputWarningMessage != null)
|
||||
{
|
||||
<i class="fa fa-warning text-info"></i>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user