feature: job exporting (resolves #155)

This commit is contained in:
Gary Sharp
2024-12-12 16:02:12 +11:00
parent 90c709c4c1
commit a6b9cd1af2
55 changed files with 3197 additions and 412 deletions
@@ -693,6 +693,7 @@ namespace Disco.Web.Areas.API.Controllers
internal const string ExportSessionCacheKey = "DeviceExportContext_{0}";
[DiscoAuthorize(Claims.Device.Actions.Export)]
[HttpPost, ValidateAntiForgeryToken]
public virtual ActionResult Export(ExportModel Model)
{
if (Model == null || Model.Options == null)
@@ -734,6 +735,9 @@ namespace Disco.Web.Areas.API.Controllers
if (context.Result == null || context.Result.Result == null)
throw new ArgumentException("The export session is still running, or failed to complete successfully", "Id");
if (context.Result.RecordCount == 0)
throw new ArgumentException("No records were found to export", nameof(Id));
var fileStream = context.Result.Result;
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, context.Result.MimeType, context.Result.Filename);
@@ -444,6 +444,9 @@ namespace Disco.Web.Areas.API.Controllers
if (context.Result == null || context.Result.Result == null)
throw new ArgumentException("The export session is still running, or failed to complete successfully", nameof(Id));
if (context.Result.RecordCount == 0)
throw new ArgumentException("No records were found to export", nameof(Id));
var fileStream = context.Result.Result;
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, context.Result.MimeType, context.Result.Filename);
@@ -1,18 +1,25 @@
using Disco.Models.Repository;
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs;
using Disco.Models.Services.Jobs.Exporting;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Exporting;
using Disco.Services.Interop;
using Disco.Services.Jobs.Exporting;
using Disco.Services.Jobs.JobLists;
using Disco.Services.Jobs.Statistics;
using Disco.Services.Users;
using Disco.Services.Web;
using Disco.Web.Extensions;
using Disco.Web.Models.Job;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Caching;
using System.Web.Mvc;
namespace Disco.Web.Areas.API.Controllers
@@ -2152,5 +2159,62 @@ namespace Disco.Web.Areas.API.Controllers
return Json(results, JsonRequestBehavior.AllowGet);
}
#region Exporting
internal const string ExportSessionCacheKey = "JobExportContext_{0}";
[DiscoAuthorize(Claims.Job.Actions.Export)]
[HttpPost, ValidateAntiForgeryToken]
public virtual ActionResult Export(ExportModel model)
{
if (model == null || model.Options == null)
throw new ArgumentNullException(nameof(model));
// Write Options to Configuration
Database.DiscoConfiguration.JobPreferences.LastExportOptions = model.Options;
Database.SaveChanges();
// Start Export
var exportContext = JobExportTask.ScheduleNow(model.Options);
// Store Export Context in Web Cache
string key = string.Format(ExportSessionCacheKey, exportContext.TaskStatus.SessionId);
HttpRuntime.Cache.Insert(key, exportContext, null, DateTime.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, null);
// Set Task Finished Url
var finishedActionResult = MVC.Job.Export(exportContext.TaskStatus.SessionId);
exportContext.TaskStatus.SetFinishedUrl(Url.Action(finishedActionResult));
// Try waiting for completion
if (exportContext.TaskStatus.WaitUntilFinished(TimeSpan.FromSeconds(2)))
return RedirectToAction(finishedActionResult);
else
return RedirectToAction(MVC.Config.Logging.TaskStatus(exportContext.TaskStatus.SessionId));
}
[DiscoAuthorize(Claims.Job.Actions.Export)]
public virtual ActionResult ExportRetrieve(string id)
{
if (string.IsNullOrWhiteSpace(id))
throw new ArgumentNullException("Id");
string key = string.Format(ExportSessionCacheKey, id);
var context = HttpRuntime.Cache.Get(key) as ExportTaskContext<JobExportOptions>;
if (context == null)
throw new ArgumentException("The Id specified is invalid, or the export data expired (60 minutes)", nameof(id));
if (context.Result == null || context.Result.Result == null)
throw new ArgumentException("The export session is still running, or failed to complete successfully", nameof(id));
if (context.Result.RecordCount == 0)
throw new ArgumentException("No records were found to export", nameof(id));
var fileStream = context.Result.Result;
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, context.Result.MimeType, context.Result.Filename);
}
#endregion
}
}
@@ -1,4 +1,4 @@
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs;
using Disco.Services.Authorization;
using Disco.Services.Jobs;
using Disco.Services.Web;
@@ -449,6 +449,9 @@ namespace Disco.Web.Areas.API.Controllers
if (context.Result == null || context.Result.Result == null)
throw new ArgumentException("The export session is still running, or failed to complete successfully", nameof(Id));
if (context.Result.RecordCount == 0)
throw new ArgumentException("No records were found to export", nameof(Id));
var fileStream = context.Result.Result;
return this.File(fileStream.GetBuffer(), 0, (int)fileStream.Length, context.Result.MimeType, context.Result.Filename);
@@ -1,5 +1,5 @@
using Disco.Data.Repository;
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs;
using Disco.Models.UI.Config.JobPreferences;
using Disco.Services.Extensions;
using System;
@@ -71,7 +71,8 @@
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null)/><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label></li>
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
@@ -80,7 +81,8 @@
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null)/><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label></li>
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
@@ -88,7 +90,8 @@
</table>
</div>
</td>
</tr>
</tr>
}
</table>
</div>
@@ -161,8 +164,15 @@
@if (Model.ExportSessionId != null)
{
<div id="DeviceFlag_Export_Download_Dialog" class="dialog" title="Export Device Flags">
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download Device Flag Export</a>
@if (Model.ExportSessionResult.RecordCount == 0)
{
<h4>No records matched the filter criteria</h4>
}
else
{
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download Device Flag Export</a>
}
</div>
<script>
$(function () {
@@ -402,32 +402,32 @@ WriteLiteral(" ");
#line default
#line hidden
WriteLiteral("/><label");
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 4092), Tuple.Create("\"", 4130)
, Tuple.Create(Tuple.Create("", 4098), Tuple.Create("Options_", 4098), true)
WriteAttribute("for", Tuple.Create(" for=\"", 4093), Tuple.Create("\"", 4131)
, Tuple.Create(Tuple.Create("", 4099), Tuple.Create("Options_", 4099), true)
#line 74 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4106), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
, Tuple.Create(Tuple.Create("", 4107), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4106), false)
, 4107), false)
);
WriteLiteral(">");
#line 74 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(optionItem.DisplayName);
Write(optionItem.DisplayName);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
WriteLiteral("</label>\r\n </li>\r\n");
#line 75 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 76 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
@@ -445,13 +445,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 80 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 81 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line default
#line hidden
#line 80 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 81 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
@@ -460,40 +460,40 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("title", Tuple.Create(" title=\"", 4665), Tuple.Create("\"", 4696)
WriteAttribute("title", Tuple.Create(" title=\"", 4720), Tuple.Create("\"", 4751)
#line 82 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4673), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line 83 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4728), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line default
#line hidden
, 4673), false)
, 4728), false)
);
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"checkbox\"");
WriteAttribute("id", Tuple.Create(" id=\"", 4778), Tuple.Create("\"", 4815)
, Tuple.Create(Tuple.Create("", 4783), Tuple.Create("Options_", 4783), true)
WriteAttribute("id", Tuple.Create(" id=\"", 4833), Tuple.Create("\"", 4870)
, Tuple.Create(Tuple.Create("", 4838), Tuple.Create("Options_", 4838), true)
#line 83 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4791), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4846), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4791), false)
, 4846), false)
);
WriteAttribute("name", Tuple.Create(" name=\"", 4816), Tuple.Create("\"", 4855)
, Tuple.Create(Tuple.Create("", 4823), Tuple.Create("Options.", 4823), true)
WriteAttribute("name", Tuple.Create(" name=\"", 4871), Tuple.Create("\"", 4910)
, Tuple.Create(Tuple.Create("", 4878), Tuple.Create("Options.", 4878), true)
#line 83 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4831), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4886), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4831), false)
, 4886), false)
);
WriteLiteral(" value=\"true\"");
@@ -501,38 +501,38 @@ WriteLiteral(" value=\"true\"");
WriteLiteral(" ");
#line 83 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(((bool)optionItem.Model) ? "checked " : null);
#line default
#line hidden
WriteLiteral("/><label");
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 4925), Tuple.Create("\"", 4963)
, Tuple.Create(Tuple.Create("", 4931), Tuple.Create("Options_", 4931), true)
WriteAttribute("for", Tuple.Create(" for=\"", 4981), Tuple.Create("\"", 5019)
, Tuple.Create(Tuple.Create("", 4987), Tuple.Create("Options_", 4987), true)
#line 83 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4939), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4995), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4939), false)
, 4995), false)
);
WriteLiteral(">");
#line 83 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(optionItem.DisplayName);
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(optionItem.DisplayName);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
WriteLiteral("</label>\r\n </li>\r\n");
#line 84 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 86 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
@@ -544,11 +544,12 @@ WriteLiteral(@" </ul>
</table>
</div>
</td>
</tr>
</tr>
");
#line 92 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 94 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
@@ -590,7 +591,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
");\r\n });\r\n });\r\n </script>\r\n");
#line 159 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 162 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
@@ -599,7 +600,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
WriteLiteral("</div>\r\n");
#line 161 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 164 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
if (Model.ExportSessionId != null)
{
@@ -614,11 +615,38 @@ WriteLiteral(" class=\"dialog\"");
WriteLiteral(" title=\"Export Device Flags\"");
WriteLiteral(">\r\n <h4>");
WriteLiteral(">\r\n");
#line 164 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount);
#line 167 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line default
#line hidden
#line 167 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
if (Model.ExportSessionResult.RecordCount == 0)
{
#line default
#line hidden
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
#line 170 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <h4>");
#line 173 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount);
#line default
@@ -626,22 +654,24 @@ WriteLiteral(">\r\n <h4>");
WriteLiteral(" record");
#line 164 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
#line 173 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
#line default
#line hidden
WriteLiteral(" were successfully exported.</h4>\r\n <a");
WriteLiteral(" were successfully exported.</h4>\r\n");
WriteAttribute("href", Tuple.Create(" href=\"", 8250), Tuple.Create("\"", 8326)
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 8524), Tuple.Create("\"", 8600)
#line 165 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 8257), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportSessionId))
#line 174 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 8531), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceFlag.ExportRetrieve(Model.ExportSessionId))
#line default
#line hidden
, 8257), false)
, 8531), false)
);
WriteLiteral(" class=\"button\"");
@@ -650,7 +680,16 @@ WriteLiteral("><i");
WriteLiteral(" class=\"fa fa-download fa-lg\"");
WriteLiteral("></i>Download Device Flag Export</a>\r\n </div>\r\n");
WriteLiteral("></i>Download Device Flag Export</a>\r\n");
#line 175 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
WriteLiteral(@" <script>
$(function () {
@@ -667,7 +706,7 @@ WriteLiteral(@" <script>
");
#line 179 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
#line 189 "..\..\Areas\Config\Views\DeviceFlag\Export.cshtml"
}
@@ -71,7 +71,8 @@
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null)/><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label></li>
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
@@ -80,7 +81,8 @@
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null)/><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label></li>
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
@@ -88,7 +90,8 @@
</table>
</div>
</td>
</tr>
</tr>
}
</table>
</div>
@@ -161,8 +164,15 @@
@if (Model.ExportSessionId != null)
{
<div id="UserFlag_Export_Download_Dialog" class="dialog" title="Export User Flags">
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download User Flag Export</a>
@if (Model.ExportSessionResult.RecordCount == 0)
{
<h4>No records matched the filter criteria</h4>
}
else
{
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download User Flag Export</a>
}
</div>
<script>
$(function () {
@@ -402,32 +402,32 @@ WriteLiteral(" ");
#line default
#line hidden
WriteLiteral("/><label");
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 4084), Tuple.Create("\"", 4122)
, Tuple.Create(Tuple.Create("", 4090), Tuple.Create("Options_", 4090), true)
WriteAttribute("for", Tuple.Create(" for=\"", 4085), Tuple.Create("\"", 4123)
, Tuple.Create(Tuple.Create("", 4091), Tuple.Create("Options_", 4091), true)
#line 74 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4098), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
, Tuple.Create(Tuple.Create("", 4099), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4098), false)
, 4099), false)
);
WriteLiteral(">");
#line 74 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(optionItem.DisplayName);
Write(optionItem.DisplayName);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
WriteLiteral("</label>\r\n </li>\r\n");
#line 75 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 76 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
@@ -445,13 +445,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 80 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 81 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line default
#line hidden
#line 80 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 81 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
@@ -460,40 +460,40 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("title", Tuple.Create(" title=\"", 4657), Tuple.Create("\"", 4688)
WriteAttribute("title", Tuple.Create(" title=\"", 4712), Tuple.Create("\"", 4743)
#line 82 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4665), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line 83 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4720), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line default
#line hidden
, 4665), false)
, 4720), false)
);
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"checkbox\"");
WriteAttribute("id", Tuple.Create(" id=\"", 4770), Tuple.Create("\"", 4807)
, Tuple.Create(Tuple.Create("", 4775), Tuple.Create("Options_", 4775), true)
WriteAttribute("id", Tuple.Create(" id=\"", 4825), Tuple.Create("\"", 4862)
, Tuple.Create(Tuple.Create("", 4830), Tuple.Create("Options_", 4830), true)
#line 83 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4783), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4838), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4783), false)
, 4838), false)
);
WriteAttribute("name", Tuple.Create(" name=\"", 4808), Tuple.Create("\"", 4847)
, Tuple.Create(Tuple.Create("", 4815), Tuple.Create("Options.", 4815), true)
WriteAttribute("name", Tuple.Create(" name=\"", 4863), Tuple.Create("\"", 4902)
, Tuple.Create(Tuple.Create("", 4870), Tuple.Create("Options.", 4870), true)
#line 83 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4823), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4878), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4823), false)
, 4878), false)
);
WriteLiteral(" value=\"true\"");
@@ -501,38 +501,38 @@ WriteLiteral(" value=\"true\"");
WriteLiteral(" ");
#line 83 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(((bool)optionItem.Model) ? "checked " : null);
#line default
#line hidden
WriteLiteral("/><label");
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 4917), Tuple.Create("\"", 4955)
, Tuple.Create(Tuple.Create("", 4923), Tuple.Create("Options_", 4923), true)
WriteAttribute("for", Tuple.Create(" for=\"", 4973), Tuple.Create("\"", 5011)
, Tuple.Create(Tuple.Create("", 4979), Tuple.Create("Options_", 4979), true)
#line 83 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4931), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4987), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4931), false)
, 4987), false)
);
WriteLiteral(">");
#line 83 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(optionItem.DisplayName);
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(optionItem.DisplayName);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
WriteLiteral("</label>\r\n </li>\r\n");
#line 84 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 86 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
@@ -544,11 +544,12 @@ WriteLiteral(@" </ul>
</table>
</div>
</td>
</tr>
</tr>
");
#line 92 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 94 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
@@ -590,7 +591,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
" });\r\n });\r\n </script>\r\n");
#line 159 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 162 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
@@ -599,7 +600,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
WriteLiteral("</div>\r\n");
#line 161 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 164 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
if (Model.ExportSessionId != null)
{
@@ -614,11 +615,38 @@ WriteLiteral(" class=\"dialog\"");
WriteLiteral(" title=\"Export User Flags\"");
WriteLiteral(">\r\n <h4>");
WriteLiteral(">\r\n");
#line 164 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount);
#line 167 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line default
#line hidden
#line 167 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
if (Model.ExportSessionResult.RecordCount == 0)
{
#line default
#line hidden
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
#line 170 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <h4>");
#line 173 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount);
#line default
@@ -626,22 +654,24 @@ WriteLiteral(">\r\n <h4>");
WriteLiteral(" record");
#line 164 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
#line 173 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
#line default
#line hidden
WriteLiteral(" were successfully exported.</h4>\r\n <a");
WriteLiteral(" were successfully exported.</h4>\r\n");
WriteAttribute("href", Tuple.Create(" href=\"", 8226), Tuple.Create("\"", 8300)
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 8500), Tuple.Create("\"", 8574)
#line 165 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 8233), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportSessionId))
#line 174 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
, Tuple.Create(Tuple.Create("", 8507), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.UserFlag.ExportRetrieve(Model.ExportSessionId))
#line default
#line hidden
, 8233), false)
, 8507), false)
);
WriteLiteral(" class=\"button\"");
@@ -650,7 +680,16 @@ WriteLiteral("><i");
WriteLiteral(" class=\"fa fa-download fa-lg\"");
WriteLiteral("></i>Download User Flag Export</a>\r\n </div>\r\n");
WriteLiteral("></i>Download User Flag Export</a>\r\n");
#line 175 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
WriteLiteral(@" <script>
$(function () {
@@ -667,7 +706,7 @@ WriteLiteral(@" <script>
");
#line 179 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
#line 189 "..\..\Areas\Config\Views\UserFlag\Export.cshtml"
}
@@ -5514,6 +5514,9 @@ div.form > table > tbody > tr > th.name {
width: 150px;
text-align: right;
}
div.form > table > tbody > tr > td.none {
padding: 0;
}
div.form > table table.sub > tbody > tr:not(:first-child) > th,
div.form > table table.sub > tbody > tr:not(:first-child) > td {
border-top: 1px dashed #aaa;
File diff suppressed because one or more lines are too long
+32
View File
@@ -1000,4 +1000,36 @@
}
#createJobRedirect > div i {
margin-right: 10px;
}
#Jobs_Export #Jobs_Export_SubTypes {
display: none;
padding-left: 10px;
}
#Jobs_Export #Jobs_Export_Fields #Jobs_Export_Fields_Defaults {
font-size: 0.75em;
}
#Jobs_Export #Jobs_Export_Fields th {
font-size: 1.05em;
}
#Jobs_Export #Jobs_Export_Fields th span {
margin-top: 4px;
font-size: 0.8em;
}
#Jobs_Export_Download_Dialog {
padding-top: 20px;
text-align: center;
}
#Jobs_Export_Download_Dialog h4 {
margin-bottom: 30px;
}
#Jobs_Export_Download_Dialog a {
margin-bottom: 20px;
}
#Jobs_Export_Exporting {
padding-top: 50px;
text-align: center;
}
#Jobs_Export_Exporting i {
margin-right: 10px;
color: #1e6dab;
}
+45
View File
@@ -1096,3 +1096,48 @@
}
}
}
#Jobs_Export {
#Jobs_Export_SubTypes {
display: none;
padding-left: 10px;
}
#Jobs_Export_Fields {
#Jobs_Export_Fields_Defaults {
font-size: .75em;
}
th {
font-size: 1.05em;
span {
margin-top: 4px;
font-size: .8em;
}
}
}
}
#Jobs_Export_Download_Dialog {
padding-top: 20px;
text-align: center;
h4 {
margin-bottom: 30px;
}
a {
margin-bottom: 20px;
}
}
#Jobs_Export_Exporting {
padding-top: 50px;
text-align: center;
i {
margin-right: 10px;
color: @StatusInformation;
}
}
File diff suppressed because one or more lines are too long
+3
View File
@@ -1082,6 +1082,9 @@ div.form > table > tbody > tr > th.name {
width: 150px;
text-align: right;
}
div.form > table > tbody > tr > td.none {
padding: 0;
}
div.form > table table.sub > tbody > tr:not(:first-child) > th,
div.form > table table.sub > tbody > tr:not(:first-child) > td {
border-top: 1px dashed #aaa;
+4
View File
@@ -1064,6 +1064,10 @@ div.form {
width: 150px;
text-align: right;
}
& > td.none {
padding: 0;
}
}
}
File diff suppressed because one or more lines are too long
+43 -1
View File
@@ -1,10 +1,12 @@
using Disco.Models.Repository;
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs;
using Disco.Models.Services.Jobs.Exporting;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.UI.Job;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Devices.Enrolment;
using Disco.Services.Exporting;
using Disco.Services.Jobs;
using Disco.Services.Jobs.JobLists;
using Disco.Services.Jobs.JobQueues;
@@ -22,6 +24,7 @@ using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Controllers
@@ -1075,5 +1078,44 @@ namespace Disco.Web.Controllers
}
#endregion
#region Export
[DiscoAuthorizeAny(Claims.Job.Actions.Export), HttpGet]
public virtual ActionResult Export(string downloadId)
{
var m = new Models.Job.ExportModel()
{
Options = Database.DiscoConfiguration.JobPreferences.LastExportOptions,
JobQueues = JobQueueService.GetQueues().Select(q => q.JobQueue).ToList(),
JobTypes = Database.JobTypes.Include(t => t.JobSubTypes).ToList(),
JobStatuses = Job.JobStatusIds.StatusDescriptions.ToList(),
};
if (Database.DiscoConfiguration.JobPreferences.LastExportDate.GetValueOrDefault() < DateTime.Today.AddDays(-1))
{
m.Options.FilterStartDate = new DateTime(DateTime.Today.Year, 1, 1);
m.Options.FilterEndDate = null;
}
if (!string.IsNullOrWhiteSpace(downloadId))
{
string key = string.Format(Areas.API.Controllers.JobController.ExportSessionCacheKey, downloadId);
var context = HttpRuntime.Cache.Get(key) as ExportTaskContext<JobExportOptions>;
if (context != null)
{
m.ExportSessionResult = context.Result;
m.ExportSessionId = downloadId;
}
}
// UI Extensions
UIExtensions.ExecuteExtensions<JobExportModel>(this.ControllerContext, m);
return View(m);
}
#endregion
}
}
+12 -2
View File
@@ -838,6 +838,7 @@
<Compile Include="Models\Device\ExportModel.cs" />
<Compile Include="Models\Device\ImportHeadersModel.cs" />
<Compile Include="Models\InitialConfig\AdministratorsModel.cs" />
<Compile Include="Models\Job\ExportModel.cs" />
<Compile Include="Models\Job\LogInsuranceModel.cs" />
<Compile Include="Models\Job\LogRepairModel.cs" />
<Compile Include="Extensions\T4MVC\T4MVC.cs">
@@ -866,6 +867,11 @@
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Views\Job\Export.generated.cs">
<DependentUpon>Export.cshtml</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Views\Job\LogInsurance.generated.cs">
<DependentUpon>LogInsurance.cshtml</DependentUpon>
<AutoGen>True</AutoGen>
@@ -1329,10 +1335,10 @@
<Generator>RazorGenerator</Generator>
<LastGenOutput>General.generated.cs</LastGenOutput>
</None>
<Content Include="Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml">
<None Include="Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>Lodgment.generated.cs</LastGenOutput>
</Content>
</None>
<None Include="Areas\Config\Views\JobPreferences\Parts\Locations.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>Locations.generated.cs</LastGenOutput>
@@ -2073,6 +2079,10 @@
<None Include="ClientSource\Scripts\Modules\tinymce\themes\modern\theme.min.js" />
<None Include="ClientSource\Scripts\Modules\tinymce\tinymce.js" />
<None Include="ClientSource\Scripts\Modules\tinymce\tinymce.min.js" />
<None Include="Views\Job\Export.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>Export.generated.cs</LastGenOutput>
</None>
<None Include="Views\Job\LogInsurance.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>LogInsurance.generated.cs</LastGenOutput>
@@ -449,6 +449,18 @@ namespace Disco.Web.Areas.API.Controllers
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.GeneratePdfPackage);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult Export()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult ExportRetrieve()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.ExportRetrieve);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public JobController Actions { get { return MVC.API.Job; } }
@@ -532,6 +544,8 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string GeneratePdf = "GeneratePdf";
public readonly string GeneratePdfPackage = "GeneratePdfPackage";
public readonly string DeviceHeldLocations = "DeviceHeldLocations";
public readonly string Export = "Export";
public readonly string ExportRetrieve = "ExportRetrieve";
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
@@ -604,6 +618,8 @@ namespace Disco.Web.Areas.API.Controllers
public const string GeneratePdf = "GeneratePdf";
public const string GeneratePdfPackage = "GeneratePdfPackage";
public const string DeviceHeldLocations = "DeviceHeldLocations";
public const string Export = "Export";
public const string ExportRetrieve = "ExportRetrieve";
}
@@ -1231,6 +1247,22 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string id = "id";
public readonly string DocumentTemplatePackageId = "DocumentTemplatePackageId";
}
static readonly ActionParamsClass_Export s_params_Export = new ActionParamsClass_Export();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_Export ExportParams { get { return s_params_Export; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_Export
{
public readonly string Model = "Model";
}
static readonly ActionParamsClass_ExportRetrieve s_params_ExportRetrieve = new ActionParamsClass_ExportRetrieve();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_ExportRetrieve ExportRetrieveParams { get { return s_params_ExportRetrieve; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_ExportRetrieve
{
public readonly string id = "id";
}
static readonly ViewsClass s_views = new ViewsClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewsClass Views { get { return s_views; } }
@@ -2156,6 +2188,30 @@ namespace Disco.Web.Areas.API.Controllers
return callInfo;
}
[NonAction]
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Models.Job.ExportModel Model);
[NonAction]
public override System.Web.Mvc.ActionResult Export(Disco.Web.Models.Job.ExportModel Model)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Model", Model);
ExportOverride(callInfo, Model);
return callInfo;
}
[NonAction]
partial void ExportRetrieveOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id);
[NonAction]
public override System.Web.Mvc.ActionResult ExportRetrieve(string id)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.ExportRetrieve);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
ExportRetrieveOverride(callInfo, id);
return callInfo;
}
}
}
@@ -327,10 +327,10 @@ namespace Disco.Web.Areas.API.Controllers
}
[NonAction]
partial void UpdateLocationModeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.Services.Job.LocationModes LocationMode, bool redirect);
partial void UpdateLocationModeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.Services.Jobs.LocationModes LocationMode, bool redirect);
[NonAction]
public override System.Web.Mvc.ActionResult UpdateLocationMode(Disco.Models.Services.Job.LocationModes LocationMode, bool redirect)
public override System.Web.Mvc.ActionResult UpdateLocationMode(Disco.Models.Services.Jobs.LocationModes LocationMode, bool redirect)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLocationMode);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "LocationMode", LocationMode);
@@ -113,6 +113,12 @@ namespace Disco.Web.Controllers
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.InsuranceProviderJobDetails);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult Export()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public JobController Actions { get { return MVC.Job; } }
@@ -153,6 +159,7 @@ namespace Disco.Web.Controllers
public readonly string RepairProviderJobDetails = "RepairProviderJobDetails";
public readonly string LogInsurance = "LogInsurance";
public readonly string InsuranceProviderJobDetails = "InsuranceProviderJobDetails";
public readonly string Export = "Export";
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
@@ -182,6 +189,7 @@ namespace Disco.Web.Controllers
public const string RepairProviderJobDetails = "RepairProviderJobDetails";
public const string LogInsurance = "LogInsurance";
public const string InsuranceProviderJobDetails = "InsuranceProviderJobDetails";
public const string Export = "Export";
}
@@ -271,6 +279,14 @@ namespace Disco.Web.Controllers
{
public readonly string id = "id";
}
static readonly ActionParamsClass_Export s_params_Export = new ActionParamsClass_Export();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_Export ExportParams { get { return s_params_Export; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_Export
{
public readonly string downloadId = "downloadId";
}
static readonly ViewsClass s_views = new ViewsClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewsClass Views { get { return s_views; } }
@@ -285,6 +301,7 @@ namespace Disco.Web.Controllers
public readonly string _ViewStart = "_ViewStart";
public readonly string Create = "Create";
public readonly string Create_Redirect = "Create_Redirect";
public readonly string Export = "Export";
public readonly string Index = "Index";
public readonly string InsuranceProviderJobDetails = "InsuranceProviderJobDetails";
public readonly string List = "List";
@@ -305,6 +322,7 @@ namespace Disco.Web.Controllers
public readonly string _ViewStart = "~/Views/Job/_ViewStart.cshtml";
public readonly string Create = "~/Views/Job/Create.cshtml";
public readonly string Create_Redirect = "~/Views/Job/Create_Redirect.cshtml";
public readonly string Export = "~/Views/Job/Export.cshtml";
public readonly string Index = "~/Views/Job/Index.cshtml";
public readonly string InsuranceProviderJobDetails = "~/Views/Job/InsuranceProviderJobDetails.cshtml";
public readonly string List = "~/Views/Job/List.cshtml";
@@ -692,6 +710,18 @@ namespace Disco.Web.Controllers
return callInfo;
}
[NonAction]
partial void ExportOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string downloadId);
[NonAction]
public override System.Web.Mvc.ActionResult Export(string downloadId)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Export);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "downloadId", downloadId);
ExportOverride(callInfo, downloadId);
return callInfo;
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using Disco.Models.Repository;
using Disco.Models.Services.Exporting;
using Disco.Models.Services.Jobs.Exporting;
using Disco.Models.UI.Job;
using System.Collections.Generic;
namespace Disco.Web.Models.Job
{
public class ExportModel : JobExportModel
{
public JobExportOptions Options { get; set; }
public string ExportSessionId { get; set; }
public ExportResult ExportSessionResult { get; set; }
public List<JobQueue> JobQueues { get; set; }
public List<KeyValuePair<string, string>> JobStatuses { get; set; }
public List<JobType> JobTypes { get; set; }
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
using Disco.Models.ClientServices;
using Disco.Models.Services.Job.Statistics;
using Disco.Models.Services.Jobs.Statistics;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.UI.Job;
using System.Collections.Generic;
+1 -1
View File
@@ -1,5 +1,5 @@
using Disco.Models.Services.Documents;
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.UI.Job;
using Disco.Services.Plugins;
+18 -7
View File
@@ -1,5 +1,4 @@
@using Disco.Web.Models.Device;
@using Disco.Models.Services.Devices;
@model ExportModel
@{
Authorization.RequireAny(Claims.Device.Actions.Export);
@@ -13,11 +12,13 @@
<div id="Devices_Export">
@using (Html.BeginForm(MVC.API.Device.Export()))
{
@Html.AntiForgeryToken()
<div id="Devices_Export_Type" class="form" style="width: 570px">
<h2>Export Type</h2>
<table>
<tr>
<th style="width: 150px">Type:
<th style="width: 150px">
Type:
</th>
<td>
@Html.DropDownListFor(m => m.Options.ExportType, Enum.GetNames(typeof(Disco.Models.Services.Devices.Exporting.DeviceExportTypes)).Select(t => new SelectListItem() { Text = t, Value = t }))
@@ -64,7 +65,8 @@
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null)/><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label></li>
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
@@ -73,7 +75,8 @@
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null)/><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label></li>
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
@@ -81,7 +84,8 @@
</table>
</div>
</td>
</tr>
</tr>
}
</table>
</div>
@@ -174,8 +178,15 @@
@if (Model.ExportSessionId != null)
{
<div id="Devices_Export_Download_Dialog" class="dialog" title="Export Devices">
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download Device Export</a>
@if (Model.ExportSessionResult.RecordCount == 0)
{
<h4>No records matched the filter criteria</h4>
}
else
{
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download Device Export</a>
}
</div>
<script>
$(function () {
+140 -92
View File
@@ -28,12 +28,6 @@ namespace Disco.Web.Views.Device
using System.Web.WebPages;
using Disco;
using Disco.Models.Repository;
#line 2 "..\..\Views\Device\Export.cshtml"
using Disco.Models.Services.Devices;
#line default
#line hidden
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
@@ -56,7 +50,7 @@ namespace Disco.Web.Views.Device
public override void Execute()
{
#line 4 "..\..\Views\Device\Export.cshtml"
#line 3 "..\..\Views\Device\Export.cshtml"
Authorization.RequireAny(Claims.Device.Actions.Export);
@@ -76,15 +70,29 @@ WriteLiteral(" id=\"Devices_Export\"");
WriteLiteral(">\r\n");
#line 14 "..\..\Views\Device\Export.cshtml"
#line 13 "..\..\Views\Device\Export.cshtml"
#line default
#line hidden
#line 14 "..\..\Views\Device\Export.cshtml"
#line 13 "..\..\Views\Device\Export.cshtml"
using (Html.BeginForm(MVC.API.Device.Export()))
{
#line default
#line hidden
#line 15 "..\..\Views\Device\Export.cshtml"
Write(Html.AntiForgeryToken());
#line default
#line hidden
#line 15 "..\..\Views\Device\Export.cshtml"
#line default
@@ -102,12 +110,13 @@ WriteLiteral(">\r\n <h2>Export Type</h2>\r\n <table>\r\n
WriteLiteral(" style=\"width: 150px\"");
WriteLiteral(">Type:\r\n </th>\r\n <td>\r\n");
WriteLiteral(">\r\n Type:\r\n </th>\r\n " +
"<td>\r\n");
WriteLiteral(" ");
#line 23 "..\..\Views\Device\Export.cshtml"
#line 24 "..\..\Views\Device\Export.cshtml"
Write(Html.DropDownListFor(m => m.Options.ExportType, Enum.GetNames(typeof(Disco.Models.Services.Devices.Exporting.DeviceExportTypes)).Select(t => new SelectListItem() { Text = t, Value = t })));
@@ -124,7 +133,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 25 "..\..\Views\Device\Export.cshtml"
#line 26 "..\..\Views\Device\Export.cshtml"
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceBatches.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
@@ -141,7 +150,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 28 "..\..\Views\Device\Export.cshtml"
#line 29 "..\..\Views\Device\Export.cshtml"
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceModels.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
@@ -158,7 +167,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 31 "..\..\Views\Device\Export.cshtml"
#line 32 "..\..\Views\Device\Export.cshtml"
Write(Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceProfiles.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value })));
@@ -168,7 +177,7 @@ WriteLiteral("\r\n </div>\r\n </td>\r\
">\r\n <tr>\r\n <th>");
#line 36 "..\..\Views\Device\Export.cshtml"
#line 37 "..\..\Views\Device\Export.cshtml"
Write(Html.LabelFor(m => m.Options.Format));
@@ -179,7 +188,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 38 "..\..\Views\Device\Export.cshtml"
#line 39 "..\..\Views\Device\Export.cshtml"
Write(Html.DropDownListFor(m => m.Options.Format, Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)).Select(v => new SelectListItem() { Value = v, Text = v })));
@@ -205,13 +214,13 @@ WriteLiteral(" href=\"#\"");
WriteLiteral(">(Defaults)</a></h2>\r\n <table>\r\n");
#line 46 "..\..\Views\Device\Export.cshtml"
#line 47 "..\..\Views\Device\Export.cshtml"
#line default
#line hidden
#line 46 "..\..\Views\Device\Export.cshtml"
#line 47 "..\..\Views\Device\Export.cshtml"
foreach (var optionGroup in optionGroups)
{
var optionFields = optionGroup.ToList();
@@ -229,7 +238,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 52 "..\..\Views\Device\Export.cshtml"
#line 53 "..\..\Views\Device\Export.cshtml"
Write(optionGroup.Key);
@@ -238,13 +247,13 @@ WriteLiteral(" ");
WriteLiteral("\r\n");
#line 53 "..\..\Views\Device\Export.cshtml"
#line 54 "..\..\Views\Device\Export.cshtml"
#line default
#line hidden
#line 53 "..\..\Views\Device\Export.cshtml"
#line 54 "..\..\Views\Device\Export.cshtml"
if (optionFields.Count > 2)
{
@@ -272,7 +281,7 @@ WriteLiteral(" href=\"#\"");
WriteLiteral(">NONE</a></span>\r\n");
#line 56 "..\..\Views\Device\Export.cshtml"
#line 57 "..\..\Views\Device\Export.cshtml"
}
@@ -299,13 +308,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 64 "..\..\Views\Device\Export.cshtml"
#line 65 "..\..\Views\Device\Export.cshtml"
#line default
#line hidden
#line 64 "..\..\Views\Device\Export.cshtml"
#line 65 "..\..\Views\Device\Export.cshtml"
foreach (var optionItem in optionFields.Take(itemsPerColumn))
{
@@ -314,40 +323,40 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("title", Tuple.Create(" title=\"", 3907), Tuple.Create("\"", 3938)
WriteAttribute("title", Tuple.Create(" title=\"", 3928), Tuple.Create("\"", 3959)
#line 66 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 3915), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line 67 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 3936), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line default
#line hidden
, 3915), false)
, 3936), false)
);
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"checkbox\"");
WriteAttribute("id", Tuple.Create(" id=\"", 4020), Tuple.Create("\"", 4057)
, Tuple.Create(Tuple.Create("", 4025), Tuple.Create("Options_", 4025), true)
WriteAttribute("id", Tuple.Create(" id=\"", 4041), Tuple.Create("\"", 4078)
, Tuple.Create(Tuple.Create("", 4046), Tuple.Create("Options_", 4046), true)
#line 67 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4033), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 68 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4054), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4033), false)
, 4054), false)
);
WriteAttribute("name", Tuple.Create(" name=\"", 4058), Tuple.Create("\"", 4097)
, Tuple.Create(Tuple.Create("", 4065), Tuple.Create("Options.", 4065), true)
WriteAttribute("name", Tuple.Create(" name=\"", 4079), Tuple.Create("\"", 4118)
, Tuple.Create(Tuple.Create("", 4086), Tuple.Create("Options.", 4086), true)
#line 67 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4073), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 68 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4094), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4073), false)
, 4094), false)
);
WriteLiteral(" value=\"true\"");
@@ -355,38 +364,38 @@ WriteLiteral(" value=\"true\"");
WriteLiteral(" ");
#line 67 "..\..\Views\Device\Export.cshtml"
#line 68 "..\..\Views\Device\Export.cshtml"
Write(((bool)optionItem.Model) ? "checked " : null);
#line default
#line hidden
WriteLiteral("/><label");
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 4167), Tuple.Create("\"", 4205)
, Tuple.Create(Tuple.Create("", 4173), Tuple.Create("Options_", 4173), true)
WriteAttribute("for", Tuple.Create(" for=\"", 4189), Tuple.Create("\"", 4227)
, Tuple.Create(Tuple.Create("", 4195), Tuple.Create("Options_", 4195), true)
#line 67 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4181), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 68 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4203), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4181), false)
, 4203), false)
);
WriteLiteral(">");
#line 67 "..\..\Views\Device\Export.cshtml"
Write(optionItem.DisplayName);
#line 68 "..\..\Views\Device\Export.cshtml"
Write(optionItem.DisplayName);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
WriteLiteral("</label>\r\n </li>\r\n");
#line 68 "..\..\Views\Device\Export.cshtml"
#line 70 "..\..\Views\Device\Export.cshtml"
}
@@ -404,13 +413,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 73 "..\..\Views\Device\Export.cshtml"
#line 75 "..\..\Views\Device\Export.cshtml"
#line default
#line hidden
#line 73 "..\..\Views\Device\Export.cshtml"
#line 75 "..\..\Views\Device\Export.cshtml"
foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
@@ -419,40 +428,40 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("title", Tuple.Create(" title=\"", 4740), Tuple.Create("\"", 4771)
WriteAttribute("title", Tuple.Create(" title=\"", 4816), Tuple.Create("\"", 4847)
#line 75 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4748), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line 77 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4824), Tuple.Create<System.Object, System.Int32>(optionItem.Description
#line default
#line hidden
, 4748), false)
, 4824), false)
);
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"checkbox\"");
WriteAttribute("id", Tuple.Create(" id=\"", 4853), Tuple.Create("\"", 4890)
, Tuple.Create(Tuple.Create("", 4858), Tuple.Create("Options_", 4858), true)
WriteAttribute("id", Tuple.Create(" id=\"", 4929), Tuple.Create("\"", 4966)
, Tuple.Create(Tuple.Create("", 4934), Tuple.Create("Options_", 4934), true)
#line 76 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4866), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 78 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4942), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4866), false)
, 4942), false)
);
WriteAttribute("name", Tuple.Create(" name=\"", 4891), Tuple.Create("\"", 4930)
, Tuple.Create(Tuple.Create("", 4898), Tuple.Create("Options.", 4898), true)
WriteAttribute("name", Tuple.Create(" name=\"", 4967), Tuple.Create("\"", 5006)
, Tuple.Create(Tuple.Create("", 4974), Tuple.Create("Options.", 4974), true)
#line 76 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4906), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 78 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 4982), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 4906), false)
, 4982), false)
);
WriteLiteral(" value=\"true\"");
@@ -460,38 +469,38 @@ WriteLiteral(" value=\"true\"");
WriteLiteral(" ");
#line 76 "..\..\Views\Device\Export.cshtml"
#line 78 "..\..\Views\Device\Export.cshtml"
Write(((bool)optionItem.Model) ? "checked " : null);
#line default
#line hidden
WriteLiteral("/><label");
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 5000), Tuple.Create("\"", 5038)
, Tuple.Create(Tuple.Create("", 5006), Tuple.Create("Options_", 5006), true)
WriteAttribute("for", Tuple.Create(" for=\"", 5077), Tuple.Create("\"", 5115)
, Tuple.Create(Tuple.Create("", 5083), Tuple.Create("Options_", 5083), true)
#line 76 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 5014), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line 78 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 5091), Tuple.Create<System.Object, System.Int32>(optionItem.PropertyName
#line default
#line hidden
, 5014), false)
, 5091), false)
);
WriteLiteral(">");
#line 76 "..\..\Views\Device\Export.cshtml"
Write(optionItem.DisplayName);
#line 78 "..\..\Views\Device\Export.cshtml"
Write(optionItem.DisplayName);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
WriteLiteral("</label>\r\n </li>\r\n");
#line 77 "..\..\Views\Device\Export.cshtml"
#line 80 "..\..\Views\Device\Export.cshtml"
}
@@ -503,11 +512,12 @@ WriteLiteral(@" </ul>
</table>
</div>
</td>
</tr>
</tr>
");
#line 85 "..\..\Views\Device\Export.cshtml"
#line 88 "..\..\Views\Device\Export.cshtml"
}
@@ -563,7 +573,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
";\r\n });\r\n </script>\r\n");
#line 172 "..\..\Views\Device\Export.cshtml"
#line 176 "..\..\Views\Device\Export.cshtml"
}
@@ -572,7 +582,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
WriteLiteral("</div>\r\n");
#line 174 "..\..\Views\Device\Export.cshtml"
#line 178 "..\..\Views\Device\Export.cshtml"
if (Model.ExportSessionId != null)
{
@@ -587,11 +597,38 @@ WriteLiteral(" class=\"dialog\"");
WriteLiteral(" title=\"Export Devices\"");
WriteLiteral(">\r\n <h4>");
WriteLiteral(">\r\n");
#line 177 "..\..\Views\Device\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount);
#line 181 "..\..\Views\Device\Export.cshtml"
#line default
#line hidden
#line 181 "..\..\Views\Device\Export.cshtml"
if (Model.ExportSessionResult.RecordCount == 0)
{
#line default
#line hidden
WriteLiteral(" <h4>No records matched the filter criteria</h4>\r\n");
#line 184 "..\..\Views\Device\Export.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <h4>");
#line 187 "..\..\Views\Device\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount);
#line default
@@ -599,22 +636,24 @@ WriteLiteral(">\r\n <h4>");
WriteLiteral(" record");
#line 177 "..\..\Views\Device\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
#line 187 "..\..\Views\Device\Export.cshtml"
Write(Model.ExportSessionResult.RecordCount != 1 ? "s" : null);
#line default
#line hidden
WriteLiteral(" were successfully exported.</h4>\r\n <a");
WriteLiteral(" were successfully exported.</h4>\r\n");
WriteAttribute("href", Tuple.Create(" href=\"", 9415), Tuple.Create("\"", 9487)
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 9710), Tuple.Create("\"", 9782)
#line 178 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 9422), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportSessionId))
#line 188 "..\..\Views\Device\Export.cshtml"
, Tuple.Create(Tuple.Create("", 9717), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ExportRetrieve(Model.ExportSessionId))
#line default
#line hidden
, 9422), false)
, 9717), false)
);
WriteLiteral(" class=\"button\"");
@@ -623,7 +662,16 @@ WriteLiteral("><i");
WriteLiteral(" class=\"fa fa-download fa-lg\"");
WriteLiteral("></i>Download Device Export</a>\r\n </div>\r\n");
WriteLiteral("></i>Download Device Export</a>\r\n");
#line 189 "..\..\Views\Device\Export.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
WriteLiteral(@" <script>
$(function () {
@@ -640,7 +688,7 @@ WriteLiteral(@" <script>
");
#line 192 "..\..\Views\Device\Export.cshtml"
#line 203 "..\..\Views\Device\Export.cshtml"
}
+287
View File
@@ -0,0 +1,287 @@
@using Disco.Web.Models.Job;
@model ExportModel
@{
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);
}
<div id="Jobs_Export">
@using (Html.BeginForm(MVC.API.Job.Export()))
{
@Html.AntiForgeryToken()
<div id="Jobs_Export_Type" class="form" style="width: 570px">
<h2>Export Filter</h2>
<table>
<tr>
<th style="width: 150px">
Start Date:
</th>
<td>
@Html.EditorFor(m => m.Options.FilterStartDate)
@Html.ValidationMessageFor(m => m.Options.FilterStartDate)
</td>
</tr>
<tr>
<th>End Date:</th>
<td>
@Html.EditorFor(m => m.Options.FilterEndDate)
@Html.ValidationMessageFor(m => m.Options.FilterEndDate)
</td>
</tr>
<tr>
<th>Status:</th>
<td>
@Html.DropDownListFor(m => m.Options.FilterJobStatusId, m => m.JobStatuses, i => i.Key, i => i.Value, "-- All Jobs --")
</td>
</tr>
<tr>
<td colspan="2" class="none">
<table class="sub">
<tr>
<th style="width: 150px; text-align: right;">Type:</th>
<td>
@Html.DropDownListFor(m => m.Options.FilterJobTypeId, m => m.JobTypes, i => i.Id, i => i.Description, "-- All Jobs --")
</td>
</tr>
<tr>
<td colspan="2" id="Jobs_Export_SubTypes">
@foreach (var jobType in Model.JobTypes)
{
var subTypes = jobType.JobSubTypes.OrderBy(s => s.Description).ToList();
var itemsPerColumn = (int)Math.Ceiling((double)subTypes.Count / 2);
<div id="Jobs_Export_SubTypes_@(jobType.Id)" class="Jobs_Export_SubType_Target" data-typeid="@jobType.Id">
@if (jobType.JobSubTypes.Count > 2)
{
<span class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
}
<table class="none">
<tr>
<td style="width: 50%">
<ul class="none">
@foreach (var subType in subTypes.Take(itemsPerColumn))
{
<li>
<input type="checkbox" id="Jobs_Export_SubTypes_@(jobType.Id)_@(subType.Id)" name="Options.FilterJobSubTypeIds" value="@subType.Id" @((Model.Options.FilterJobTypeId == jobType.Id && Model.Options.FilterJobSubTypeIds.Contains(subType.Id)) ? "checked " : null) /><label for="Jobs_Export_SubTypes_@(jobType.Id)_@(subType.Id)">@subType.Description</label>
</li>
}
</ul>
</td>
<td style="width: 50%">
<ul class="none">
@foreach (var subType in subTypes.Skip(itemsPerColumn))
{
<li>
<input type="checkbox" id="Jobs_Export_SubTypes_@(jobType.Id)_@(subType.Id)" name="Options.FilterJobSubTypeIds" value="@subType.Id" @((Model.Options.FilterJobTypeId == jobType.Id && Model.Options.FilterJobSubTypeIds.Contains(subType.Id)) ? "checked " : null) /><label for="Jobs_Export_SubTypes_@(jobType.Id)_@(subType.Id)">@subType.Description</label>
</li>
}
</ul>
</td>
</tr>
</table>
</div>
}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Job Queue:</th>
<td>
@Html.DropDownListFor(m => m.Options.FilterJobQueueId, m => m.JobQueues, i => i.Id.ToString(), i => i.Name, "-- All Jobs --")
</td>
</tr>
<tr>
<th>@Html.LabelFor(m => m.Options.Format)</th>
<td>
@Html.DropDownListFor(m => m.Options.Format, m => Enum.GetNames(typeof(Disco.Models.Exporting.ExportFormat)), i => i, i => i)
</td>
</tr>
</table>
</div>
<div id="Jobs_Export_Fields" class="form" style="width: 570px; margin-top: 15px;">
<h2>Export Fields <a id="Jobs_Export_Fields_Defaults" href="#">(Defaults)</a></h2>
<table>
@foreach (var optionGroup in optionGroups)
{
var optionFields = optionGroup.ToList();
var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);
<tr>
<th style="width: 120px;">
@optionGroup.Key
@if (optionFields.Count > 2)
{
<span style="display: block;" class="select"><a class="selectAll" href="#">ALL</a> | <a class="selectNone" href="#">NONE</a></span>
}
</th>
<td>
<div class="Jobs_Export_Fields_Group">
<table class="none">
<tr>
<td style="width: 50%">
<ul class="none">
@foreach (var optionItem in optionFields.Take(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
<td style="width: 50%">
<ul class="none">
@foreach (var optionItem in optionFields.Skip(itemsPerColumn))
{
<li title="@optionItem.Description">
<input type="checkbox" id="Options_@optionItem.PropertyName" name="Options.@optionItem.PropertyName" value="true" @(((bool)optionItem.Model) ? "checked " : null) /><label for="Options_@optionItem.PropertyName">@optionItem.DisplayName</label>
</li>
}
</ul>
</td>
</tr>
</table>
</div>
</td>
</tr>
}
</table>
</div>
<script>
$(function () {
const $FilterStartDate = $('#Options_FilterStartDate');
const $FilterEndDate = $('#Options_FilterEndDate');
const $FilterJobTypeId = $('#Options_FilterJobTypeId');
$FilterStartDate.attr('type', 'date');
$FilterEndDate.attr('type', 'date');
var exportDefaultFields = ['JobId', 'JobStatus', 'JobType', 'JobSubTypes', 'JobOpenedDate', 'DeviceSerialNumber', 'DeviceModelDescription', 'DeviceProfileName', 'UserId', 'UserDisplayName'];
var $exportFields = $('#Jobs_Export_Fields');
var $form = $FilterStartDate.closest('form');
function exportTypeChange() {
$exportTypeTargetContainers.hide();
$exportTypeTargetContainers.find('select').prop('disabled', true);
switch ($exportType.val()) {
case 'Batch':
$('#Devices_Export_Type_Target_Batch').show().find('select').prop('disabled', false);
break;
case 'Profile':
$('#Devices_Export_Type_Target_Profile').show().find('select').prop('disabled', false);
break;
case 'Model':
$('#Devices_Export_Type_Target_Model').show().find('select').prop('disabled', false);
break;
}
}
$FilterJobTypeId
.on('change', function (e) {
$('#Jobs_Export_SubTypes').hide()
.find('.Jobs_Export_SubType_Target').hide()
.find('input').prop('disabled', true);
const type = $(e.currentTarget).val();
if (type) {
$('#Jobs_Export_SubTypes').show()
$('#Jobs_Export_SubTypes_' + type).show()
.find('input').prop('disabled', false);
}
}).trigger('change');
$('#Jobs_Export_SubTypes').on('click', 'a.selectAll,a.selectNone', function (e) {
e.preventDefault();
var $this = $(this);
$this.closest('div').find('input').prop('checked', $this.is('.selectAll'));
return false;
});
$exportFields.on('click', 'a.selectAll,a.selectNone', function (e) {
e.preventDefault();
var $this = $(this);
$this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));
return false;
});
$('#Jobs_Export_Fields_Defaults').click(function (e) {
e.preventDefault();
$exportFields.find('input').prop('checked', false);
$.each(exportDefaultFields, function (index, value) {
$('#Options_' + value).prop('checked', true);
});
return false;
});
$.validator.unobtrusive.parse($form);
$form.data("validator").settings.submitHandler = function () {
var exportFieldCount = $exportFields.find('input:checked').length;
if (exportFieldCount > 0) {
const $exportingDialog = $('#Devices_Export_Exporting').dialog({
width: 400,
height: 164,
resizable: false,
modal: true,
autoOpen: true
});
$form[0].submit();
}
else
alert('Select at least one field to export.');
};
$('#Devices_Export_Download_Dialog').dialog({
width: 400,
height: 164,
resizable: false,
modal: true,
autoOpen: true
});
$('#Jobs_Export_Button').click(function () {
$form.submit();
});
});
</script>
}
</div>
@if (Model.ExportSessionId != null)
{
<div id="Jobs_Export_Download_Dialog" class="dialog" title="Export Jobs">
@if (Model.ExportSessionResult.RecordCount == 0)
{
<h4>No records matched the filter criteria</h4>
}
else
{
<h4>@Model.ExportSessionResult.RecordCount record@(Model.ExportSessionResult.RecordCount != 1 ? "s" : null) were successfully exported.</h4>
<a href="@Url.Action(MVC.API.Job.ExportRetrieve(Model.ExportSessionId))" class="button"><i class="fa fa-download fa-lg"></i>Download Job Export</a>
}
</div>
<script>
$(function () {
$('#Jobs_Export_Download_Dialog')
.dialog({
width: 400,
height: 164,
resizable: false,
modal: true,
autoOpen: true
});
});
</script>
}
<div id="Jobs_Export_Exporting" class="dialog" title="Exporting Jobs...">
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Exporting jobs...</h4>
</div>
<div class="actionBar">
<button id="Jobs_Export_Button" type="button" class="button">Export Jobs</button>
</div>
File diff suppressed because it is too large Load Diff
+6
View File
@@ -145,6 +145,12 @@
@Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary())
</div>
}
@if (Authorization.Has(Claims.Job.Actions.Export))
{
<div class="actionBar">
@Html.ActionLinkButton("Export Jobs", MVC.Job.Export())
</div>
}
@if (Model.PendingEnrollments != null && Model.PendingEnrollments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
{
<div id="pendingEnrollments">
+37 -5
View File
@@ -306,6 +306,38 @@ WriteLiteral("\r\n </div>\r\n");
#line hidden
#line 148 "..\..\Views\Job\Index.cshtml"
if (Authorization.Has(Claims.Job.Actions.Export))
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 151 "..\..\Views\Job\Index.cshtml"
Write(Html.ActionLinkButton("Export Jobs", MVC.Job.Export()));
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n");
#line 153 "..\..\Views\Job\Index.cshtml"
}
#line default
#line hidden
#line 154 "..\..\Views\Job\Index.cshtml"
if (Model.PendingEnrollments != null && Model.PendingEnrollments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
{
@@ -323,14 +355,14 @@ WriteLiteral(" class=\"fa fa-exclamation-circle info\"");
WriteLiteral("></i>\r\n <div>There are device enrollments pending approval.</div>\r\n " +
" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 6766), Tuple.Create("\"", 6815)
WriteAttribute("href", Tuple.Create(" href=\"", 6930), Tuple.Create("\"", 6979)
#line 153 "..\..\Views\Job\Index.cshtml"
, Tuple.Create(Tuple.Create("", 6773), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Enrolment.Status())
#line 159 "..\..\Views\Job\Index.cshtml"
, Tuple.Create(Tuple.Create("", 6937), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Enrolment.Status())
#line default
#line hidden
, 6773), false)
, 6937), false)
);
WriteLiteral(" class=\"button small alert\"");
@@ -345,7 +377,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n var layout_
" </script>\r\n");
#line 163 "..\..\Views\Job\Index.cshtml"
#line 169 "..\..\Views\Job\Index.cshtml"
}
#line default
+1 -1
View File
@@ -1,5 +1,5 @@
@model Disco.Web.Models.Job.ShowModel
@using Disco.Models.Services.Job;
@using Disco.Models.Services.Jobs;
@using Disco.Services.Users.UserFlags;
@using Disco.Services.Devices.DeviceFlags;
@{
@@ -30,7 +30,7 @@ namespace Disco.Web.Views.Job.JobParts
using Disco.Models.Repository;
#line 2 "..\..\Views\Job\JobParts\_Subject.cshtml"
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs;
#line default
#line hidden
@@ -317,14 +317,14 @@ WriteLiteral(" class=\"status\"");
WriteLiteral(">\r\n <h2");
WriteAttribute("title", Tuple.Create(" title=\"", 5822), Tuple.Create("\"", 5851)
WriteAttribute("title", Tuple.Create(" title=\"", 5823), Tuple.Create("\"", 5852)
#line 90 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 5830), Tuple.Create<System.Object, System.Int32>(Model.Job.JobType.Id
, Tuple.Create(Tuple.Create("", 5831), Tuple.Create<System.Object, System.Int32>(Model.Job.JobType.Id
#line default
#line hidden
, 5830), false)
, 5831), false)
);
WriteLiteral(">");
@@ -378,14 +378,14 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("title", Tuple.Create(" title=\"", 6439), Tuple.Create("\"", 6461)
WriteAttribute("title", Tuple.Create(" title=\"", 6440), Tuple.Create("\"", 6462)
#line 100 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 6447), Tuple.Create<System.Object, System.Int32>(jobSubType.Id
, Tuple.Create(Tuple.Create("", 6448), Tuple.Create<System.Object, System.Int32>(jobSubType.Id
#line default
#line hidden
, 6447), false)
, 6448), false)
);
WriteLiteral(">");
@@ -429,14 +429,14 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("title", Tuple.Create(" title=\"", 6899), Tuple.Create("\"", 6921)
WriteAttribute("title", Tuple.Create(" title=\"", 6900), Tuple.Create("\"", 6922)
#line 108 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 6907), Tuple.Create<System.Object, System.Int32>(jobSubType.Id
, Tuple.Create(Tuple.Create("", 6908), Tuple.Create<System.Object, System.Int32>(jobSubType.Id
#line default
#line hidden
, 6907), false)
, 6908), false)
);
WriteLiteral(">");
@@ -739,14 +739,14 @@ WriteLiteral(" id=\"Job_Show_Device_Model_Image\"");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 11534), Tuple.Create("\"", 11652)
WriteAttribute("src", Tuple.Create(" src=\"", 11535), Tuple.Create("\"", 11653)
#line 187 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 11540), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))
, Tuple.Create(Tuple.Create("", 11541), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))
#line default
#line hidden
, 11540), false)
, 11541), false)
);
WriteLiteral(" />\r\n <div");
@@ -890,17 +890,17 @@ WriteLiteral(" id=\"Job_Show_Device_Details_HWar_Details_Dialog\"");
WriteLiteral(" class=\"dialog\"");
WriteAttribute("title", Tuple.Create(" title=\"", 13356), Tuple.Create("\"", 13421)
, Tuple.Create(Tuple.Create("", 13364), Tuple.Create("Warranty", 13364), true)
, Tuple.Create(Tuple.Create(" ", 13372), Tuple.Create("Details", 13373), true)
, Tuple.Create(Tuple.Create(" ", 13380), Tuple.Create("for", 13381), true)
WriteAttribute("title", Tuple.Create(" title=\"", 13357), Tuple.Create("\"", 13422)
, Tuple.Create(Tuple.Create("", 13365), Tuple.Create("Warranty", 13365), true)
, Tuple.Create(Tuple.Create(" ", 13373), Tuple.Create("Details", 13374), true)
, Tuple.Create(Tuple.Create(" ", 13381), Tuple.Create("for", 13382), true)
#line 204 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create(" ", 13384), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
, Tuple.Create(Tuple.Create(" ", 13385), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
#line default
#line hidden
, 13385), false)
, 13386), false)
);
WriteLiteral(">\r\n <div>");
@@ -1025,17 +1025,17 @@ WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_Details_Dialog\"");
WriteLiteral(" class=\"dialog\"");
WriteAttribute("title", Tuple.Create(" title=\"", 15908), Tuple.Create("\"", 15974)
, Tuple.Create(Tuple.Create("", 15916), Tuple.Create("Insurance", 15916), true)
, Tuple.Create(Tuple.Create(" ", 15925), Tuple.Create("Details", 15926), true)
, Tuple.Create(Tuple.Create(" ", 15933), Tuple.Create("for", 15934), true)
WriteAttribute("title", Tuple.Create(" title=\"", 15909), Tuple.Create("\"", 15975)
, Tuple.Create(Tuple.Create("", 15917), Tuple.Create("Insurance", 15917), true)
, Tuple.Create(Tuple.Create(" ", 15926), Tuple.Create("Details", 15927), true)
, Tuple.Create(Tuple.Create(" ", 15934), Tuple.Create("for", 15935), true)
#line 234 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create(" ", 15937), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
, Tuple.Create(Tuple.Create(" ", 15938), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
#line default
#line hidden
, 15938), false)
, 15939), false)
);
WriteLiteral(">\r\n <div>");
@@ -1121,26 +1121,26 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 18091), Tuple.Create("\"", 18161)
, Tuple.Create(Tuple.Create("", 18099), Tuple.Create("flag", 18099), true)
, Tuple.Create(Tuple.Create(" ", 18103), Tuple.Create("fa", 18104), true)
, Tuple.Create(Tuple.Create(" ", 18106), Tuple.Create("fa-", 18107), true)
WriteAttribute("class", Tuple.Create(" class=\"", 18092), Tuple.Create("\"", 18162)
, Tuple.Create(Tuple.Create("", 18100), Tuple.Create("flag", 18100), true)
, Tuple.Create(Tuple.Create(" ", 18104), Tuple.Create("fa", 18105), true)
, Tuple.Create(Tuple.Create(" ", 18107), Tuple.Create("fa-", 18108), true)
#line 263 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 18110), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
, Tuple.Create(Tuple.Create("", 18111), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
#line default
#line hidden
, 18110), false)
, Tuple.Create(Tuple.Create(" ", 18128), Tuple.Create("fa-fw", 18129), true)
, Tuple.Create(Tuple.Create(" ", 18134), Tuple.Create("d-", 18135), true)
, 18111), false)
, Tuple.Create(Tuple.Create(" ", 18129), Tuple.Create("fa-fw", 18130), true)
, Tuple.Create(Tuple.Create(" ", 18135), Tuple.Create("d-", 18136), true)
#line 263 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 18137), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
, Tuple.Create(Tuple.Create("", 18138), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
#line default
#line hidden
, 18137), false)
, 18138), false)
);
WriteLiteral(">\r\n <span");
@@ -1735,14 +1735,14 @@ WriteLiteral(">\r\n <img");
WriteLiteral(" id=\"Job_Show_User_Photo\"");
WriteAttribute("src", Tuple.Create(" src=\"", 33689), Tuple.Create("\"", 33744)
WriteAttribute("src", Tuple.Create(" src=\"", 33690), Tuple.Create("\"", 33745)
#line 481 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 33695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.Photo(Model.Job.UserId))
, Tuple.Create(Tuple.Create("", 33696), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.Photo(Model.Job.UserId))
#line default
#line hidden
, 33695), false)
, 33696), false)
);
WriteLiteral(" />\r\n </div>\r\n");
@@ -1844,15 +1844,15 @@ WriteLiteral(" title=\"Phone Number\"");
WriteLiteral(">Phone: <a");
WriteAttribute("href", Tuple.Create(" href=\"", 34522), Tuple.Create("\"", 34560)
, Tuple.Create(Tuple.Create("", 34529), Tuple.Create("tel:", 34529), true)
WriteAttribute("href", Tuple.Create(" href=\"", 34523), Tuple.Create("\"", 34561)
, Tuple.Create(Tuple.Create("", 34530), Tuple.Create("tel:", 34530), true)
#line 494 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 34533), Tuple.Create<System.Object, System.Int32>(Model.Job.User.PhoneNumber
, Tuple.Create(Tuple.Create("", 34534), Tuple.Create<System.Object, System.Int32>(Model.Job.User.PhoneNumber
#line default
#line hidden
, 34533), false)
, 34534), false)
);
WriteLiteral(">");
@@ -1882,15 +1882,15 @@ WriteLiteral(" title=\"Email Address\"");
WriteLiteral(">Email: <a");
WriteAttribute("href", Tuple.Create(" href=\"", 34773), Tuple.Create("\"", 34817)
, Tuple.Create(Tuple.Create("", 34780), Tuple.Create("mailto:", 34780), true)
WriteAttribute("href", Tuple.Create(" href=\"", 34774), Tuple.Create("\"", 34818)
, Tuple.Create(Tuple.Create("", 34781), Tuple.Create("mailto:", 34781), true)
#line 496 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 34787), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
, Tuple.Create(Tuple.Create("", 34788), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
#line default
#line hidden
, 34787), false)
, 34788), false)
);
WriteLiteral(">");
@@ -1944,26 +1944,26 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 35292), Tuple.Create("\"", 35362)
, Tuple.Create(Tuple.Create("", 35300), Tuple.Create("flag", 35300), true)
, Tuple.Create(Tuple.Create(" ", 35304), Tuple.Create("fa", 35305), true)
, Tuple.Create(Tuple.Create(" ", 35307), Tuple.Create("fa-", 35308), true)
WriteAttribute("class", Tuple.Create(" class=\"", 35293), Tuple.Create("\"", 35363)
, Tuple.Create(Tuple.Create("", 35301), Tuple.Create("flag", 35301), true)
, Tuple.Create(Tuple.Create(" ", 35305), Tuple.Create("fa", 35306), true)
, Tuple.Create(Tuple.Create(" ", 35308), Tuple.Create("fa-", 35309), true)
#line 503 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35311), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
, Tuple.Create(Tuple.Create("", 35312), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
#line default
#line hidden
, 35311), false)
, Tuple.Create(Tuple.Create(" ", 35329), Tuple.Create("fa-fw", 35330), true)
, Tuple.Create(Tuple.Create(" ", 35335), Tuple.Create("d-", 35336), true)
, 35312), false)
, Tuple.Create(Tuple.Create(" ", 35330), Tuple.Create("fa-fw", 35331), true)
, Tuple.Create(Tuple.Create(" ", 35336), Tuple.Create("d-", 35337), true)
#line 503 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35338), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
, Tuple.Create(Tuple.Create("", 35339), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
#line default
#line hidden
, 35338), false)
, 35339), false)
);
WriteLiteral(">\r\n <span");
@@ -2722,14 +2722,14 @@ WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"JobId\"");
WriteAttribute("value", Tuple.Create(" value=\"", 50881), Tuple.Create("\"", 50902)
WriteAttribute("value", Tuple.Create(" value=\"", 50882), Tuple.Create("\"", 50903)
#line 780 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 50889), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
, Tuple.Create(Tuple.Create("", 50890), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
#line default
#line hidden
, 50889), false)
, 50890), false)
);
WriteLiteral(" />\r\n");
@@ -2793,26 +2793,26 @@ WriteLiteral("\"");
WriteLiteral(">\r\n <i");
WriteAttribute("class", Tuple.Create(" class=\"", 51371), Tuple.Create("\"", 51438)
, Tuple.Create(Tuple.Create("", 51379), Tuple.Create("fa", 51379), true)
, Tuple.Create(Tuple.Create(" ", 51381), Tuple.Create("fa-", 51382), true)
WriteAttribute("class", Tuple.Create(" class=\"", 51372), Tuple.Create("\"", 51439)
, Tuple.Create(Tuple.Create("", 51380), Tuple.Create("fa", 51380), true)
, Tuple.Create(Tuple.Create(" ", 51382), Tuple.Create("fa-", 51383), true)
#line 785 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 51385), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
, Tuple.Create(Tuple.Create("", 51386), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
#line default
#line hidden
, 51385), false)
, Tuple.Create(Tuple.Create(" ", 51401), Tuple.Create("fa-fw", 51402), true)
, Tuple.Create(Tuple.Create(" ", 51407), Tuple.Create("fa-lg", 51408), true)
, Tuple.Create(Tuple.Create(" ", 51413), Tuple.Create("d-", 51414), true)
, 51386), false)
, Tuple.Create(Tuple.Create(" ", 51402), Tuple.Create("fa-fw", 51403), true)
, Tuple.Create(Tuple.Create(" ", 51408), Tuple.Create("fa-lg", 51409), true)
, Tuple.Create(Tuple.Create(" ", 51414), Tuple.Create("d-", 51415), true)
#line 785 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 51416), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
, Tuple.Create(Tuple.Create("", 51417), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
#line default
#line hidden
, 51416), false)
, 51417), false)
);
WriteLiteral("></i>");
@@ -2853,27 +2853,27 @@ WriteLiteral(" ");
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 51835), Tuple.Create("\"", 51883)
, Tuple.Create(Tuple.Create("", 51843), Tuple.Create("fa", 51843), true)
, Tuple.Create(Tuple.Create(" ", 51845), Tuple.Create("d-priority-", 51846), true)
WriteAttribute("class", Tuple.Create(" class=\"", 51836), Tuple.Create("\"", 51884)
, Tuple.Create(Tuple.Create("", 51844), Tuple.Create("fa", 51844), true)
, Tuple.Create(Tuple.Create(" ", 51846), Tuple.Create("d-priority-", 51847), true)
#line 792 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 51857), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
, Tuple.Create(Tuple.Create("", 51858), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
#line default
#line hidden
, 51857), false)
, 51858), false)
);
WriteAttribute("title", Tuple.Create(" title=\"", 51884), Tuple.Create("\"", 51917)
WriteAttribute("title", Tuple.Create(" title=\"", 51885), Tuple.Create("\"", 51918)
#line 792 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 51892), Tuple.Create<System.Object, System.Int32>(priorityValue
, Tuple.Create(Tuple.Create("", 51893), Tuple.Create<System.Object, System.Int32>(priorityValue
#line default
#line hidden
, 51892), false)
, Tuple.Create(Tuple.Create(" ", 51908), Tuple.Create("Priority", 51909), true)
, 51893), false)
, Tuple.Create(Tuple.Create(" ", 51909), Tuple.Create("Priority", 51910), true)
);
WriteLiteral("></i>\r\n </div>\r\n <div>\r\n " +