Add run time to queue

This commit is contained in:
2017-01-27 14:07:36 -05:00
parent 4338b4fee5
commit 0711ae0ac8
24 changed files with 198 additions and 209 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
<a href="@page.Url">
@page.Name
@if (library.IsProtected(page.id, page.path)) {
<i class="fa fa-minus-circle fa-fw text-danger" aria-hidden="true"></i>
<i class="fa fa-lock fa-fw text-danger" aria-hidden="true"></i>
}
</a>
+14 -13
View File
@@ -9,13 +9,14 @@
<dd>@Model.ServerDescription</dd>
</dl>
@grid.Table(columns:
grid.Columns(
grid.Column("LeafInputIdentifier", "Identifier"),
grid.Column("LeafInputSiteId", "Site Id"),
grid.Column("LeafInputName", "Submitted By"),
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
grid.Column("Identifier", "Identifier"),
grid.Column("SiteId", "Site Id"),
grid.Column("Name", "Submitted By"),
//grid.Column("FileCount", "Input files"),
grid.Column("TotalInProgressTime", "In-Progress Time", item => ((TimeSpan)item.TotalInProgressTime).ToRoundedReadableString()),
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus.ToString())),
grid.Column("Total Results: " + Model.Items.Count(), format: item => Btns(item))),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
)
@@ -54,47 +55,47 @@
@helper DetailsLink(dynamic item)
{
@Html.Partial("DisplayTemplates/_DetailsLink", (int)item.LeafInputId)
@Html.Partial("DisplayTemplates/_DetailsLink", (int)item.Id)
}
@helper ChartLink(dynamic item)
{
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.Id)
}
@helper SetPriorityHigh(dynamic item, string label)
{
<a href="@Url.Action("SetPriorityHigh", "Queue", new {id = item.LeafInputId})">
<a href="@Url.Action("SetPriorityHigh", "Queue", new {id = item.Id})">
<span class="glyphicon glyphicon-arrow-up"></span> @label
</a>
}
@helper SetPriorityLow(dynamic item, string label)
{
<a href="@Url.Action("SetPriorityLow", "Queue", new {id = item.LeafInputId})">
<a href="@Url.Action("SetPriorityLow", "Queue", new {id = item.Id})">
<span class="glyphicon glyphicon-arrow-down"></span> @label
</a>
}
@helper DownloadInput(dynamic item)
{
<a href="@Url.Action("DownloadInput", "Queue", new {id = item.LeafInputId})">
<a href="@Url.Action("DownloadInput", "Queue", new {id = item.Id})">
<span class="glyphicon glyphicon-download"></span> Input
</a>
}
@helper DownloadOutputToUser(dynamic item)
{
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.LeafInputId})">
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.Id})">
<span class="glyphicon glyphicon-download"></span> ToUser
</a>
}
@helper DeleteLink(dynamic item)
{
@Html.Partial("DisplayTemplates/_DeleteForm", (Tuple<int, string, bool>)Tuple.Create(item.LeafInputId, item.LeafInputIdentifier, item.IsDeletable))
@Html.Partial("DisplayTemplates/_DeleteForm", (Tuple<int, string, bool>)Tuple.Create(item.Id, item.Identifier, item.IsDeletable))
}
@helper CancelLink(dynamic item)
{
@Html.Partial("DisplayTemplates/_CancelForm", (Tuple<int, string>)Tuple.Create(item.LeafInputId, item.LeafInputIdentifier))
@Html.Partial("DisplayTemplates/_CancelForm", (Tuple<int, string>)Tuple.Create(item.Id, item.Identifier))
}
@helper DisableItem(bool disabled)
+6 -6
View File
@@ -1,4 +1,4 @@
@model IEnumerable<QueueItemViewModel>
@model IOrderedQueryable<LeafWeb.Core.Entities.LeafInput>
@{
var grid = new WebGrid(Model, rowsPerPage: 45);
@@ -6,10 +6,10 @@
@grid.Table(columns:
grid.Columns(
grid.Column("LeafInputIdentifier", "Identifier"),
grid.Column("LeafInputSiteId", "Site Id"),
//grid.Column("LeafInputName", "Submitted By"),
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
grid.Column("Identifier", "Identifier"),
grid.Column("SiteId", "Site Id"),
//grid.Column("Name", "Submitted By"),
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus.ToString())),
grid.Column("", "", item => ChartLink(item))
),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
@@ -18,5 +18,5 @@
@helper ChartLink(dynamic item)
{
@Html.Partial("DisplayTemplates/_ChartButton", (int)item.LeafInputId, new ViewDataDictionary { { "Disabled", !item.HasLeafChart }, {"xs", true} })
@Html.Partial("DisplayTemplates/_ChartButton", (int)item.Id, new ViewDataDictionary { { "Disabled", !item.HasLeafChart }, {"xs", true} })
}
@@ -1,4 +1,4 @@
@model IEnumerable<LeafWeb.WebCms.Models.LeafInputStatusViewModel>
@model IEnumerable<LeafInputStatusViewModel>
@{
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
var grid = new WebGrid(Model, rowsPerPage: 45)
@@ -5,7 +5,7 @@
var identifier = Model.Item2;
}
@using (Html.BeginUmbracoForm<QueueController>("Cancel", null,
new { @class = "confirm", confirm_msg = "Cancelling cannot be undone! Confirm cancelling '" + identifier + "'." }))
new { @class = "confirm clearfix", confirm_msg = "Cancelling cannot be undone! Confirm cancelling '" + identifier + "'." }))
{
<input type="hidden" name="id" value="@leafInputId"/>
<button type="submit" class="btn btn-link">
@@ -6,7 +6,7 @@
var isDeletable = Model.Item3;
}
@using (Html.BeginUmbracoForm<QueueController>("Delete", null,
new { @class = "confirm", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
new { @class = "confirm clearfix", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
{
<input type="hidden" name="id" value="@leafInputId"/>
<button type="submit" class="btn btn-link" @{if (!isDeletable) { <text> disabled="disabled" </text> }}>
+3 -2
View File
@@ -23,8 +23,9 @@
<add namespace="umbraco" />
<add namespace="Examine" />
<add namespace="WebGridBootstrapPager" />
<add namespace="LeafWeb.WebCms.Models" />
<add namespace="Umbraco.Web.PublishedContentModels" />
<add namespace="LeafWeb.Core.Utility" />
<add namespace="LeafWeb.WebCms.Models" />
<add namespace="Umbraco.Web.PublishedContentModels" />
</namespaces>
</pages>
</system.web.webPages.razor>