@using ClientDependency.Core.Mvc @using LeafWeb.Core.Entities @using LeafWeb.WebCms.Controllers @model QueueViewModel @{ Html.RequiresJs("~/scripts/Queue.js"); var grid = new WebGrid(Model.Items, rowsPerPage: 45); } @using (Html.BeginUmbracoForm("Search", FormMethod.Post)) {
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.Query.SiteId)
@Html.EditorFor(m => m.Query.SpeciesName)

@Html.EditorFor(m => m.Query.Latitude, new {size = "small", append = "°"})
@Html.EditorFor(m => m.Query.LatitudeRange, new {size = "small", prepend = "±", append = "°"})
@Html.EditorFor(m => m.Query.Longitude, new {size = "small", append = "°"})
@Html.EditorFor(m => m.Query.LongitudeRange, new {size = "small", prepend = "±", append = "°"})
} @if (Model.Items.Any()) {
@grid.Table(columns: grid.Columns( grid.Column("Identifier", "Identifier"), grid.Column("SiteId", "Site Id"), grid.Column("Name", "Submitted By" ), grid.Column("TimeInProgress", "Statistics", item => Statistics(item.Value), canSort: false), grid.Column("CurrentStatus", "Status", item => Status(item.Value), canSort: false), grid.Column("Total Results: " + Model.Items.Count(), format: item => Actions(item.Value), canSort: false)), htmlAttributes: new {@class = "table table-sm table-striped table-bordered table-hover"} ) @grid.BootstrapPager()
} else {

No results.

} @helper Status(LeafInput leafInput) { @Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput) } @helper Actions(LeafInput item) {
} @helper DetailsLink(dynamic item) { @Html.Partial("DisplayTemplates/_DetailsLink", (int)item.Id) } @helper ChartLink(dynamic item) { @Html.Partial("DisplayTemplates/_ChartLink", (int)item.Id) } @helper DownloadInput(dynamic item) { Input } @helper DownloadOutputToUser(dynamic item) { ToUser } @helper Statistics(LeafInput leafInput) { var summary = new List { "Added Time: " + leafInput.Added }; if (leafInput.StartTime.HasValue) { summary.Add("Start Time: " + leafInput.StartTime.Value); } if (leafInput.EndTime.HasValue) { summary.Add("End Time: " + leafInput.EndTime.Value); } var summaryText = string.Join(Environment.NewLine, summary); @leafInput.InputFiles.Count @if(leafInput.InputFiles.Count > 1) {inputs} else { input}
@if (leafInput.TimeInProgress > TimeSpan.Zero) { @leafInput.TimeInProgress.ToRoundedReadableString() } else if (leafInput.IsPending) { @Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.TimeInProgressEstimater)) est. } @if (leafInput.IsRunning) {
@Html.Partial("DisplayTemplates/_TimeRemaining", Tuple.Create(leafInput, Model.TimeInProgressEstimater)) left
}
} @helper DeleteLink(LeafInput item) { @Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.Id, item.Identifier, item.IsDeletable, true)) } @helper CancelLink(LeafInput item) { @Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.Id, item.Identifier, true)) } @helper PriorityForm(LeafInput item, Priority priority) { @Html.Partial("DisplayTemplates/_PriorityForm", Tuple.Create(item.Id, item.PendingPriority, priority)) } @helper DisableItem(bool disabled) { if (disabled){disabled} }