456 lines
14 KiB
C#
456 lines
14 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Views.Job
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Show.cshtml")]
|
|
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
|
{
|
|
public Show()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Views\Job\Show.cshtml"
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
|
|
|
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
|
|
|
Authorization.Require(Claims.Job.Show);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"Job_Show\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Status\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 11 "..\..\Views\Job\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 11 "..\..\Views\Job\Show.cshtml"
|
|
var jobStatusInfo = Model.Job.Status();
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 401), Tuple.Create("\"", 454)
|
|
, Tuple.Create(Tuple.Create("", 409), Tuple.Create("fa", 409), true)
|
|
, Tuple.Create(Tuple.Create(" ", 411), Tuple.Create("fa-square", 412), true)
|
|
, Tuple.Create(Tuple.Create(" ", 421), Tuple.Create("jobStatus", 422), true)
|
|
|
|
#line 12 "..\..\Views\Job\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create(" ", 431), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
|
|
|
|
#line default
|
|
#line hidden
|
|
, 432), false)
|
|
);
|
|
|
|
WriteLiteral("></i> ");
|
|
|
|
|
|
#line 12 "..\..\Views\Job\Show.cshtml"
|
|
Write(jobStatusInfo.Item2);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 12 "..\..\Views\Job\Show.cshtml"
|
|
if (Model.LongRunning.HasValue)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">(Long Running: ");
|
|
|
|
|
|
#line 13 "..\..\Views\Job\Show.cshtml"
|
|
Write(Model.LongRunning.Value.Humanize(false));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(")</span>");
|
|
|
|
|
|
#line 13 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_QueueStatus\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 16 "..\..\Views\Job\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 16 "..\..\Views\Job\Show.cshtml"
|
|
foreach (var jq in Model.Job.JobQueues.Where(q => !q.RemovedDate.HasValue).Select(q => Disco.Services.Jobs.JobQueues.JobQueueService.GetQueue(q.JobQueueId)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 953), Tuple.Create("\"", 1026)
|
|
, Tuple.Create(Tuple.Create("", 961), Tuple.Create("fa", 961), true)
|
|
, Tuple.Create(Tuple.Create(" ", 963), Tuple.Create("fa-", 964), true)
|
|
|
|
#line 18 "..\..\Views\Job\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 967), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.Icon
|
|
|
|
#line default
|
|
#line hidden
|
|
, 967), false)
|
|
, Tuple.Create(Tuple.Create(" ", 986), Tuple.Create("fa-fw", 987), true)
|
|
, Tuple.Create(Tuple.Create(" ", 992), Tuple.Create("fa-lg", 993), true)
|
|
, Tuple.Create(Tuple.Create(" ", 998), Tuple.Create("d-", 999), true)
|
|
|
|
#line 18 "..\..\Views\Job\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 1001), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.IconColour
|
|
|
|
#line default
|
|
#line hidden
|
|
, 1001), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 1027), Tuple.Create("\"", 1054)
|
|
|
|
#line 18 "..\..\Views\Job\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 1035), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.Name
|
|
|
|
#line default
|
|
#line hidden
|
|
, 1035), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 19 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n $(\'#Job_Show_Status\').appendTo(\'#layout_P" +
|
|
"ageHeading\');\r\n $(\'#Job_Show_QueueStatus\').appendTo(\'#layout_PageHead" +
|
|
"ing\');\r\n });\r\n </script>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 27 "..\..\Views\Job\Show.cshtml"
|
|
Write(Html.Partial(MVC.Job.Views.JobParts._Subject, Model));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var $tabs = $(\'#jobDetailTabs\');\r\n " +
|
|
" if ($tabs.children().length > 1) {\r\n $tabs.tabs({\r\n " +
|
|
" activate: function (event, ui) {\r\n window.setT" +
|
|
"imeout(function () {\r\n var $window = $(window);\r\n " +
|
|
" var tabHeight = $tabs.height();\r\n " +
|
|
" var tabOffset = $tabs.offset();\r\n var windowScro" +
|
|
"llTop = $window.scrollTop();\r\n var windowHeight = $wi" +
|
|
"ndow.height();\r\n\r\n var tabTopNotShown = windowScrollT" +
|
|
"op - tabOffset.top;\r\n if (tabTopNotShown > 0) {\r\n " +
|
|
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125)" +
|
|
";\r\n } else {\r\n var tab" +
|
|
"BottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)" +
|
|
") * -1;\r\n if (tabBottomNotShown > 0) {\r\n " +
|
|
" if (tabHeight > windowHeight)\r\n " +
|
|
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125);\r\n " +
|
|
" else\r\n $(\'ht" +
|
|
"ml\').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" }, 1);\r\n }\r\n });\r\n } else {\r\n " +
|
|
" $tabs.hide();\r\n }\r\n });\r\n </script>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"jobDetailTabs\"");
|
|
|
|
WriteLiteral(">\r\n <ul");
|
|
|
|
WriteLiteral(" id=\"jobDetailTabItems\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 63 "..\..\Views\Job\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 63 "..\..\Views\Job\Show.cshtml"
|
|
if (Authorization.HasAll(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li><a");
|
|
|
|
WriteLiteral(" id=\"jobDetailTab-ResourcesLink\"");
|
|
|
|
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
|
|
|
WriteLiteral(">Comments and Attachments [");
|
|
|
|
|
|
#line 65 "..\..\Views\Job\Show.cshtml"
|
|
Write(Model.Job.JobAttachments.Count);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]</a></li>\r\n");
|
|
|
|
|
|
#line 66 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
else if (Authorization.Has(Claims.Job.ShowLogs))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li><a");
|
|
|
|
WriteLiteral(" id=\"jobDetailTab-ResourcesLink\"");
|
|
|
|
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
|
|
|
WriteLiteral(">Comments</a></li>\r\n");
|
|
|
|
|
|
#line 70 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
else if (Authorization.Has(Claims.Job.ShowAttachments))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li><a");
|
|
|
|
WriteLiteral(" id=\"jobDetailTab-ResourcesLink\"");
|
|
|
|
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
|
|
|
WriteLiteral(">Attachments [");
|
|
|
|
|
|
#line 73 "..\..\Views\Job\Show.cshtml"
|
|
Write(Model.Job.JobAttachments.Count);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]</a></li>\r\n");
|
|
|
|
|
|
#line 74 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 75 "..\..\Views\Job\Show.cshtml"
|
|
if (Authorization.Has(Claims.Job.ShowJobsQueues))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li><a");
|
|
|
|
WriteLiteral(" id=\"jobDetailTab-QueuesLink\"");
|
|
|
|
WriteLiteral(" href=\"#jobDetailTab-Queues\"");
|
|
|
|
WriteLiteral(">Queues [");
|
|
|
|
|
|
#line 77 "..\..\Views\Job\Show.cshtml"
|
|
Write(Model.Job.JobQueues.Count(jq => !jq.RemovedDate.HasValue));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("]</a></li>\r\n");
|
|
|
|
|
|
#line 78 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 80 "..\..\Views\Job\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 80 "..\..\Views\Job\Show.cshtml"
|
|
if (Authorization.HasAny(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"jobDetailTab-Resources\"");
|
|
|
|
WriteLiteral(" class=\"jobPart\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 83 "..\..\Views\Job\Show.cshtml"
|
|
Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 85 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 86 "..\..\Views\Job\Show.cshtml"
|
|
if (Authorization.Has(Claims.Job.ShowJobsQueues))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"jobDetailTab-Queues\"");
|
|
|
|
WriteLiteral(" class=\"jobPart\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 89 "..\..\Views\Job\Show.cshtml"
|
|
Write(Html.Partial(MVC.Job.Views.JobParts.Queues, Model));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 91 "..\..\Views\Job\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 92 "..\..\Views\Job\Show.cshtml"
|
|
Write(Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|