1106 lines
39 KiB
C#
1106 lines
39 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Views.Job
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
#line 1 "..\..\Views\Job\Export.cshtml"
|
|
using Disco.Web.Models.Job;
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Export.cshtml")]
|
|
public partial class Export : Disco.Services.Web.WebViewPage<ExportModel>
|
|
{
|
|
public Export()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 3 "..\..\Views\Job\Export.cshtml"
|
|
|
|
Authorization.RequireAny(Claims.Job.Actions.Export);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Export Jobs");
|
|
|
|
var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData);
|
|
var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool))
|
|
.GroupBy(m => m.ShortDisplayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 13 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 13 "..\..\Views\Job\Export.cshtml"
|
|
using (Html.BeginForm(MVC.API.Job.Export()))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 15 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.AntiForgeryToken());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 15 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Type\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 570px\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Export Filter</h2>\r\n <table>\r\n <tr>\r" +
|
|
"\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px\"");
|
|
|
|
WriteLiteral(">\r\n Start Date:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 24 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.EditorFor(m => m.Options.FilterStartDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 25 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.Options.FilterStartDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>End Date:</th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 31 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.EditorFor(m => m.Options.FilterEndDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 32 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.Options.FilterEndDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Status:</th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 38 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Options.FilterJobStatusId, m => m.JobStatuses, i => i.Key, i => i.Value, "-- All Jobs --"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px; text-align: right;\"");
|
|
|
|
WriteLiteral(">Type:</th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 47 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Options.FilterJobTypeId, m => m.JobTypes, i => i.Id, i => i.Description, "-- All Jobs --"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n " +
|
|
" <tr>\r\n <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_SubTypes\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 52 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 52 "..\..\Views\Job\Export.cshtml"
|
|
foreach (var jobType in Model.JobTypes)
|
|
{
|
|
var subTypes = jobType.JobSubTypes.OrderBy(s => s.Description).ToList();
|
|
var itemsPerColumn = (int)Math.Ceiling((double)subTypes.Count / 2);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 2639), Tuple.Create("\"", 2678)
|
|
, Tuple.Create(Tuple.Create("", 2644), Tuple.Create("Jobs_Export_SubTypes_", 2644), true)
|
|
|
|
#line 56 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 2665), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 2665), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"Jobs_Export_SubType_Target\"");
|
|
|
|
WriteLiteral(" data-typeid=\"");
|
|
|
|
|
|
#line 56 "..\..\Views\Job\Export.cshtml"
|
|
Write(jobType.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 57 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 57 "..\..\Views\Job\Export.cshtml"
|
|
if (jobType.JobSubTypes.Count > 2)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"select\"");
|
|
|
|
WriteLiteral("><a");
|
|
|
|
WriteLiteral(" class=\"selectAll\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">ALL</a> | <a");
|
|
|
|
WriteLiteral(" class=\"selectNone\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">NONE</a></span>\r\n");
|
|
|
|
|
|
#line 60 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <table");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n " +
|
|
" <td");
|
|
|
|
WriteLiteral(" style=\"width: 50%\"");
|
|
|
|
WriteLiteral(">\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 65 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 65 "..\..\Views\Job\Export.cshtml"
|
|
foreach (var subType in subTypes.Take(itemsPerColumn))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>\r\n " +
|
|
" <input");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 3687), Tuple.Create("\"", 3740)
|
|
, Tuple.Create(Tuple.Create("", 3692), Tuple.Create("Jobs_Export_SubTypes_", 3692), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3713), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3713), false)
|
|
, Tuple.Create(Tuple.Create("", 3726), Tuple.Create("_", 3726), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3727), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3727), false)
|
|
);
|
|
|
|
WriteLiteral(" name=\"Options.FilterJobSubTypeIds\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 3776), Tuple.Create("\"", 3795)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3784), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3784), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
Write((Model.Options.FilterJobTypeId == jobType.Id && Model.Options.FilterJobSubTypeIds.Contains(subType.Id)) ? "checked " : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 3932), Tuple.Create("\"", 3986)
|
|
, Tuple.Create(Tuple.Create("", 3938), Tuple.Create("Jobs_Export_SubTypes_", 3938), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3959), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3959), false)
|
|
, Tuple.Create(Tuple.Create("", 3972), Tuple.Create("_", 3972), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3973), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3973), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
Write(subType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label>\r\n </li>\r\n" +
|
|
"");
|
|
|
|
|
|
#line 70 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n " +
|
|
" </td>\r\n " +
|
|
" <td");
|
|
|
|
WriteLiteral(" style=\"width: 50%\"");
|
|
|
|
WriteLiteral(">\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 75 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 75 "..\..\Views\Job\Export.cshtml"
|
|
foreach (var subType in subTypes.Skip(itemsPerColumn))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>\r\n " +
|
|
" <input");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 4766), Tuple.Create("\"", 4819)
|
|
, Tuple.Create(Tuple.Create("", 4771), Tuple.Create("Jobs_Export_SubTypes_", 4771), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4792), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4792), false)
|
|
, Tuple.Create(Tuple.Create("", 4805), Tuple.Create("_", 4805), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4806), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4806), false)
|
|
);
|
|
|
|
WriteLiteral(" name=\"Options.FilterJobSubTypeIds\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 4855), Tuple.Create("\"", 4874)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4863), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4863), false)
|
|
);
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
Write((Model.Options.FilterJobTypeId == jobType.Id && Model.Options.FilterJobSubTypeIds.Contains(subType.Id)) ? "checked " : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 5011), Tuple.Create("\"", 5065)
|
|
, Tuple.Create(Tuple.Create("", 5017), Tuple.Create("Jobs_Export_SubTypes_", 5017), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5038), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5038), false)
|
|
, Tuple.Create(Tuple.Create("", 5051), Tuple.Create("_", 5051), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5052), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5052), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
Write(subType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label>\r\n </li>\r\n" +
|
|
"");
|
|
|
|
|
|
#line 80 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" </ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 86 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n " +
|
|
" </table>\r\n </td>\r\n </tr>\r\n " +
|
|
" <tr>\r\n <th>Job Queue:</th>\r\n " +
|
|
"<td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 95 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Options.FilterJobQueueId, m => m.JobQueues, i => i.Id.ToString(), i => i.Name, "-- All Jobs --"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>");
|
|
|
|
|
|
#line 99 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.LabelFor(m => m.Options.Format));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 101 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Options.Format, m => Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)), i => i, i => i));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Fields\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Export Fields <a");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Fields_Defaults\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
|
|
|
|
|
|
#line 109 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 109 "..\..\Views\Job\Export.cshtml"
|
|
foreach (var optionGroup in optionGroups)
|
|
{
|
|
var optionFields = optionGroup.ToList();
|
|
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 120px;\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 115 "..\..\Views\Job\Export.cshtml"
|
|
Write(optionGroup.Key);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 116 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 116 "..\..\Views\Job\Export.cshtml"
|
|
if (optionFields.Count > 2)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" style=\"display: block;\"");
|
|
|
|
WriteLiteral(" class=\"select\"");
|
|
|
|
WriteLiteral("><a");
|
|
|
|
WriteLiteral(" class=\"selectAll\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">ALL</a> | <a");
|
|
|
|
WriteLiteral(" class=\"selectNone\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">NONE</a></span>\r\n");
|
|
|
|
|
|
#line 119 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </th>\r\n <td>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" class=\"Jobs_Export_Fields_Group\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n " +
|
|
" <td");
|
|
|
|
WriteLiteral(" style=\"width: 50%\"");
|
|
|
|
WriteLiteral(">\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 127 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 127 "..\..\Views\Job\Export.cshtml"
|
|
foreach (var optionItem in optionFields.Take(itemsPerColumn))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 7775), Tuple.Create("\"", 7806)
|
|
|
|
#line 129 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7783), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7783), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 7888), Tuple.Create("\"", 7925)
|
|
, Tuple.Create(Tuple.Create("", 7893), Tuple.Create("Options_", 7893), true)
|
|
|
|
#line 130 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7901), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7901), false)
|
|
);
|
|
|
|
WriteAttribute("name", Tuple.Create(" name=\"", 7926), Tuple.Create("\"", 7965)
|
|
, Tuple.Create(Tuple.Create("", 7933), Tuple.Create("Options.", 7933), true)
|
|
|
|
#line 130 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7941), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7941), false)
|
|
);
|
|
|
|
WriteLiteral(" value=\"true\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 130 "..\..\Views\Job\Export.cshtml"
|
|
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 8036), Tuple.Create("\"", 8074)
|
|
, Tuple.Create(Tuple.Create("", 8042), Tuple.Create("Options_", 8042), true)
|
|
|
|
#line 130 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8050), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8050), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 130 "..\..\Views\Job\Export.cshtml"
|
|
Write(optionItem.DisplayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label>\r\n </li>\r\n");
|
|
|
|
|
|
#line 132 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n " +
|
|
" </td>\r\n <td");
|
|
|
|
WriteLiteral(" style=\"width: 50%\"");
|
|
|
|
WriteLiteral(">\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 137 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 137 "..\..\Views\Job\Export.cshtml"
|
|
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 8663), Tuple.Create("\"", 8694)
|
|
|
|
#line 139 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8671), Tuple.Create<System.Object, System.Int32>(optionItem.Description
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8671), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteAttribute("id", Tuple.Create(" id=\"", 8776), Tuple.Create("\"", 8813)
|
|
, Tuple.Create(Tuple.Create("", 8781), Tuple.Create("Options_", 8781), true)
|
|
|
|
#line 140 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8789), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8789), false)
|
|
);
|
|
|
|
WriteAttribute("name", Tuple.Create(" name=\"", 8814), Tuple.Create("\"", 8853)
|
|
, Tuple.Create(Tuple.Create("", 8821), Tuple.Create("Options.", 8821), true)
|
|
|
|
#line 140 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8829), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8829), false)
|
|
);
|
|
|
|
WriteLiteral(" value=\"true\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 140 "..\..\Views\Job\Export.cshtml"
|
|
Write(((bool)optionItem.Model) ? "checked " : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteAttribute("for", Tuple.Create(" for=\"", 8924), Tuple.Create("\"", 8962)
|
|
, Tuple.Create(Tuple.Create("", 8930), Tuple.Create("Options_", 8930), true)
|
|
|
|
#line 140 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8938), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8938), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 140 "..\..\Views\Job\Export.cshtml"
|
|
Write(optionItem.DisplayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</label>\r\n </li>\r\n");
|
|
|
|
|
|
#line 142 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" </ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
");
|
|
|
|
|
|
#line 150 "..\..\Views\Job\Export.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </table>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script>\r\n $(function () {\r\n const $FilterStart" +
|
|
"Date = $(\'#Options_FilterStartDate\');\r\n const $FilterEndDate = $(" +
|
|
"\'#Options_FilterEndDate\');\r\n const $FilterJobTypeId = $(\'#Options" +
|
|
"_FilterJobTypeId\');\r\n\r\n $FilterStartDate.attr(\'type\', \'date\');\r\n " +
|
|
" $FilterEndDate.attr(\'type\', \'date\');\r\n\r\n var expor" +
|
|
"tDefaultFields = [\'JobId\', \'JobStatus\', \'JobType\', \'JobSubTypes\', \'JobOpenedDate" +
|
|
"\', \'DeviceSerialNumber\', \'DeviceModelDescription\', \'DeviceProfileName\', \'UserId\'" +
|
|
", \'UserDisplayName\'];\r\n var $exportFields = $(\'#Jobs_Export_Field" +
|
|
"s\');\r\n var $form = $FilterStartDate.closest(\'form\');\r\n\r\n " +
|
|
" function exportTypeChange() {\r\n $exportTypeTargetConta" +
|
|
"iners.hide();\r\n $exportTypeTargetContainers.find(\'select\').pr" +
|
|
"op(\'disabled\', true);\r\n\r\n switch ($exportType.val()) {\r\n " +
|
|
" case \'Batch\':\r\n $(\'#Devices_Export" +
|
|
"_Type_Target_Batch\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
|
" break;\r\n case \'Profile\':\r\n " +
|
|
" $(\'#Devices_Export_Type_Target_Profile\').show().find(\'select\').pro" +
|
|
"p(\'disabled\', false);\r\n break;\r\n " +
|
|
" case \'Model\':\r\n $(\'#Devices_Export_Type_Target_Mod" +
|
|
"el\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
|
" break;\r\n }\r\n }\r\n $FilterJobTyp" +
|
|
"eId\r\n .on(\'change\', function (e) {\r\n $" +
|
|
"(\'#Jobs_Export_SubTypes\').hide()\r\n .find(\'.Jobs_Expor" +
|
|
"t_SubType_Target\').hide()\r\n .find(\'input\').prop(\'disa" +
|
|
"bled\', true);\r\n\r\n const type = $(e.currentTarget).val();\r" +
|
|
"\n if (type) {\r\n $(\'#Jobs_Expor" +
|
|
"t_SubTypes\').show()\r\n $(\'#Jobs_Export_SubTypes_\' + ty" +
|
|
"pe).show()\r\n .find(\'input\').prop(\'disabled\', fals" +
|
|
"e);\r\n }\r\n }).trigger(\'change\');\r\n " +
|
|
" $(\'#Jobs_Export_SubTypes\').on(\'click\', \'a.selectAll,a.selectNone\', fu" +
|
|
"nction (e) {\r\n e.preventDefault();\r\n var $" +
|
|
"this = $(this);\r\n $this.closest(\'div\').find(\'input\').prop(\'ch" +
|
|
"ecked\', $this.is(\'.selectAll\'));\r\n return false;\r\n " +
|
|
" });\r\n\r\n $exportFields.on(\'click\', \'a.selectAll,a.selectNone\'" +
|
|
", function (e) {\r\n e.preventDefault();\r\n v" +
|
|
"ar $this = $(this);\r\n $this.closest(\'tr\').find(\'input\').prop(" +
|
|
"\'checked\', $this.is(\'.selectAll\'));\r\n return false;\r\n " +
|
|
" });\r\n\r\n $(\'#Jobs_Export_Fields_Defaults\').click(function " +
|
|
"(e) {\r\n e.preventDefault();\r\n\r\n $exportFie" +
|
|
"lds.find(\'input\').prop(\'checked\', false);\r\n\r\n $.each(exportDe" +
|
|
"faultFields, function (index, value) {\r\n $(\'#Options_\' + " +
|
|
"value).prop(\'checked\', true);\r\n });\r\n\r\n re" +
|
|
"turn false;\r\n });\r\n\r\n $.validator.unobtrusive.pars" +
|
|
"e($form);\r\n $form.data(\"validator\").settings.submitHandler = func" +
|
|
"tion () {\r\n var exportFieldCount = $exportFields.find(\'input:" +
|
|
"checked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
|
" const $exportingDialog = $(\'#Devices_Export_Exporting\').dialog({" +
|
|
"\r\n width: 400,\r\n height: 1" +
|
|
"64,\r\n resizable: false,\r\n " +
|
|
"modal: true,\r\n autoOpen: true\r\n " +
|
|
" });\r\n\r\n $form[0].submit();\r\n }\r\n " +
|
|
" else\r\n alert(\'Select at least one field t" +
|
|
"o export.\');\r\n };\r\n\r\n $(\'#Devices_Export_Download_" +
|
|
"Dialog\').dialog({\r\n width: 400,\r\n height: " +
|
|
"164,\r\n resizable: false,\r\n modal: true,\r\n " +
|
|
" autoOpen: true\r\n });\r\n $(\'#Jobs" +
|
|
"_Export_Button\').click(function () {\r\n $form.submit();\r\n " +
|
|
" });\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 254 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 256 "..\..\Views\Job\Export.cshtml"
|
|
if (Model.ExportSessionId != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Download_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Export Jobs\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 259 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 259 "..\..\Views\Job\Export.cshtml"
|
|
if (Model.ExportSessionResult.RecordCount == 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|
|
|
|
|
#line 262 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h4>");
|
|
|
|
|
|
#line 265 "..\..\Views\Job\Export.cshtml"
|
|
Write(Model.ExportSessionResult.RecordCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" record");
|
|
|
|
|
|
#line 265 "..\..\Views\Job\Export.cshtml"
|
|
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" were successfully exported.</h4>\r\n");
|
|
|
|
WriteLiteral(" <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 14444), Tuple.Create("\"", 14513)
|
|
|
|
#line 266 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 14451), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportSessionId))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 14451), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral("><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|
|
|
WriteLiteral("></i>Download Job Export</a>\r\n");
|
|
|
|
|
|
#line 267 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
$('#Jobs_Export_Download_Dialog')
|
|
.dialog({
|
|
width: 400,
|
|
height: 164,
|
|
resizable: false,
|
|
modal: true,
|
|
autoOpen: true
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 281 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Exporting\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Exporting Jobs...\"");
|
|
|
|
WriteLiteral(">\r\n <h4><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-lg fa-cog fa-spin\"");
|
|
|
|
WriteLiteral(" title=\"Please Wait\"");
|
|
|
|
WriteLiteral("></i>Exporting jobs...</h4>\r\n</div>\r\n<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n <button");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Button\"");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(">Export Jobs</button>\r\n</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|