No results.
}
-@helper Btns(dynamic item)
+@helper Status(LeafInput leafInput)
+{
+if (leafInput.IsPending)
+{
+
@@ -61,12 +77,12 @@ else
@PriorityForm(item, Priority.High)
@PriorityForm(item, Priority.Normal)
@PriorityForm(item, Priority.Low)
-}
+ }
@if (item.IsCancellable)
{
@CancelLink(item)
-}
+ }
@DownloadInput(item)
@@ -100,16 +116,45 @@ else
ToUser
}
-@helper TimeInProgress(TimeSpan timeSpan)
+@helper TimeInProgress(LeafInput leafInput)
{
-if (timeSpan > TimeSpan.Zero)
+var summary = new List
{ "Added Time: " + leafInput.Added };
+if (leafInput.StartTime.HasValue)
{
- @timeSpan.ToRoundedReadableString()
+ summary.Add("Start Time: " + leafInput.StartTime.Value);
}
-}
-@helper DeleteLink(dynamic item)
+if (leafInput.EndTime.HasValue)
{
- @Html.Partial("DisplayTemplates/_DeleteForm", (Tuple)Tuple.Create(item.Id, item.Identifier, item.IsDeletable))
+ summary.Add("End Time: " + leafInput.EndTime.Value);
+}
+var summaryText = string.Join(Environment.NewLine, summary);
+
+ @if (leafInput.TimeInProgress > TimeSpan.Zero)
+ {
+
+ @leafInput.TimeInProgress.ToRoundedReadableString()
+
+ }
+ else if (leafInput.IsPending)
+ {
+
+ @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.CompletedLeafInput)) est.
+
+ }
+ @if (leafInput.IsRunning)
+ {
+
+
+ @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.CompletedLeafInput)) left
+
+ }
+
+ @leafInput.InputFiles.Count input files
+
+}
+@helper DeleteLink(LeafInput item)
+{
+ @Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.Id, item.Identifier, item.IsDeletable))
}
@helper CancelLink(dynamic item)
diff --git a/WebCms/Views/Shared/DisplayTemplates/_ChartButton.cshtml b/WebCms/Views/Shared/DisplayTemplates/_ChartButton.cshtml
index 313d88b..633823e 100644
--- a/WebCms/Views/Shared/DisplayTemplates/_ChartButton.cshtml
+++ b/WebCms/Views/Shared/DisplayTemplates/_ChartButton.cshtml
@@ -8,7 +8,7 @@
title="No chart has been generated"}} />
+ @{if (disabled) {title="No chart has been generated"}} >
Chart
\ No newline at end of file
diff --git a/WebCms/Views/Shared/DisplayTemplates/_TimeRemaining.cshtml b/WebCms/Views/Shared/DisplayTemplates/_TimeRemaining.cshtml
new file mode 100644
index 0000000..97814de
--- /dev/null
+++ b/WebCms/Views/Shared/DisplayTemplates/_TimeRemaining.cshtml
@@ -0,0 +1,14 @@
+@using LeafWeb.Core.Entities
+@model Tuple>
+@{
+ 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)
+ {
+ @remaining.ToRoundedReadableString()
+ }
+}
\ No newline at end of file
diff --git a/WebCms/Views/Shared/EditorTemplates/Decimal.cshtml b/WebCms/Views/Shared/EditorTemplates/Decimal.cshtml
index e9d5600..4494343 100644
--- a/WebCms/Views/Shared/EditorTemplates/Decimal.cshtml
+++ b/WebCms/Views/Shared/EditorTemplates/Decimal.cshtml
@@ -4,7 +4,7 @@