a5e38406d1
Font Awesome updated and added several new icons as options for job queues.
1892 lines
70 KiB
C#
1892 lines
70 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.34014
|
|
//
|
|
// 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);
|
|
var canShowJobs = Model.OpenJobCount > 0 && Authorization.Has(Claims.Job.Lists.JobQueueLists);
|
|
|
|
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 20 "..\..\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 26 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 27 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.Token.JobQueue.Name));
|
|
|
|
|
|
#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.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 28 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 29 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 29 "..\..\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 35 "..\..\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 40 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 43 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 43 "..\..\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 50 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 51 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.Token.JobQueue.Description));
|
|
|
|
|
|
#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.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 52 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 53 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 53 "..\..\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 59 "..\..\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 64 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <pre>\r\n");
|
|
|
|
|
|
#line 68 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 68 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (string.IsNullOrEmpty(Model.Token.JobQueue.Description))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 71 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 74 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 74 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </pre>\r\n");
|
|
|
|
|
|
#line 77 "..\..\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 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.OpenJobCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" job");
|
|
|
|
|
|
#line 84 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.OpenJobCount != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" open</strong></div>\r\n <div>");
|
|
|
|
|
|
#line 85 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.TotalJobCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" total job");
|
|
|
|
|
|
#line 85 "..\..\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 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Icon);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-colour=\"");
|
|
|
|
|
|
#line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.IconColour);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 3596), Tuple.Create("\"", 3681)
|
|
, Tuple.Create(Tuple.Create("", 3604), Tuple.Create("fa", 3604), true)
|
|
, Tuple.Create(Tuple.Create(" ", 3606), Tuple.Create("fa-", 3607), true)
|
|
|
|
#line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3610), Tuple.Create<System.Object, System.Int32>(Model.Token.JobQueue.Icon
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3610), false)
|
|
, Tuple.Create(Tuple.Create(" ", 3638), Tuple.Create("fa-4x", 3639), true)
|
|
, Tuple.Create(Tuple.Create(" ", 3644), Tuple.Create("d-", 3645), true)
|
|
|
|
#line 92 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3647), Tuple.Create<System.Object, System.Int32>(Model.Token.JobQueue.IconColour
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3647), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 93 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 93 "..\..\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 100 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 100 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var icon in JobQueueService.Icons)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" data-icon=\"");
|
|
|
|
|
|
#line 102 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(icon.Key);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 4256), Tuple.Create("\"", 4281)
|
|
, Tuple.Create(Tuple.Create("", 4264), Tuple.Create("fa", 4264), true)
|
|
, Tuple.Create(Tuple.Create(" ", 4266), Tuple.Create("fa-", 4267), true)
|
|
|
|
#line 102 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4270), Tuple.Create<System.Object, System.Int32>(icon.Key
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4270), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 4282), Tuple.Create("\"", 4301)
|
|
|
|
#line 102 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4290), Tuple.Create<System.Object, System.Int32>(icon.Value
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4290), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 103 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"colours\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 106 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 106 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
foreach (var colour in JobQueueService.IconColours)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" data-colour=\"");
|
|
|
|
|
|
#line 108 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(colour.Key);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 4642), Tuple.Create("\"", 4678)
|
|
, Tuple.Create(Tuple.Create("", 4650), Tuple.Create("fa", 4650), true)
|
|
, Tuple.Create(Tuple.Create(" ", 4652), Tuple.Create("fa-square", 4653), true)
|
|
, Tuple.Create(Tuple.Create(" ", 4662), Tuple.Create("d-", 4663), true)
|
|
|
|
#line 108 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4665), Tuple.Create<System.Object, System.Int32>(colour.Key
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4665), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 4679), Tuple.Create("\"", 4700)
|
|
|
|
#line 108 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4687), Tuple.Create<System.Object, System.Int32>(colour.Value
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4687), false)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 109 "..\..\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: 650,\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 169 "..\..\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 191 "..\..\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 197 "..\..\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=\"", 9454), Tuple.Create("\"", 9502)
|
|
, Tuple.Create(Tuple.Create("", 9462), Tuple.Create("fa", 9462), true)
|
|
, Tuple.Create(Tuple.Create(" ", 9464), Tuple.Create("d-priority-", 9465), true)
|
|
|
|
#line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 9476), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 9476), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 9503), Tuple.Create("\"", 9536)
|
|
|
|
#line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 9511), Tuple.Create<System.Object, System.Int32>(priorityValue
|
|
|
|
#line default
|
|
#line hidden
|
|
, 9511), false)
|
|
, Tuple.Create(Tuple.Create(" ", 9527), Tuple.Create("Priority", 9528), true)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
|
|
#line 202 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 202 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Token.JobQueue.Priority, priorityItems));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 202 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 203 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 203 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 204 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 204 "..\..\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 212 "..\..\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 223 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 226 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Model.Token.JobQueue.Priority.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 226 "..\..\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 233 "..\..\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 257 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Token.JobQueue.DefaultSLAExpiry, slaOptions));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 257 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 258 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 258 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 259 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 259 "..\..\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 265 "..\..\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 270 "..\..\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 279 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(slaOption[0].Value);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 279 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 284 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 289 "..\..\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 296 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 296 "..\..\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 299 "..\..\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 303 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 303 "..\..\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=\"", 14510), Tuple.Create("\"", 14550)
|
|
|
|
#line 306 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 14518), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 14518), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 306 "..\..\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 308 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 308 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 308 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 14990), Tuple.Create("\"", 15032)
|
|
|
|
#line 312 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 14997), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 14997), false)
|
|
);
|
|
|
|
WriteLiteral("><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 312 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</a>\r\n");
|
|
|
|
|
|
#line 313 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 314 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 316 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 317 "..\..\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 325 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 325 "..\..\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=\"", 16166), Tuple.Create("\"", 16206)
|
|
|
|
#line 328 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 16174), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 16174), false)
|
|
);
|
|
|
|
WriteLiteral(" data-subjectid=\"");
|
|
|
|
|
|
#line 328 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(sg.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 328 "..\..\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 330 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 330 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 330 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 334 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 334 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(displayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 334 "..\..\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 336 "..\..\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=\"", 17597), Tuple.Create("\"", 17689)
|
|
|
|
#line 343 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 17606), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.JobQueue.UpdateSubjects(Model.Token.JobQueue.Id, null, true))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 17606), 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 372 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.System.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 $this.attr(\'d" +
|
|
"ata-status\', \'\')\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-subjects" +
|
|
"tatus\', \'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 $.ajax" +
|
|
"({\r\n url: \'");
|
|
|
|
|
|
#line 431 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Url.Action(MVC.API.System.Subject()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n method: \'post\',\r\n " +
|
|
" data: { Id: id }\r\n }).don" +
|
|
"e(function (response) {\r\n if (response) {" +
|
|
"\r\n if (response.IsGroup || response.I" +
|
|
"sUserAccount) {\r\n if (list.find(\'" +
|
|
"li[data-subjectid=\"\' + response.Id + \'\"]\').filter(\'[data-status!=\"removed\"]\').le" +
|
|
"ngth == 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 liIco" +
|
|
"n.addClass(\'fa-users\');\r\n\r\n v" +
|
|
"ar li = $(\'<li>\')\r\n .appe" +
|
|
"nd(liIcon)\r\n .append($(\'<" +
|
|
"span>\').text(response.Id == response.Name ? response.Id : response.Name + \' [\' +" +
|
|
" response.Id + \']\'))\r\n .a" +
|
|
"ppend($(\'<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 subject has already been added\');\r\n " +
|
|
" }\r\n " +
|
|
" } else {\r\n alert(response.Name" +
|
|
" + \' [\' + response.Id + \'] is a \' + response.Type + \'. Only users and groups can" +
|
|
" be added.\');\r\n }\r\n " +
|
|
" } else {\r\n aler" +
|
|
"t(\'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 s" +
|
|
"ubjectId = $(this).attr(\'data-subjectid\');\r\n\r\n " +
|
|
" form.append($(\'<input>\').attr({\r\n " +
|
|
" \'name\': \'Subjects\',\r\n \'type\': \'hid" +
|
|
"den\'\r\n }).val(subjectId));\r\n\r\n " +
|
|
" }).get();\r\n\r\n form.s" +
|
|
"ubmit();\r\n\r\n dialog.dialog(\"disable\");\r\n " +
|
|
" dialog.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" }\r\n\r\n $(function () {\r\n" +
|
|
" $(\'#Config_JobQueues_Subjects_Update\').click" +
|
|
"(showDialog);\r\n });\r\n\r\n " +
|
|
" })();\r\n </script>\r\n </div>\r\n");
|
|
|
|
|
|
#line 503 "..\..\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 510 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 510 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (Model.Token.JobQueue.JobSubTypes.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <ul>\r\n");
|
|
|
|
|
|
#line 513 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 513 "..\..\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 516 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(jobType.Key.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <ul>\r\n");
|
|
|
|
|
|
#line 518 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 518 "..\..\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 521 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
foreach (var jobSubType in jobType)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>");
|
|
|
|
|
|
#line 526 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(jobSubType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 527 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n </li>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 531 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 533 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 537 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 539 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 539 "..\..\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 543 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 543 "..\..\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=\"", 28953), Tuple.Create("\"", 28975)
|
|
, Tuple.Create(Tuple.Create("", 28958), Tuple.Create("trJobType", 28958), true)
|
|
|
|
#line 548 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 28967), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 28967), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"jobTypes\"");
|
|
|
|
WriteLiteral(">\r\n <h4>\r\n <inp" +
|
|
"ut");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 29076), Tuple.Create("\"", 29095)
|
|
, Tuple.Create(Tuple.Create("", 29081), Tuple.Create("Types_", 29081), true)
|
|
|
|
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 29087), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 29087), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"jobType\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 29128), Tuple.Create("\"", 29144)
|
|
|
|
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 29136), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 29136), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(selectedTypes.Contains(jt) ? "checked=\"checked\"" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 29215), Tuple.Create("\"", 29235)
|
|
, Tuple.Create(Tuple.Create("", 29221), Tuple.Create("Types_", 29221), true)
|
|
|
|
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 29227), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 29227), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(jt.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label></h4>\r\n <div");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 29303), Tuple.Create("\"", 29325)
|
|
, Tuple.Create(Tuple.Create("", 29308), Tuple.Create("SubTypes_", 29308), true)
|
|
|
|
#line 551 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 29317), Tuple.Create<System.Object, System.Int32>(jt.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 29317), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"jobSubTypes\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 552 "..\..\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 553 "..\..\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 556 "..\..\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 621 "..\..\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 629 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
if (canDelete || canShowJobs)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 632 "..\..\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>
|
|
");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 669 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
Write(Html.ActionLinkButton(string.Format("Show {0} job{1}", Model.OpenJobCount, (Model.OpenJobCount == 1 ? null : "s")), MVC.Job.Queue(Model.Token.JobQueue.Id), "Config_JobQueues_Actions_ShowJobs_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 671 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|