Files
Disco/Disco.Web/Areas/Config/Views/JobPreferences/Index.generated.cs
T
Gary Sharp 68256d7abd Feature #37: Stale Jobs
Stale Jobs replaces Long-Running Jobs on the homepage. Last Activity is
added to the job table.
2014-02-13 22:17:49 +11:00

341 lines
12 KiB
C#

#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.JobPreferences
{
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.BI.Extensions;
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("~/Areas/Config/Views/JobPreferences/Index.cshtml")]
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.JobPreferences.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Authorization.Require(Claims.Config.JobPreferences.Show);
var canConfig = Authorization.Has(Claims.Config.JobPreferences.Configure);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Job Preferences");
if (canConfig)
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
}
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px;\"");
WriteLiteral(">\r\n <h2>General Preferences</h2>\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px\"");
WriteLiteral(">Long Running Threshold:\r\n </th>\r\n <td>");
#line 21 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (canConfig)
{
#line default
#line hidden
#line 23 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.DropDownListFor(model => model.LongRunningJobDaysThreshold, Model.LongRunningJobDaysThresholdOptions().Select(o => new SelectListItem() { Value = o.Key.ToString(), Text = o.Value })));
#line default
#line hidden
#line 23 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 24 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 24 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 25 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 25 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n $(\'#LongRunningJobDays" +
"Threshold\'),\r\n null,\r\n \'");
#line 31 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Url.Action(MVC.API.JobPreferences.UpdateLongRunningJobDaysThreshold()));
#line default
#line hidden
WriteLiteral("\',\r\n \'LongRunningJobDaysThreshold\');\r\n " +
" });\r\n </script>\r\n");
#line 35 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
else
{
#line default
#line hidden
#line 38 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Model.LongRunningJobDaysThresholdOptions().First(o => o.Key == Model.LongRunningJobDaysThreshold).Value);
#line default
#line hidden
#line 38 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">\r\n Jobs which have been open for longer than the threshold ar" +
"e considered \'long-running\' and will appear in the <code>Long Running Jobs</code" +
"> list.\r\n </div>\r\n");
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) {
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.ActionLinkSmallButton("Show Long Running Jobs", MVC.Job.LongRunning()));
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px\"");
WriteLiteral(">Stale Threshold:\r\n </th>\r\n <td>");
#line 49 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (canConfig)
{
#line default
#line hidden
#line 51 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.DropDownListFor(model => model.StaleJobMinutesThreshold, Model.StaleJobMinutesThresholdOptions().Select(o => new SelectListItem() { Value = o.Key.ToString(), Text = o.Value })));
#line default
#line hidden
#line 51 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 53 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 53 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n $(\'#StaleJobMinutesThr" +
"eshold\'),\r\n null,\r\n \'");
#line 59 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Url.Action(MVC.API.JobPreferences.UpdateStaleJobMinutesThreshold()));
#line default
#line hidden
WriteLiteral("\',\r\n \'StaleJobMinutesThreshold\');\r\n " +
" });\r\n </script>\r\n");
#line 63 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
else
{
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Model.StaleJobMinutesThresholdOptions().First(o => o.Key == Model.StaleJobMinutesThreshold).Value);
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">\r\n Jobs which have no recoded action for longer than the thre" +
"shold are considered \'stale\' and will appear in the <code>Stale Jobs</code> list" +
".\r\n </div>\r\n");
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) {
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.ActionLinkSmallButton("Show Stale Jobs", MVC.Job.Stale()));
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591