841 lines
29 KiB
C#
841 lines
29 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(), FormMethod.Post, new { @data_saveaction = Url.Action(MVC.API.Job.SaveExport()) }))
|
|
{
|
|
|
|
|
|
#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=\"", 2721), Tuple.Create("\"", 2760)
|
|
, Tuple.Create(Tuple.Create("", 2726), Tuple.Create("Jobs_Export_SubTypes_", 2726), true)
|
|
|
|
#line 56 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 2747), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 2747), 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=\"", 3769), Tuple.Create("\"", 3822)
|
|
, Tuple.Create(Tuple.Create("", 3774), Tuple.Create("Jobs_Export_SubTypes_", 3774), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3795), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3795), false)
|
|
, Tuple.Create(Tuple.Create("", 3808), Tuple.Create("_", 3808), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3809), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3809), false)
|
|
);
|
|
|
|
WriteLiteral(" name=\"Options.FilterJobSubTypeIds\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 3858), Tuple.Create("\"", 3877)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 3866), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 3866), 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=\"", 4014), Tuple.Create("\"", 4068)
|
|
, Tuple.Create(Tuple.Create("", 4020), Tuple.Create("Jobs_Export_SubTypes_", 4020), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4041), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4041), false)
|
|
, Tuple.Create(Tuple.Create("", 4054), Tuple.Create("_", 4054), true)
|
|
|
|
#line 68 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4055), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4055), 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=\"", 4848), Tuple.Create("\"", 4901)
|
|
, Tuple.Create(Tuple.Create("", 4853), Tuple.Create("Jobs_Export_SubTypes_", 4853), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4874), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4874), false)
|
|
, Tuple.Create(Tuple.Create("", 4887), Tuple.Create("_", 4887), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4888), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4888), false)
|
|
);
|
|
|
|
WriteLiteral(" name=\"Options.FilterJobSubTypeIds\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 4937), Tuple.Create("\"", 4956)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4945), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4945), 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=\"", 5093), Tuple.Create("\"", 5147)
|
|
, Tuple.Create(Tuple.Create("", 5099), Tuple.Create("Jobs_Export_SubTypes_", 5099), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5120), Tuple.Create<System.Object, System.Int32>(jobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5120), false)
|
|
, Tuple.Create(Tuple.Create("", 5133), Tuple.Create("_", 5133), true)
|
|
|
|
#line 78 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5134), Tuple.Create<System.Object, System.Int32>(subType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5134), 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");
|
|
|
|
|
|
#line 106 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 106 "..\..\Views\Job\Export.cshtml"
|
|
Write(Html.Partial(MVC.Shared.Views._ExportFields, Model.Fields.FieldGroups));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 106 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
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 $form = $FilterStartDate.closest(\'for" +
|
|
"m\');\r\n\r\n function exportTypeChange() {\r\n $expo" +
|
|
"rtTypeTargetContainers.hide();\r\n $exportTypeTargetContainers." +
|
|
"find(\'select\').prop(\'disabled\', true);\r\n\r\n switch ($exportTyp" +
|
|
"e.val()) {\r\n case \'Batch\':\r\n $" +
|
|
"(\'#Devices_Export_Type_Target_Batch\').show().find(\'select\').prop(\'disabled\', fal" +
|
|
"se);\r\n break;\r\n case \'Profile\'" +
|
|
":\r\n $(\'#Devices_Export_Type_Target_Profile\').show().f" +
|
|
"ind(\'select\').prop(\'disabled\', false);\r\n break;\r\n " +
|
|
" case \'Model\':\r\n $(\'#Devices_Expor" +
|
|
"t_Type_Target_Model\').show().find(\'select\').prop(\'disabled\', false);\r\n " +
|
|
" break;\r\n }\r\n }\r\n " +
|
|
" $FilterJobTypeId\r\n .on(\'change\', function (e) {\r\n " +
|
|
" $(\'#Jobs_Export_SubTypes\').hide()\r\n ." +
|
|
"find(\'.Jobs_Export_SubType_Target\').hide()\r\n .find(\'i" +
|
|
"nput\').prop(\'disabled\', true);\r\n\r\n const type = $(e.curre" +
|
|
"ntTarget).val();\r\n if (type) {\r\n " +
|
|
" $(\'#Jobs_Export_SubTypes\').show()\r\n $(\'#Jobs_Expor" +
|
|
"t_SubTypes_\' + type).show()\r\n .find(\'input\').prop" +
|
|
"(\'disabled\', false);\r\n }\r\n }).trigger(" +
|
|
"\'change\');\r\n $(\'#Jobs_Export_SubTypes\').on(\'click\', \'a.selectAll," +
|
|
"a.selectNone\', function (e) {\r\n e.preventDefault();\r\n " +
|
|
" var $this = $(this);\r\n $this.closest(\'div\').find(" +
|
|
"\'input\').prop(\'checked\', $this.is(\'.selectAll\'));\r\n return fa" +
|
|
"lse;\r\n });\r\n\r\n $.validator.unobtrusive.parse($form" +
|
|
");\r\n $form.data(\"validator\").settings.submitHandler = function ()" +
|
|
" {\r\n var exportFieldCount = $(\'#Export_Fields\').find(\'input:c" +
|
|
"hecked\').length;\r\n\r\n if (exportFieldCount > 0) {\r\n\r\n " +
|
|
" const $exportingDialog = $(\'#Export_Exporting\').dialog({\r\n " +
|
|
" width: 400,\r\n height: 164,\r\n " +
|
|
" resizable: false,\r\n modal: tr" +
|
|
"ue,\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 to export." +
|
|
"\');\r\n };\r\n\r\n $(\'#Jobs_Export_Button\').click(functi" +
|
|
"on () {\r\n $form.submit();\r\n });\r\n " +
|
|
" $(\'#Jobs_Export_Save_Button\').click(function () {\r\n $form." +
|
|
"attr(\'action\', $form[0].dataset.saveaction);\r\n $form.submit()" +
|
|
";\r\n });\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 184 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 186 "..\..\Views\Job\Export.cshtml"
|
|
if (Model.ExportId.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Export_Download_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Export Jobs\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 189 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 189 "..\..\Views\Job\Export.cshtml"
|
|
if (Model.ExportResult.RecordCount == 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
|
|
|
|
|
|
#line 192 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h4>");
|
|
|
|
|
|
#line 195 "..\..\Views\Job\Export.cshtml"
|
|
Write(Model.ExportResult.RecordCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" record");
|
|
|
|
|
|
#line 195 "..\..\Views\Job\Export.cshtml"
|
|
Write(Model.ExportResult.RecordCount != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" were successfully exported.</h4>\r\n");
|
|
|
|
WriteLiteral(" <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 10612), Tuple.Create("\"", 10680)
|
|
|
|
#line 196 "..\..\Views\Job\Export.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 10619), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportId.Value))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 10619), false)
|
|
);
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral("><i");
|
|
|
|
WriteLiteral(" class=\"fa fa-download fa-lg\"");
|
|
|
|
WriteLiteral("></i>Download Job Export</a>\r\n");
|
|
|
|
|
|
#line 197 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
$('#Export_Download_Dialog')
|
|
.dialog({
|
|
width: 400,
|
|
height: 164,
|
|
resizable: false,
|
|
modal: true,
|
|
autoOpen: true
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 211 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" id=\"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");
|
|
|
|
|
|
#line 216 "..\..\Views\Job\Export.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 216 "..\..\Views\Job\Export.cshtml"
|
|
if (Authorization.Has(Claims.Config.ManageSavedExports))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <button");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Save_Button\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(">Save Export</button>\r\n");
|
|
|
|
|
|
#line 219 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <button");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(" disabled");
|
|
|
|
WriteLiteral(" title=\"Requires Manage Saved Exports Permission\"");
|
|
|
|
WriteLiteral(">Save Export</button>\r\n");
|
|
|
|
|
|
#line 223 "..\..\Views\Job\Export.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <button");
|
|
|
|
WriteLiteral(" id=\"Jobs_Export_Button\"");
|
|
|
|
WriteLiteral(" type=\"button\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(">Export Now</button>\r\n</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|