3f63281dc4
Also UI style, theme and element changes
1840 lines
68 KiB
C#
1840 lines
68 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.JobQueue
|
|
{
|
|
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;
|
|
|
|
#line 2 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
using Disco.Services.Jobs.JobQueues;
|
|
|
|
#line default
|
|
#line hidden
|
|
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/JobQueue/Show.cshtml")]
|
|
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.JobQueue.ShowModel>
|
|
{
|
|
public Show()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 3 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
Authorization.Require(Claims.Config.JobQueue.Show);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Job Queues", MVC.Config.JobQueue.Index(null), Model.Token.JobQueue.ToString());
|
|
|
|
var canConfig = Authorization.Has(Claims.Config.JobQueue.Configure);
|
|
var canDelete = (Authorization.Has(Claims.Config.JobQueue.Delete) && Model.CanDelete);
|
|
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Show\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 550px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px\"");
|
|
|
|
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 19 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.DisplayFor(model => model.Token.JobQueue.Id));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 25 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.Token.JobQueue.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 27 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 27 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 28 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 28 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
|
"ctions.PropertyChangeHelper(\r\n $(\'#Token_JobQueue_Nam" +
|
|
"e\'),\r\n \'Invalid Name\',\r\n \'" +
|
|
"");
|
|
|
|
|
|
#line 34 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.UpdateName(Model.Token.JobQueue.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'QueueName\'\r\n );\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 39 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 42 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 42 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Description:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 49 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 50 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.Token.JobQueue.Description));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 50 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 51 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 51 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 52 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 52 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
|
"ctions.PropertyChangeHelper(\r\n $(\'#Token_JobQueue_Des" +
|
|
"cription\'),\r\n \'Invalid Description\',\r\n " +
|
|
" \'");
|
|
|
|
|
|
#line 58 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.UpdateDescription(Model.Token.JobQueue.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'Description\'\r\n );\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 63 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <pre>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 67 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </pre>\r\n");
|
|
|
|
|
|
#line 69 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Statistics:\r\n " +
|
|
" </th>\r\n <td>\r\n <div><strong>");
|
|
|
|
|
|
#line 76 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.OpenJobCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" job");
|
|
|
|
|
|
#line 76 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.OpenJobCount != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" open</strong></div>\r\n <div>");
|
|
|
|
|
|
#line 77 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.TotalJobCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" total job");
|
|
|
|
|
|
#line 77 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.TotalJobCount != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Icon:\r\n " +
|
|
" </th>\r\n <td>\r\n <i");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Icon\"");
|
|
|
|
WriteLiteral(" data-icon=\"");
|
|
|
|
|
|
#line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Icon);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-colour=\"");
|
|
|
|
|
|
#line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.IconColour);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 3249), Tuple.Create("\"", 3334)
|
|
, Tuple.Create(Tuple.Create("", 3257), Tuple.Create("fa", 3257), true)
|
|
, Tuple.Create(Tuple.Create(" ", 3259), Tuple.Create("fa-", 3260), true)
|
|
|
|
#line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3263), Tuple.Create<System.Object, System.Int32>(Model.Token.JobQueue.Icon
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3263), false)
|
|
, Tuple.Create(Tuple.Create(" ", 3291), Tuple.Create("fa-4x", 3292), true)
|
|
, Tuple.Create(Tuple.Create(" ", 3297), Tuple.Create("d-", 3298), true)
|
|
|
|
#line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3300), Tuple.Create<System.Object, System.Int32>(Model.Token.JobQueue.IconColour
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3300), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 85 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 85 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n <a");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Icon_Update\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Update</a>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Icon_Update_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Job Queue Icon\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"icons\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var icon in JobQueueService.Icons)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" data-icon=\"");
|
|
|
|
|
|
#line 94 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(icon.Key);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 3909), Tuple.Create("\"", 3934)
|
|
, Tuple.Create(Tuple.Create("", 3917), Tuple.Create("fa", 3917), true)
|
|
, Tuple.Create(Tuple.Create(" ", 3919), Tuple.Create("fa-", 3920), true)
|
|
|
|
#line 94 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3923), Tuple.Create<System.Object, System.Int32>(icon.Key
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3923), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 3935), Tuple.Create("\"", 3954)
|
|
|
|
#line 94 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3943), Tuple.Create<System.Object, System.Int32>(icon.Value
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3943), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 95 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"colours\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 98 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 98 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var colour in JobQueueService.IconColours)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" data-colour=\"");
|
|
|
|
|
|
#line 100 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(colour.Key);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 4295), Tuple.Create("\"", 4331)
|
|
, Tuple.Create(Tuple.Create("", 4303), Tuple.Create("fa", 4303), true)
|
|
, Tuple.Create(Tuple.Create(" ", 4305), Tuple.Create("fa-square", 4306), true)
|
|
, Tuple.Create(Tuple.Create(" ", 4315), Tuple.Create("d-", 4316), true)
|
|
|
|
#line 100 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4318), Tuple.Create<System.Object, System.Int32>(colour.Key
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4318), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 4332), Tuple.Create("\"", 4353)
|
|
|
|
#line 100 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4340), Tuple.Create<System.Object, System.Int32>(colour.Value
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4340), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 101 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </div>\r\n " +
|
|
" </div>\r\n <script>\r\n " +
|
|
" (function () {\r\n var dialog, icon, colou" +
|
|
"rs, icons;\r\n\r\n function showDialog() {\r\n " +
|
|
" if (!dialog) {\r\n " +
|
|
" dialog = $(\'#Config_JobQueues_Icon_Update_Dialog\').dialog({\r\n " +
|
|
" resizable: false,\r\n " +
|
|
" modal: true,\r\n autoOpen: f" +
|
|
"alse,\r\n width: 750,\r\n " +
|
|
" height: 600,\r\n " +
|
|
" buttons: {\r\n \"Save\": save,\r" +
|
|
"\n Cancel: cancel\r\n " +
|
|
" }\r\n });\r\n\r\n " +
|
|
" colours = dialog.find(\'.colours\');\r\n " +
|
|
" icons = dialog.find(\'.icons\');\r\n\r\n " +
|
|
" colours.on(\'click\', \'i\', selectColour);\r\n " +
|
|
" icons.on(\'click\', \'i\', selectIcon);\r\n " +
|
|
" }\r\n\r\n colours.find(\'i[" +
|
|
"data-colour=\"\' + icon.attr(\'data-colour\') + \'\"]\').each(selectColour);\r\n " +
|
|
" icons.find(\'i[data-icon=\"\' + icon.attr(\'data-icon\') +" +
|
|
" \'\"]\').each(selectIcon);\r\n\r\n dialog.dialog(\'o" +
|
|
"pen\');\r\n\r\n return false;\r\n " +
|
|
" }\r\n\r\n function selectColour() {\r\n " +
|
|
" var $this = $(this),\r\n " +
|
|
" colourCode = $this.attr(\'data-colour\'),\r\n " +
|
|
" previousColourCode = icons.attr(\'data-colour\');\r\n\r\n\r\n " +
|
|
" colours.find(\'i\').removeClass(\'selected fa-check-square" +
|
|
"\').addClass(\'fa-square\');\r\n $this.removeClass" +
|
|
"(\'fa-square\').addClass(\'fa-check-square selected\');\r\n\r\n " +
|
|
" if (previousColourCode)\r\n icon" +
|
|
"s.removeClass(\'d-\' + previousColourCode);\r\n i" +
|
|
"cons.attr(\'data-colour\', colourCode)\r\n icons." +
|
|
"addClass(\'d-\' + colourCode);\r\n }\r\n " +
|
|
" function selectIcon() {\r\n va" +
|
|
"r $this = $(this),\r\n iconCode = $this.att" +
|
|
"r(\'data-icon\');\r\n\r\n icons.find(\'i\').removeCla" +
|
|
"ss(\'selected\');\r\n $this.addClass(\'selected\');" +
|
|
"\r\n }\r\n\r\n function " +
|
|
"save() {\r\n var url = \'");
|
|
|
|
|
|
#line 161 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.UpdateIconAndColour(id: Model.Token.JobQueue.Id, redirect: true)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
data = {
|
|
Icon: icons.find('i.selected').attr('data-icon'),
|
|
IconColour: colours.find('i.selected').attr('data-colour')
|
|
};
|
|
window.location.href = url + '&' + $.param(data);
|
|
|
|
dialog.dialog(""disable"");
|
|
dialog.dialog(""option"", ""buttons"", null);
|
|
}
|
|
|
|
function cancel() {
|
|
$(this).dialog(""close"");
|
|
}
|
|
|
|
$(function () {
|
|
icon = $('#Config_JobQueues_Icon');
|
|
$('#Config_JobQueues_Icon_Update').click(showDialog);
|
|
});
|
|
}());
|
|
</script>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 183 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Priority:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 189 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
var priorityValue = Model.Token.JobQueue.Priority.ToString();
|
|
var priorityItems = Enum.GetNames(typeof(JobQueuePriority)).Select(i => new SelectListItem() { Text = i, Value = i, Selected = (i == priorityValue) }).ToList();
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 9107), Tuple.Create("\"", 9155)
|
|
, Tuple.Create(Tuple.Create("", 9115), Tuple.Create("fa", 9115), true)
|
|
, Tuple.Create(Tuple.Create(" ", 9117), Tuple.Create("d-priority-", 9118), true)
|
|
|
|
#line 193 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 9129), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 9129), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 9156), Tuple.Create("\"", 9189)
|
|
|
|
#line 193 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 9164), Tuple.Create<System.Object, System.Int32>(priorityValue
|
|
|
|
#line default
|
|
#line hidden
|
|
, 9164), false)
|
|
, Tuple.Create(Tuple.Create(" ", 9180), Tuple.Create("Priority", 9181), true)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 194 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 194 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Token.JobQueue.Priority, priorityItems));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 194 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 195 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 195 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 196 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 196 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var element = $('#Token_JobQueue_Priority');
|
|
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
element,
|
|
'Invalid Priority',
|
|
'");
|
|
|
|
|
|
#line 204 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.UpdatePriority(Model.Token.JobQueue.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'Priority'
|
|
);
|
|
|
|
element.change(function () {
|
|
var icon = element.closest('td').find('i').first();
|
|
icon[0].className = '';
|
|
icon.addClass('fa d-priority-' + element.val().toLowerCase()).attr('title', element.val() + ' Priority');
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 215 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 218 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Priority.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 218 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Default SLA:\r\n " +
|
|
" </th>\r\n <td>");
|
|
|
|
|
|
#line 225 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
var slaOptions = JobQueueService.SlaOptions.Select(o => new SelectListItem() { Text = o.Value, Value = o.Key.ToString() }).ToList();
|
|
|
|
if (this.Model.Token.JobQueue.DefaultSLAExpiry.HasValue)
|
|
{
|
|
var slaValue = this.Model.Token.JobQueue.DefaultSLAExpiry.Value;
|
|
if (JobQueueService.SlaOptions.Where(o => o.Key == slaValue).Count() == 0)
|
|
{
|
|
string slaValueText;
|
|
if (slaValue % (60 * 24 * 7 * 4) == 0)
|
|
{ slaValueText = string.Format("{0} months", slaValue / (60 * 24 * 7 * 4)); }
|
|
else if (slaValue % (60 * 24 * 7) == 0)
|
|
{ slaValueText = string.Format("{0} weeks", slaValue / (60 * 24 * 7)); }
|
|
else if (slaValue % (60 * 24) == 0)
|
|
{ slaValueText = string.Format("{0} days", slaValue / (60 * 24)); }
|
|
else if (slaValue % (60) == 0)
|
|
{ slaValueText = string.Format("{0} hours", slaValue / 60); }
|
|
else
|
|
{ slaValueText = string.Format("{0} minutes", slaValue); }
|
|
|
|
slaOptions.Insert(0, new SelectListItem() { Text = string.Format("{0} <Custom>", slaValueText), Value = slaValue.ToString() });
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 249 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Token.JobQueue.DefaultSLAExpiry, slaOptions));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 249 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 250 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 250 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 251 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 251 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#Token_JobQueue_DefaultSLAExpiry'),
|
|
'Invalid Default SLA',
|
|
'");
|
|
|
|
|
|
#line 257 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.UpdateDefaultSLAExpiry(Model.Token.JobQueue.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'DefaultSLAExpiry\'\r\n );\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 262 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (this.Model.Token.JobQueue.DefaultSLAExpiry.HasValue)
|
|
{
|
|
var slaValue = this.Model.Token.JobQueue.DefaultSLAExpiry.Value;
|
|
var slaOption = JobQueueService.SlaOptions.Where(o => o.Key == slaValue).ToArray();
|
|
if (slaOption.Length > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 271 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(slaOption[0].Value);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 271 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 276 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 281 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Member Groups/Use" +
|
|
"rs:</th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 288 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 288 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (Model.Token.SubjectIds.Count == 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">None Associated</span>\r\n");
|
|
|
|
|
|
#line 291 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects\"");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 295 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 295 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var sg in Model.Subjects)
|
|
{
|
|
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 14163), Tuple.Create("\"", 14203)
|
|
|
|
#line 298 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 14171), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 14171), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 298 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (sg.IsGroup)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 300 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 300 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 300 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 14643), Tuple.Create("\"", 14685)
|
|
|
|
#line 304 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 14650), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 14650), false)
|
|
);
|
|
|
|
WriteLiteral("><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 304 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</a>\r\n");
|
|
|
|
|
|
#line 305 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 306 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 308 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 309 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n <a");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Update</a>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Job Queue Member Groups/Users\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_ListContainer\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_None\"");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">None Associated</span>\r\n <ul");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_List\"");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 317 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 317 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var sg in Model.Subjects)
|
|
{
|
|
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 15819), Tuple.Create("\"", 15859)
|
|
|
|
#line 320 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 15827), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 15827), false)
|
|
);
|
|
|
|
WriteLiteral(" data-subjectid=\"");
|
|
|
|
|
|
#line 320 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(sg.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 320 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (sg.IsGroup)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 322 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 322 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 322 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 326 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 326 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 326 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<i");
|
|
|
|
WriteLiteral(" class=\"fa fa-times-circle remove\"");
|
|
|
|
WriteLiteral("></i></li>\r\n");
|
|
|
|
|
|
#line 328 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n </div>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_AddContainer\"");
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" type=\"text\"");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_TextAdd\"");
|
|
|
|
WriteLiteral(" />\r\n <a");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_Add\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Add</a>\r\n </div>\r\n <form");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_Form\"");
|
|
|
|
WriteAttribute("action", Tuple.Create(" action=\"", 17250), Tuple.Create("\"", 17342)
|
|
|
|
#line 335 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 17259), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.JobQueue.UpdateSubjects(Model.Token.JobQueue.Id, null, true))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 17259), false)
|
|
);
|
|
|
|
WriteLiteral(" method=\"post\"");
|
|
|
|
WriteLiteral("></form>\r\n </div>\r\n <script>\r\n " +
|
|
" (function () {\r\n var dialo" +
|
|
"g, textAdd, list, noSubjects, form;\r\n\r\n function " +
|
|
"showDialog() {\r\n if (!dialog) {\r\n " +
|
|
" dialog = $(\'#Config_JobQueues_Subjects_Update_Dialog" +
|
|
"\').dialog({\r\n resizable: false,\r\n " +
|
|
" modal: true,\r\n " +
|
|
" autoOpen: false,\r\n " +
|
|
"width: 350,\r\n height: 420,\r\n " +
|
|
" buttons: {\r\n " +
|
|
" \"Save Changes\": saveChanges,\r\n " +
|
|
" Cancel: cancel\r\n }\r\n " +
|
|
" });\r\n\r\n " +
|
|
" dialog.on(\'click\', \'.remove\', remove);\r\n\r\n " +
|
|
" list = $(\'#Config_JobQueues_Subjects_Update_Dialog_List\');\r\n " +
|
|
" noSubjects = $(\'#Config_JobQueues_Subjects_Update_Dialo" +
|
|
"g_None\');\r\n\r\n textAdd = $(\'#Config_JobQue" +
|
|
"ues_Subjects_Update_Dialog_TextAdd\');\r\n\r\n " +
|
|
" textAdd.watermark(\'Search Subjects\')\r\n " +
|
|
" .autocomplete({\r\n source: \'");
|
|
|
|
|
|
#line 364 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.SearchSubjects()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n minLength: 2,\r\n " +
|
|
" focus: function (e, ui) {\r\n " +
|
|
" textAdd.val(ui.item.Id);\r\n " +
|
|
" return false;\r\n " +
|
|
" },\r\n select: functi" +
|
|
"on (e, ui) {\r\n textAdd.val(ui" +
|
|
".item.Id).blur();\r\n return fa" +
|
|
"lse;\r\n }\r\n " +
|
|
" }).data(\'ui-autocomplete\')._renderItem = function (ul, item" +
|
|
") {\r\n return $(\"<li></li>\")\r\n " +
|
|
" .data(\"item.autocomplete\", item)" +
|
|
"\r\n .append(\"<a><strong>\" + it" +
|
|
"em.Name + \"</strong><br>\" + item.Id + \" (\" + item.Type + \")</a>\")\r\n " +
|
|
" .appendTo(ul);\r\n " +
|
|
" };\r\n\r\n $(\'#Config_JobQ" +
|
|
"ueues_Subjects_Update_Dialog_Add\').click(add);\r\n " +
|
|
" }\r\n\r\n dialog.dialog(\'open\');\r\n\r\n " +
|
|
" updateNoSubjects();\r\n " +
|
|
" return false;\r\n }\r\n\r\n " +
|
|
" function cancel() {\r\n $(this).dialog(" +
|
|
"\"close\");\r\n\r\n list.find(\'li\').each(function (" +
|
|
") {\r\n $this = $(this);\r\n " +
|
|
" if ($this.is(\'[data-subjectstatus=\"new\"]\')) {\r\n " +
|
|
" $this.remove();\r\n " +
|
|
" } else {\r\n if ($this.is(\'[" +
|
|
"data-subjectstatus=\"removed\"]\')) {\r\n " +
|
|
" $this.show();\r\n }\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" }\r\n\r\n function remove() {\r\n" +
|
|
" $this = $(this).closest(\'li\');\r\n\r\n " +
|
|
" if ($this.is(\'[data-subjectstatus=\"new\"]\')) {\r\n " +
|
|
" $this.remove();\r\n " +
|
|
" } else {\r\n $this.attr(\'data-subject" +
|
|
"status\', \'removed\').hide();\r\n }\r\n\r\n " +
|
|
" updateNoSubjects();\r\n }" +
|
|
"\r\n\r\n function add() {\r\n\r\n " +
|
|
" var id = textAdd.val();\r\n\r\n $.aja" +
|
|
"x({\r\n url: \'");
|
|
|
|
|
|
#line 422 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.JobQueue.Subject()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n method: \'get\',\r\n " +
|
|
" data: { Id: id }\r\n }).done" +
|
|
"(function (response) {\r\n if (response) {\r" +
|
|
"\n if (list.find(\'li[data-subjectid=\"\'" +
|
|
" + response.Id + \'\"]\').length == 0) {\r\n\r\n " +
|
|
" var liIcon = $(\'<i>\').addClass(\'fa fa-lg\');\r\n " +
|
|
" if (response.Type === \'user\')\r\n " +
|
|
" liIcon.addClass(\'fa-user\');\r\n " +
|
|
" else\r\n " +
|
|
"liIcon.addClass(\'fa-users\');\r\n\r\n " +
|
|
"var li = $(\'<li>\')\r\n .append(" +
|
|
"liIcon)\r\n .append($(\'<span>\')" +
|
|
".text(response.Id == response.Name ? response.Id : response.Name + \' [\' + respon" +
|
|
"se.Id + \']\'))\r\n .append($(\'<i" +
|
|
">\').addClass(\'fa fa-times-circle remove\'))\r\n " +
|
|
" .addClass(response.Type)\r\n " +
|
|
" .attr(\'data-subjectid\', response.Id)\r\n " +
|
|
" .attr(\'data-subjectstatus\', \'new\');\r\n\r\n " +
|
|
" list.append(li);\r\n\r\n " +
|
|
" updateNoSubjects();\r\n " +
|
|
" } else {\r\n alert(\'That subjec" +
|
|
"t has already been added\');\r\n }\r\n " +
|
|
" } else {\r\n " +
|
|
" alert(\'Unknown Id\');\r\n }\r\n " +
|
|
" }).fail(function (jqXHR, textStatus, errorThrown)" +
|
|
" {\r\n alert(\'Error: \' + errorThrown);\r\n " +
|
|
" });\r\n }\r\n\r\n " +
|
|
" function updateNoSubjects() {\r\n " +
|
|
" if (list.find(\'li:visible\').length > 0)\r\n " +
|
|
" noSubjects.hide();\r\n else\r" +
|
|
"\n noSubjects.show();\r\n " +
|
|
" }\r\n\r\n function saveChanges() {\r\n " +
|
|
" var form = $(\'#Config_JobQueues_Subjects_Update_" +
|
|
"Dialog_Form\').empty();\r\n\r\n list.find(\'li[data" +
|
|
"-subjectstatus!=\"removed\"]\').each(function () {\r\n " +
|
|
" var subjectId = $(this).attr(\'data-subjectid\');\r\n\r\n " +
|
|
" form.append($(\'<input>\').attr({\r\n " +
|
|
" \'name\': \'Subjects\',\r\n " +
|
|
" \'type\': \'hidden\'\r\n }).val(subjectId));\r" +
|
|
"\n\r\n }).get();\r\n\r\n " +
|
|
" form.submit();\r\n\r\n dialog.dialog(\"dis" +
|
|
"able\");\r\n dialog.dialog(\"option\", \"buttons\", " +
|
|
"null);\r\n }\r\n\r\n $(f" +
|
|
"unction () {\r\n $(\'#Config_JobQueues_Subjects_" +
|
|
"Update\').click(showDialog);\r\n });\r\n\r\n " +
|
|
" })();\r\n </script>\r\n </" +
|
|
"div>\r\n");
|
|
|
|
|
|
#line 490 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Automatically Add" +
|
|
" Jobs:</th>\r\n <td>\r\n <div>\r\n");
|
|
|
|
|
|
#line 497 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 497 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (Model.Token.JobQueue.JobSubTypes.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul>\r\n");
|
|
|
|
|
|
#line 500 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 500 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var jobType in Model.Token.JobQueue.JobSubTypes.GroupBy(jst => jst.JobType).OrderBy(jtg => jtg.Key.Description))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 503 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(jobType.Key.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <ul>\r\n");
|
|
|
|
|
|
#line 505 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 505 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (jobType.Count() == Model.JobTypes.FirstOrDefault(jt => jt.Id == jobType.Key.Id).JobSubTypes.Count)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li><span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">[All Sub Types]</span></li>\r\n");
|
|
|
|
|
|
#line 508 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
foreach (var jobSubType in jobType)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>");
|
|
|
|
|
|
#line 513 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(jobSubType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 514 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n </li>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 518 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 520 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 524 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 526 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 526 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_JobSubTypes_Update\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Update</a>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_JobSubTypes_Update_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Job Queue Automatic Types\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 530 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 530 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
using (Html.BeginForm(MVC.API.JobQueue.UpdateJobSubTypes(Model.Token.JobQueue.Id, null, true)))
|
|
{
|
|
var selectedTypes = Model.Token.JobQueue.JobSubTypes.Select(jst => jst.JobType).Distinct().ToList();
|
|
foreach (var jt in Model.JobTypes)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 28065), Tuple.Create("\"", 28087)
|
|
, Tuple.Create(Tuple.Create("", 28070), Tuple.Create("trJobType", 28070), true)
|
|
|
|
#line 535 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 28079), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 28079), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"jobTypes\"");
|
|
|
|
WriteLiteral(">\r\n <h4>\r\n <inp" +
|
|
"ut");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 28188), Tuple.Create("\"", 28207)
|
|
, Tuple.Create(Tuple.Create("", 28193), Tuple.Create("Types_", 28193), true)
|
|
|
|
#line 537 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 28199), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 28199), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"jobType\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 28240), Tuple.Create("\"", 28256)
|
|
|
|
#line 537 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 28248), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 28248), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 537 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(selectedTypes.Contains(jt) ? "checked=\"checked\"" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 28327), Tuple.Create("\"", 28347)
|
|
, Tuple.Create(Tuple.Create("", 28333), Tuple.Create("Types_", 28333), true)
|
|
|
|
#line 537 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 28339), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 28339), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 537 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(jt.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label></h4>\r\n <div");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 28415), Tuple.Create("\"", 28437)
|
|
, Tuple.Create(Tuple.Create("", 28420), Tuple.Create("SubTypes_", 28420), true)
|
|
|
|
#line 538 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 28429), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 28429), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"jobSubTypes\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 539 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id), "div"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 540 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(CommonHelpers.CheckBoxList("JobSubTypes", jt.JobSubTypes.OrderBy(jst => jst.Description).ToSelectListItems(Model.Token.JobQueue.JobSubTypes), 2));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n </div> \r\n" +
|
|
"");
|
|
|
|
|
|
#line 543 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
WriteLiteral(" <script>\r\n (function () {\r\n " +
|
|
" var dialog;\r\n\r\n function showDialog(" +
|
|
") {\r\n if (!dialog) {\r\n " +
|
|
" dialog = $(\'#Config_JobQueues_JobSubTypes_Update_Dialog\').dialog({\r\n " +
|
|
" resizable: false,\r\n " +
|
|
" modal: true,\r\n autoOpen: " +
|
|
"false,\r\n width: 750,\r\n " +
|
|
" height: 620,\r\n butto" +
|
|
"ns: {\r\n \"Save Changes\": saveChanges,\r" +
|
|
"\n Cancel: cancel\r\n " +
|
|
" }\r\n });\r\n\r\n " +
|
|
" dialog.find(\'.jobSubTypes\').hide();\r\n " +
|
|
" dialog.on(\'change\', \'input.jobType\', function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" if ($this.is(\':checked\'))\r\n " +
|
|
" $(\'#SubTypes_\' + $this.val()).slideDown(\'fast\');\r\n " +
|
|
" else\r\n $(\'#SubTypes_\' + $t" +
|
|
"his.val()).slideUp(\'fast\');\r\n }).find(\'input." +
|
|
"jobType:checked\').each(function () {\r\n $(" +
|
|
"\'#SubTypes_\' + $(this).val()).show();\r\n });\r\n" +
|
|
" }\r\n\r\n dialog.dial" +
|
|
"og(\'open\');\r\n\r\n return false;\r\n " +
|
|
" }\r\n\r\n function cancel() {\r\n " +
|
|
" dialog.dialog(\"disable\");\r\n dialo" +
|
|
"g.dialog(\"option\", \"buttons\", null);\r\n\r\n // Refre" +
|
|
"sh Page\r\n window.location.href = window.location." +
|
|
"href;\r\n }\r\n\r\n function sav" +
|
|
"eChanges() {\r\n var form = dialog.find(\'form\');\r\n\r" +
|
|
"\n $(\'input.jobType:unchecked\').each(function () {" +
|
|
"\r\n $(\'#SubTypes_\' + $(this).val()).find(\'inpu" +
|
|
"t\').prop(\'checked\', false);\r\n });\r\n\r\n " +
|
|
" form.submit();\r\n\r\n dialog.dia" +
|
|
"log(\"disable\");\r\n dialog.dialog(\"option\", \"button" +
|
|
"s\", null);\r\n }\r\n\r\n $(funct" +
|
|
"ion () {\r\n $(\'#Config_JobQueues_JobSubTypes_Updat" +
|
|
"e\').click(showDialog);\r\n });\r\n\r\n " +
|
|
" })();\r\n </script>\r\n");
|
|
|
|
|
|
#line 608 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" style=\"padding: 0.7em 0.7em;\"");
|
|
|
|
WriteLiteral(" class=\"ui-state-highlight ui-corner-all\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle information\"");
|
|
|
|
WriteLiteral("></i> When jobs of these types are created, they will automatically be added" +
|
|
" into this queue.\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
|
" </table>\r\n</div>\r\n");
|
|
|
|
|
|
#line 616 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 619 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Delete", MVC.API.JobQueue.Delete(Model.Token.JobQueue.Id, true), "Config_JobQueues_Actions_Delete_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Config_JobQueues_Actions_Delete_Dialog\"");
|
|
|
|
WriteLiteral(" title=\"Delete this Job Queue?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg warning\"");
|
|
|
|
WriteLiteral("></i>\r\n This item will be permanently deleted and cannot be recove" +
|
|
"red.<br />\r\n <br />\r\n Are you sure?\r\n <" +
|
|
"/p>\r\n </div>\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var button = $('#Config_JobQueues_Actions_Delete_Button');
|
|
var buttonDialog = $('#Config_JobQueues_Actions_Delete_Dialog');
|
|
var buttonLink = button.attr('href');
|
|
button.attr('href', '#');
|
|
button.click(function () {
|
|
buttonDialog.dialog('open');
|
|
return false;
|
|
});
|
|
buttonDialog.dialog({
|
|
resizable: false,
|
|
modal: true,
|
|
autoOpen: false,
|
|
buttons: {
|
|
""Delete"": function () {
|
|
var $this = $(this);
|
|
$this.dialog(""disable"");
|
|
$this.dialog(""option"", ""buttons"", null);
|
|
window.location.href = buttonLink;
|
|
},
|
|
Cancel: function () {
|
|
$(this).dialog(""close"");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 657 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|