Remaining time estimate
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<a href="@url?leafInputId=@Model"
|
||||
class="btn btn-default @{if (xs) {<text>btn-xs</text>}} @{if (disabled) {<text>disabled</text>}}"
|
||||
role="button"
|
||||
@{if (disabled) {<text>title="No chart has been generated"</text>}} />
|
||||
@{if (disabled) {<text>title="No chart has been generated"</text>}} >
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
@@ -0,0 +1,14 @@
|
||||
@using LeafWeb.Core.Entities
|
||||
@model Tuple<LeafInput,IQueryable<LeafInput>>
|
||||
@{
|
||||
var leafInput = Model.Item1;
|
||||
var observations = Model.Item2.Take(20);
|
||||
|
||||
var estimater = new TimeInProgressEstimater(observations);
|
||||
var totalTimeEstimate = estimater.EstimateTimeInProgress(leafInput);
|
||||
var remaining = totalTimeEstimate - leafInput.TimeInProgress;
|
||||
if (remaining > TimeSpan.Zero)
|
||||
{
|
||||
<text>@remaining.ToRoundedReadableString()</text>
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m, new { @class = "control-label" })
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">€</span>@Html.TextBox(
|
||||
<span class="input-group-addon">€@Html.TextBox(
|
||||
"",
|
||||
Model == null ? "" : String.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:F2}", ViewData.ModelMetadata.Model),
|
||||
ViewBag.ClearTextField == true ? new { @class = "form-control clear-text-field input-block-level" } : new { @class = "form-control input-block-level" })</span>
|
||||
|
||||
Reference in New Issue
Block a user