Feature #37: Stale Jobs

Stale Jobs replaces Long-Running Jobs on the homepage. Last Activity is
added to the job table.
This commit is contained in:
Gary Sharp
2014-02-13 22:17:49 +11:00
parent 2ac3a9bdd3
commit 68256d7abd
30 changed files with 881 additions and 330 deletions
+11 -8
View File
@@ -373,15 +373,18 @@ namespace Disco.BI.Extensions
if (j.WaitingForUserAction.HasValue)
return true; // Job waiting on User Action
if (IgnoreJobQueueJob == null)
if (j.JobQueues != null)
{
if (j.JobQueues.Any(jqj => !jqj.RemovedDate.HasValue))
return true; // Job associated with a Job Queue
}
else
{
if (j.JobQueues.Any(jqj => jqj.Id != IgnoreJobQueueJob.Id && !jqj.RemovedDate.HasValue))
return true; // Job associated with a Job Queue
if (IgnoreJobQueueJob == null)
{
if (j.JobQueues.Any(jqj => !jqj.RemovedDate.HasValue))
return true; // Job associated with a Job Queue
}
else
{
if (j.JobQueues.Any(jqj => jqj.Id != IgnoreJobQueueJob.Id && !jqj.RemovedDate.HasValue))
return true; // Job associated with a Job Queue
}
}
return false;
@@ -27,5 +27,20 @@ namespace Disco.Data.Configuration.Modules
Set(value);
}
}
/// <summary>
/// Number of minutes since the last recorded action is performed on a job before it is considered 'Stale'
/// </summary>
public int StaleJobMinutesThreshold
{
get { return Get<int>(60 * 24 * 2); } // Default to 48 Hours (2 days)
set
{
if (value < 0)
throw new ArgumentOutOfRangeException("value", "The Stale Job Minutes Threshold cannot be less than zero");
Set(value);
}
}
}
}
@@ -35,5 +35,6 @@ namespace Disco.Models.Services.Jobs.JobLists
public string StatusId { get; set; }
public string DeviceHeldLocation { get; set; }
public Disco.Models.Repository.Job.UserManagementFlags? Flags { get; set; }
public DateTime LastActivityDate { get; set; }
}
}
@@ -13,7 +13,8 @@ namespace Disco.Models.Services.Jobs.JobLists
public bool ShowTechnician { get; set; }
public bool ShowLocation { get; set; }
public bool ShowStatus { get; set; }
public bool ShowLastActivityDate { get; set; }
public bool IsSmallTable { get; set; }
public bool HideClosedJobs { get; set; }
public bool EnablePaging { get; set; }
@@ -14,6 +14,9 @@ namespace Disco.Models.Services.Jobs.JobLists
public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; }
public DateTime? JobMetaNonWarranty_PurchaseOrderRaisedDate { get; set; }
public DateTime? JobMetaNonWarranty_PurchaseOrderSentDate { get; set; }
public DateTime? JobMetaNonWarranty_InvoiceReceivedDate { get; set; }
public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; }
public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; }
@@ -25,5 +28,8 @@ namespace Disco.Models.Services.Jobs.JobLists
public string JobMetaNonWarranty_RepairerName { get; set; }
public IEnumerable<JobTableStatusQueueItemModel> ActiveJobQueues { get; set; }
public DateTime? RecentLogDate { get; set; }
public DateTime? RecentAttachmentDate { get; set; }
}
}
@@ -9,7 +9,9 @@ namespace Disco.Models.UI.Config.JobPreferences
public interface ConfigJobPreferencesIndexModel : BaseUIModel
{
int LongRunningJobDaysThreshold { get; set; }
int StaleJobMinutesThreshold { get; set; }
List<KeyValuePair<int, string>> LongRunningJobDaysThresholdOptions();
List<KeyValuePair<int, string>> StaleJobMinutesThresholdOptions();
}
}
+1 -1
View File
@@ -5,6 +5,6 @@ namespace Disco.Models.UI.Job
public interface JobIndexModel : BaseUIModel
{
JobTableModel MyJobs { get; set; }
JobTableModel LongRunningJobs { get; set; }
JobTableModel StaleJobs { get; set; }
}
}
+9 -1
View File
@@ -89,6 +89,7 @@ namespace Disco.Services.Authorization
{ "Job.Lists.MyJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.MyJobs, (c, v) => c.Job.Lists.MyJobs = v, "My Jobs List", "Can show list", false) },
{ "Job.Lists.MyJobsOrphaned", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.MyJobsOrphaned, (c, v) => c.Job.Lists.MyJobsOrphaned = v, "My Jobs List (Includes No Queue)", "Can show list", false) },
{ "Job.Lists.RecentlyClosed", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.RecentlyClosed, (c, v) => c.Job.Lists.RecentlyClosed = v, "Recently Closed List", "Can show list", false) },
{ "Job.Lists.StaleJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.StaleJobs, (c, v) => c.Job.Lists.StaleJobs = v, "Stale Jobs List", "Can show list", false) },
{ "Job.Actions.AddAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddAttachments, (c, v) => c.Job.Actions.AddAttachments = v, "Add Attachments", "Can add attachments to jobs", false) },
{ "Job.Actions.AddLogs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddLogs, (c, v) => c.Job.Actions.AddLogs = v, "Add Logs", "Can add job logs", false) },
{ "Job.Actions.AddAnyQueues", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddAnyQueues, (c, v) => c.Job.Actions.AddAnyQueues = v, "Add to Any Queues", "Can add to any job queues", false) },
@@ -373,7 +374,8 @@ namespace Disco.Services.Authorization
new ClaimNavigatorItem("Job.Lists.LongRunningJobs", false),
new ClaimNavigatorItem("Job.Lists.MyJobs", false),
new ClaimNavigatorItem("Job.Lists.MyJobsOrphaned", false),
new ClaimNavigatorItem("Job.Lists.RecentlyClosed", false)
new ClaimNavigatorItem("Job.Lists.RecentlyClosed", false),
new ClaimNavigatorItem("Job.Lists.StaleJobs", false)
}),
new ClaimNavigatorItem("Job.Types", "Types", "Permissions related to Job Types", false, new List<IClaimNavigatorItem>() {
new ClaimNavigatorItem("Job.Types.CreateHMisc", false),
@@ -579,6 +581,7 @@ namespace Disco.Services.Authorization
c.Job.Lists.MyJobs = true;
c.Job.Lists.MyJobsOrphaned = true;
c.Job.Lists.RecentlyClosed = true;
c.Job.Lists.StaleJobs = true;
c.Job.Actions.AddAttachments = true;
c.Job.Actions.AddLogs = true;
c.Job.Actions.AddAnyQueues = true;
@@ -1137,6 +1140,11 @@ namespace Disco.Services.Authorization
/// <para>Can show list</para>
/// </summary>
public const string RecentlyClosed = "Job.Lists.RecentlyClosed";
/// <summary>Stale Jobs List
/// <para>Can show list</para>
/// </summary>
public const string StaleJobs = "Job.Lists.StaleJobs";
}
/// <summary>Actions
@@ -21,6 +21,8 @@ namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
public bool AwaitingTechnicianAction { get; set; }
[ClaimDetails("Long Running Jobs List", "Can show list")]
public bool LongRunningJobs { get; set; }
[ClaimDetails("Stale Jobs List", "Can show list")]
public bool StaleJobs { get; set; }
[ClaimDetails("All Open List", "Can show list")]
public bool AllOpen { get; set; }
@@ -26,6 +26,7 @@ namespace Disco.Services
ShowTechnician = Model.ShowTechnician,
ShowLocation = Model.ShowLocation,
ShowStatus = Model.ShowStatus,
ShowLastActivityDate = Model.ShowLastActivityDate,
IsSmallTable = Model.IsSmallTable,
HideClosedJobs = Model.HideClosedJobs,
EnablePaging = Model.EnablePaging,
@@ -115,7 +116,7 @@ namespace Disco.Services
if (FilterAuthorization)
Jobs = model.FilterPermissions(Jobs, UserService.CurrentAuthorization);
if (model.ShowStatus)
if (model.ShowStatus || model.ShowLastActivityDate)
{
var jobItems = Jobs.Select(j => new JobTableStatusItemModel()
@@ -147,6 +148,12 @@ namespace Disco.Services
JobMetaNonWarranty_AccountingChargeRequiredDate = j.JobMetaNonWarranty.AccountingChargeRequiredDate,
JobMetaNonWarranty_IsInsuranceClaim = j.JobMetaNonWarranty.IsInsuranceClaim,
JobMetaInsurance_ClaimFormSentDate = j.JobMetaInsurance.ClaimFormSentDate,
JobMetaNonWarranty_InvoiceReceivedDate = j.JobMetaNonWarranty.InvoiceReceivedDate,
JobMetaNonWarranty_PurchaseOrderRaisedDate = j.JobMetaNonWarranty.PurchaseOrderRaisedDate,
JobMetaNonWarranty_PurchaseOrderSentDate = j.JobMetaNonWarranty.PurchaseOrderSentDate,
RecentAttachmentDate = j.JobAttachments.Max(ja => ja.Timestamp),
RecentLogDate = j.JobLogs.Max(jl => jl.Timestamp),
WaitingForUserAction = j.WaitingForUserAction,
DeviceReadyForReturn = j.DeviceReadyForReturn,
@@ -170,6 +177,31 @@ namespace Disco.Services
j.StatusId = j.CalculateStatusId();
j.StatusDescription = JobExtensions.JobStatusDescription(j.StatusId, j);
var activityDates = new DateTime?[] {
j.ActiveJobQueues.Max<JobTableStatusQueueItemModel, DateTime?>(jq => jq.AddedDate),
j.ClosedDate,
j.DeviceHeld,
j.DeviceReadyForReturn,
j.DeviceReturnedDate,
j.JobMetaInsurance_ClaimFormSentDate,
j.JobMetaNonWarranty_AccountingChargeAddedDate,
j.JobMetaNonWarranty_AccountingChargePaidDate,
j.JobMetaNonWarranty_AccountingChargeRequiredDate,
j.JobMetaNonWarranty_InvoiceReceivedDate,
j.JobMetaNonWarranty_PurchaseOrderRaisedDate,
j.JobMetaNonWarranty_PurchaseOrderSentDate,
j.JobMetaNonWarranty_RepairerCompletedDate,
j.JobMetaNonWarranty_RepairerLoggedDate,
j.JobMetaWarranty_ExternalCompletedDate,
j.JobMetaWarranty_ExternalLoggedDate,
j.OpenedDate,
j.RecentAttachmentDate,
j.RecentLogDate,
j.WaitingForUserAction
};
j.LastActivityDate = activityDates.Max().Value;
items.Add(j);
}
}
@@ -132,6 +132,8 @@ using Disco.Services.Authorization;
// - Device's Profile or Model Changes
unsubscribeToken = RepositoryMonitor.StreamAfterCommit
.Where(n => n.EntityType == typeof(Job) ||
n.EntityType == typeof(JobLog) ||
n.EntityType == typeof(JobAttachment) ||
n.EntityType == typeof(JobQueueJob) ||
n.EntityType == typeof(JobMetaWarranty) ||
n.EntityType == typeof(JobMetaNonWarranty) ||
@@ -186,6 +188,32 @@ using Disco.Services.Authorization;
if (e.EntityType == typeof(Job))
jobIds = new List<int>() { ((Job)e.Entity).Id };
else if (e.EntityType == typeof(JobLog))
{
if (e.EventType == RepositoryMonitorEventType.Added)
{
var jobLog = ((JobLog)e.Entity);
var job = base.Items.FirstOrDefault(i => i.JobId == jobLog.JobId);
if (job != null && job.LastActivityDate < jobLog.Timestamp)
job.LastActivityDate = jobLog.Timestamp;
return;
}
else
jobIds = new List<int>() { ((JobLog)e.Entity).JobId };
}
else if (e.EntityType == typeof(JobAttachment))
{
if (e.EventType == RepositoryMonitorEventType.Added)
{
var jobAttachment = ((JobAttachment)e.Entity);
var job = base.Items.FirstOrDefault(i => i.JobId == jobAttachment.JobId);
if (job != null && job.LastActivityDate < jobAttachment.Timestamp)
job.LastActivityDate = jobAttachment.Timestamp;
return;
}
else
jobIds = new List<int>() { ((JobAttachment)e.Entity).JobId };
}
else if (e.EntityType == typeof(JobQueueJob))
jobIds = new List<int>() { ((JobQueueJob)e.Entity).JobId };
else if (e.EntityType == typeof(JobMetaWarranty))
@@ -10,8 +10,6 @@ namespace Disco.Web.Areas.API.Controllers
{
public partial class JobPreferencesController : AuthorizedDatabaseController
{
const string pLongRunningJobDaysThreshold = "longrunningjobdaysthreshold";
[DiscoAuthorize(Claims.Config.JobPreferences.Configure)]
public virtual ActionResult UpdateLongRunningJobDaysThreshold(int LongRunningJobDaysThreshold, bool redirect = false)
{
@@ -24,5 +22,16 @@ namespace Disco.Web.Areas.API.Controllers
return Json("OK", JsonRequestBehavior.AllowGet);
}
[DiscoAuthorize(Claims.Config.JobPreferences.Configure)]
public virtual ActionResult UpdateStaleJobMinutesThreshold(int StaleJobMinutesThreshold, bool redirect = false)
{
Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold = StaleJobMinutesThreshold;
Database.SaveChanges();
if (redirect)
return RedirectToAction(MVC.Config.JobPreferences.Index());
else
return Json("OK", JsonRequestBehavior.AllowGet);
}
}
}
@@ -17,7 +17,8 @@ namespace Disco.Web.Areas.Config.Controllers
{
var m = new Models.JobPreferences.IndexModel()
{
LongRunningJobDaysThreshold = Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold
LongRunningJobDaysThreshold = Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold,
StaleJobMinutesThreshold = Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold
};
// UI Extensions
@@ -10,6 +10,7 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
public class IndexModel : ConfigJobPreferencesIndexModel
{
public int LongRunningJobDaysThreshold { get; set; }
public int StaleJobMinutesThreshold { get; set; }
public List<KeyValuePair<int, string>> LongRunningJobDaysThresholdOptions()
{
@@ -39,5 +40,41 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
return options;
}
public List<KeyValuePair<int, string>> StaleJobMinutesThresholdOptions()
{
var options = new List<KeyValuePair<int, string>>() {
new KeyValuePair<int, string>(0, "<None>"),
new KeyValuePair<int, string>(15, "15 minutes"),
new KeyValuePair<int, string>(30, "30 minutes"),
new KeyValuePair<int, string>(60, "1 hour"),
new KeyValuePair<int, string>(60 * 2, "2 hours"),
new KeyValuePair<int, string>(60 * 4, "4 hours"),
new KeyValuePair<int, string>(60 * 8, "8 hours"),
new KeyValuePair<int, string>(60 * 24, "1 day"),
new KeyValuePair<int, string>(60 * 24 * 2, "2 days"),
new KeyValuePair<int, string>(60 * 24 * 3, "3 days"),
new KeyValuePair<int, string>(60 * 24 * 4, "4 days"),
new KeyValuePair<int, string>(60 * 24 * 5, "5 days"),
new KeyValuePair<int, string>(60 * 24 * 6, "6 days"),
new KeyValuePair<int, string>(60 * 24 * 7, "1 week"),
new KeyValuePair<int, string>(60 * 24 * 7 * 2, "2 weeks"),
new KeyValuePair<int, string>(60 * 24 * 7 * 3, "3 weeks"),
new KeyValuePair<int, string>(60 * 24 * 7 * 4, "4 weeks"),
new KeyValuePair<int, string>(60 * 24 * 7 * 5, "5 weeks"),
new KeyValuePair<int, string>(60 * 24 * 7 * 6, "6 weeks"),
new KeyValuePair<int, string>(60 * 24 * 7 * 7, "7 weeks"),
new KeyValuePair<int, string>(60 * 24 * 7 * 8, "8 weeks")
};
var current = this.StaleJobMinutesThreshold;
if (!options.Any(o => o.Key == current))
{
options.Add(new KeyValuePair<int, string>(current, string.Format("{0} Minutes", current)));
options = options.OrderBy(o => o.Key).ToList();
}
return options;
}
}
}
@@ -40,6 +40,35 @@
<div class="smallMessage">
Jobs which have been open for longer than the threshold are considered 'long-running' and will appear in the <code>Long Running Jobs</code> list.
</div>
@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) { @Html.ActionLinkSmallButton("Show Long Running Jobs", MVC.Job.LongRunning()) }
</td>
</tr>
<tr>
<th style="width: 200px">Stale Threshold:
</th>
<td>@if (canConfig)
{
@Html.DropDownListFor(model => model.StaleJobMinutesThreshold, Model.StaleJobMinutesThresholdOptions().Select(o => new SelectListItem() { Value = o.Key.ToString(), Text = o.Value }))
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#StaleJobMinutesThreshold'),
null,
'@(Url.Action(MVC.API.JobPreferences.UpdateStaleJobMinutesThreshold()))',
'StaleJobMinutesThreshold');
});
</script>
}
else
{
@Model.StaleJobMinutesThresholdOptions().First(o => o.Key == Model.StaleJobMinutesThreshold).Value
}
<div class="smallMessage">
Jobs which have no recoded action for longer than the threshold are considered 'stale' and will appear in the <code>Stale Jobs</code> list.
</div>
@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) { @Html.ActionLinkSmallButton("Show Stale Jobs", MVC.Job.Stale()) }
</td>
</tr>
</table>
@@ -29,6 +29,7 @@ namespace Disco.Web.Areas.Config.Views.JobPreferences
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -171,8 +172,167 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">\r\n Jobs which have been open for longer than the threshold ar" +
"e considered \'long-running\' and will appear in the <code>Long Running Jobs</code" +
"> list.\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r" +
"\n</div>\r\n");
"> list.\r\n </div>\r\n");
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) {
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.ActionLinkSmallButton("Show Long Running Jobs", MVC.Job.LongRunning()));
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px\"");
WriteLiteral(">Stale Threshold:\r\n </th>\r\n <td>");
#line 49 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (canConfig)
{
#line default
#line hidden
#line 51 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.DropDownListFor(model => model.StaleJobMinutesThreshold, Model.StaleJobMinutesThresholdOptions().Select(o => new SelectListItem() { Value = o.Key.ToString(), Text = o.Value })));
#line default
#line hidden
#line 51 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 53 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 53 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n $(\'#StaleJobMinutesThr" +
"eshold\'),\r\n null,\r\n \'");
#line 59 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Url.Action(MVC.API.JobPreferences.UpdateStaleJobMinutesThreshold()));
#line default
#line hidden
WriteLiteral("\',\r\n \'StaleJobMinutesThreshold\');\r\n " +
" });\r\n </script>\r\n");
#line 63 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
else
{
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Model.StaleJobMinutesThresholdOptions().First(o => o.Key == Model.StaleJobMinutesThreshold).Value);
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">\r\n Jobs which have no recoded action for longer than the thre" +
"shold are considered \'stale\' and will appear in the <code>Stale Jobs</code> list" +
".\r\n </div>\r\n");
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) {
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
Write(Html.ActionLinkSmallButton("Show Stale Jobs", MVC.Job.Stale()));
#line default
#line hidden
#line 71 "..\..\Areas\Config\Views\JobPreferences\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
}
}
@@ -4044,6 +4044,10 @@ table.jobTable div.queues {
display: inline-block;
float: right;
}
table.jobTable td.lastActive,
table.jobTable th.lastActive {
width: 130px;
}
table.jobTable td.dates,
table.jobTable th.dates {
width: 130px;
File diff suppressed because one or more lines are too long
+4
View File
@@ -843,6 +843,10 @@ table.jobTable div.queues {
display: inline-block;
float: right;
}
table.jobTable td.lastActive,
table.jobTable th.lastActive {
width: 130px;
}
table.jobTable td.dates,
table.jobTable th.dates {
width: 130px;
+4
View File
@@ -800,6 +800,10 @@ table.jobTable {
float: right;
}
td.lastActive, th.lastActive {
width: 130px;
}
td.dates, th.dates {
width: 130px;
}
File diff suppressed because one or more lines are too long
+35 -3
View File
@@ -31,10 +31,12 @@ namespace Disco.Web.Controllers
if (Authorization.Has(Claims.Job.Lists.MyJobs))
m.MyJobs = ManagedJobList.MyJobsTable(Authorization);
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
if (Authorization.Has(Claims.Job.Lists.StaleJobs))
{
var longRunningThreshold = DateTime.Today.AddDays(Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold * -1);
m.LongRunningJobs = ManagedJobList.OpenJobsTable(q => q.Where(j => j.OpenedDate < longRunningThreshold).OrderBy(j => j.JobId));
var staleThreshold = DateTime.Today.AddMinutes(Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold * -1);
m.StaleJobs = ManagedJobList.OpenJobsTable(q => q.Where(j => j.LastActivityDate < staleThreshold).OrderBy(j => j.LastActivityDate));
m.StaleJobs.ShowLastActivityDate = true;
m.StaleJobs.ShowDates = false;
}
if (Authorization.Has(Claims.Job.ShowDailyChart))
m.DailyOpenedClosedStatistics = Disco.BI.JobBI.Statistics.DailyOpenedClosed.Data(Database, true);
@@ -248,6 +250,36 @@ namespace Disco.Web.Controllers
return View(Views.List, m);
}
[DiscoAuthorize(Claims.Job.Lists.LongRunningJobs)]
public virtual ActionResult LongRunning()
{
var m = new Models.Job.ListModel() { Title = "Long Running Jobs" };
var longRunningThreshold = DateTime.Today.AddDays(Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold * -1);
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.OpenedDate < longRunningThreshold).OrderBy(j => j.JobId));
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m);
}
[DiscoAuthorize(Claims.Job.Lists.StaleJobs)]
public virtual ActionResult Stale()
{
var m = new Models.Job.ListModel() { Title = "Stale Jobs" };
var staleThreshold = DateTime.Today.AddMinutes(Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold * -1);
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.LastActivityDate < staleThreshold).OrderBy(j => j.LastActivityDate));
m.JobTable.ShowLastActivityDate = true;
m.JobTable.ShowDates = false;
// UI Extensions
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
return View(Views.List, m);
}
#endregion
#region Show
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Disco.Web.Models.Job
public class IndexModel : JobIndexModel
{
public JobTableModel MyJobs { get; set; }
public JobTableModel LongRunningJobs { get; set; }
public JobTableModel StaleJobs { get; set; }
public List<Disco.Models.BI.Job.Statistics.DailyOpenedClosedItem> DailyOpenedClosedStatistics { get; set; }
}
+51
View File
@@ -159,6 +159,7 @@ namespace Links
public static readonly string jquery_validate_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.validate.min.js") ? Url("jquery.validate.min.js") : Url("jquery.validate.js");
public static readonly string jquery_validate_unobtrusive_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.validate.unobtrusive.min.js") ? Url("jquery.validate.unobtrusive.min.js") : Url("jquery.validate.unobtrusive.js");
public static readonly string jquery_watermark_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.watermark.min.js") ? Url("jquery.watermark.min.js") : Url("jquery.watermark.js");
public static readonly string livestamp_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/livestamp.min.js") ? Url("livestamp.min.js") : Url("livestamp.js");
public static readonly string modernizr_2_6_2_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/modernizr-2.6.2.min.js") ? Url("modernizr-2.6.2.min.js") : Url("modernizr-2.6.2.js");
public static readonly string moment_en_au_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/moment.en-au.min.js") ? Url("moment.en-au.min.js") : Url("moment.en-au.js");
public static readonly string moment_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/moment.min.js") ? Url("moment.min.js") : Url("moment.js");
@@ -1377,6 +1378,8 @@ namespace Disco.Web.Controllers
public readonly string AwaitingUserAction = "AwaitingUserAction";
public readonly string RecentlyClosed = "RecentlyClosed";
public readonly string Locations = "Locations";
public readonly string LongRunning = "LongRunning";
public readonly string Stale = "Stale";
public readonly string Show = "Show";
public readonly string Create = "Create";
public readonly string LogWarranty = "LogWarranty";
@@ -1400,6 +1403,8 @@ namespace Disco.Web.Controllers
public const string AwaitingUserAction = "AwaitingUserAction";
public const string RecentlyClosed = "RecentlyClosed";
public const string Locations = "Locations";
public const string LongRunning = "LongRunning";
public const string Stale = "Stale";
public const string Show = "Show";
public const string Create = "Create";
public const string LogWarranty = "LogWarranty";
@@ -1654,6 +1659,24 @@ namespace Disco.Web.Controllers
return callInfo;
}
partial void LongRunningOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
public override System.Web.Mvc.ActionResult LongRunning()
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.LongRunning);
LongRunningOverride(callInfo);
return callInfo;
}
partial void StaleOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
public override System.Web.Mvc.ActionResult Stale()
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Stale);
StaleOverride(callInfo);
return callInfo;
}
partial void ShowOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int? id);
public override System.Web.Mvc.ActionResult Show(int? id)
@@ -7666,6 +7689,12 @@ namespace Disco.Web.Areas.API.Controllers
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLongRunningJobDaysThreshold);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult UpdateStaleJobMinutesThreshold()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateStaleJobMinutesThreshold);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public JobPreferencesController Actions { get { return MVC.API.JobPreferences; } }
@@ -7683,12 +7712,14 @@ namespace Disco.Web.Areas.API.Controllers
public class ActionNamesClass
{
public readonly string UpdateLongRunningJobDaysThreshold = "UpdateLongRunningJobDaysThreshold";
public readonly string UpdateStaleJobMinutesThreshold = "UpdateStaleJobMinutesThreshold";
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionNameConstants
{
public const string UpdateLongRunningJobDaysThreshold = "UpdateLongRunningJobDaysThreshold";
public const string UpdateStaleJobMinutesThreshold = "UpdateStaleJobMinutesThreshold";
}
@@ -7701,6 +7732,15 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string LongRunningJobDaysThreshold = "LongRunningJobDaysThreshold";
public readonly string redirect = "redirect";
}
static readonly ActionParamsClass_UpdateStaleJobMinutesThreshold s_params_UpdateStaleJobMinutesThreshold = new ActionParamsClass_UpdateStaleJobMinutesThreshold();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_UpdateStaleJobMinutesThreshold UpdateStaleJobMinutesThresholdParams { get { return s_params_UpdateStaleJobMinutesThreshold; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_UpdateStaleJobMinutesThreshold
{
public readonly string StaleJobMinutesThreshold = "StaleJobMinutesThreshold";
public readonly string redirect = "redirect";
}
static readonly ViewsClass s_views = new ViewsClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewsClass Views { get { return s_views; } }
@@ -7731,6 +7771,17 @@ namespace Disco.Web.Areas.API.Controllers
return callInfo;
}
partial void UpdateStaleJobMinutesThresholdOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int StaleJobMinutesThreshold, bool redirect);
public override System.Web.Mvc.ActionResult UpdateStaleJobMinutesThreshold(int StaleJobMinutesThreshold, bool redirect)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateStaleJobMinutesThreshold);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "StaleJobMinutesThreshold", StaleJobMinutesThreshold);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
UpdateStaleJobMinutesThresholdOverride(callInfo, StaleJobMinutesThreshold, redirect);
return callInfo;
}
}
}
+2 -2
View File
@@ -131,6 +131,6 @@
}
@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
{
<h2>Long Running Jobs (@Model.LongRunningJobs.Items.Count())</h2>
@Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary())
<h2>Stale Jobs (@Model.StaleJobs.Items.Count())</h2>
@Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary())
}
+4 -4
View File
@@ -266,11 +266,11 @@ Write(Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDiction
#line default
#line hidden
WriteLiteral(" <h2>Long Running Jobs (");
WriteLiteral(" <h2>Stale Jobs (");
#line 134 "..\..\Views\Job\Index.cshtml"
Write(Model.LongRunningJobs.Items.Count());
Write(Model.StaleJobs.Items.Count());
#line default
@@ -285,14 +285,14 @@ WriteLiteral(")</h2>\r\n");
#line hidden
#line 135 "..\..\Views\Job\Index.cshtml"
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary()));
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary()));
#line default
#line hidden
#line 135 "..\..\Views\Job\Index.cshtml"
}
#line default
@@ -15,6 +15,9 @@
@if (Model.ShowStatus)
{ <th class="status">Status
</th> }
@if (Model.ShowLastActivityDate)
{ <th class="lastActive">Last Active
</th> }
@if (Model.ShowDates)
{ <th class="dates">When
</th> }
@@ -74,6 +77,8 @@
}
</div>}
</td>}
@if (Model.ShowLastActivityDate)
{<td class="lastActive">@CommonHelpers.FriendlyDate(item.LastActivityDate)</td>}
@if (Model.ShowDates)
{<td class="dates">@if (item.ClosedDate.HasValue)
{@CommonHelpers.FriendlyDate(item.ClosedDate.Value)}
@@ -106,7 +111,7 @@
@if (Model.ShowTechnician)
{<td class="technician"><span title="@item.OpenedTechUserDisplayName">@item.OpenedTechUserId</span></td>}
@if (Model.ShowLocation)
{<td class="technician"><span>@(item.DeviceHeldLocation ?? "Unknown")</span></td>}
{<td class="location"><span>@(item.DeviceHeldLocation ?? "Unknown")</span></td>}
</tr>}
</tbody>
</table>
@@ -166,16 +166,16 @@ WriteLiteral(" ");
#line 18 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowDates)
if (Model.ShowLastActivityDate)
{
#line default
#line hidden
WriteLiteral(" <th");
WriteLiteral(" class=\"dates\"");
WriteLiteral(" class=\"lastActive\"");
WriteLiteral(">When\r\n </th> ");
WriteLiteral(">Last Active\r\n </th> ");
#line 20 "..\..\Views\Shared\_JobTableRender.cshtml"
@@ -188,16 +188,16 @@ WriteLiteral(" ");
#line 21 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowType)
if (Model.ShowDates)
{
#line default
#line hidden
WriteLiteral(" <th");
WriteLiteral(" class=\"type\"");
WriteLiteral(" class=\"dates\"");
WriteLiteral(">Type\r\n </th> ");
WriteLiteral(">When\r\n </th> ");
#line 23 "..\..\Views\Shared\_JobTableRender.cshtml"
@@ -210,16 +210,16 @@ WriteLiteral(" ");
#line 24 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowDevice)
if (Model.ShowType)
{
#line default
#line hidden
WriteLiteral("<th");
WriteLiteral(" <th");
WriteLiteral(" class=\"device\"");
WriteLiteral(" class=\"type\"");
WriteLiteral(">Device\r\n </th> ");
WriteLiteral(">Type\r\n </th> ");
#line 26 "..\..\Views\Shared\_JobTableRender.cshtml"
@@ -232,16 +232,16 @@ WriteLiteral(" ");
#line 27 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowUser)
if (Model.ShowDevice)
{
#line default
#line hidden
WriteLiteral(" <th");
WriteLiteral("<th");
WriteLiteral(" class=\"user\"");
WriteLiteral(" class=\"device\"");
WriteLiteral(">User\r\n </th> ");
WriteLiteral(">Device\r\n </th> ");
#line 29 "..\..\Views\Shared\_JobTableRender.cshtml"
@@ -254,16 +254,16 @@ WriteLiteral(" ");
#line 30 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowTechnician)
if (Model.ShowUser)
{
#line default
#line hidden
WriteLiteral(" <th");
WriteLiteral(" class=\"technician\"");
WriteLiteral(" class=\"user\"");
WriteLiteral(">Technician\r\n </th> ");
WriteLiteral(">User\r\n </th> ");
#line 32 "..\..\Views\Shared\_JobTableRender.cshtml"
@@ -276,6 +276,28 @@ WriteLiteral(" ");
#line 33 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowTechnician)
{
#line default
#line hidden
WriteLiteral(" <th");
WriteLiteral(" class=\"technician\"");
WriteLiteral(">Technician\r\n </th> ");
#line 35 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 36 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowLocation)
{
@@ -288,7 +310,7 @@ WriteLiteral(" class=\"location\"");
WriteLiteral(">Location\r\n </th> ");
#line 35 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 38 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -297,13 +319,13 @@ WriteLiteral(">Location\r\n </th> ");
WriteLiteral(" </tr>\r\n </thead>\r\n <tbody>\r\n");
#line 39 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 42 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 39 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 42 "..\..\Views\Shared\_JobTableRender.cshtml"
foreach (var item in Model.Items)
{
string statusSlaClass = null;
@@ -332,7 +354,7 @@ WriteLiteral(" <tr");
WriteLiteral(" data-id=\"");
#line 58 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.Id);
@@ -343,7 +365,7 @@ WriteLiteral("\"");
WriteLiteral(" data-status=\"");
#line 58 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(Model.ShowStatus ? item.StatusId : null);
@@ -351,26 +373,26 @@ WriteLiteral(" data-status=\"");
#line hidden
WriteLiteral("\"");
WriteAttribute("class", Tuple.Create(" class=\"", 2662), Tuple.Create("\"", 2687)
WriteAttribute("class", Tuple.Create(" class=\"", 2803), Tuple.Create("\"", 2828)
#line 58 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 2670), Tuple.Create<System.Object, System.Int32>(statusSlaClass
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 2811), Tuple.Create<System.Object, System.Int32>(statusSlaClass
#line default
#line hidden
, 2670), false)
, 2811), false)
);
WriteLiteral(">\r\n");
#line 59 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 59 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowId)
{
@@ -383,27 +405,27 @@ WriteLiteral(" class=\"id\"");
WriteLiteral(">\r\n");
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Authorization.Has(Claims.Job.Show))
{
#line default
#line hidden
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(Html.ActionLink(item.JobId.ToString(), MVC.Job.Show(item.JobId)));
#line default
#line hidden
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
}
else
{
@@ -411,14 +433,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 67 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.JobId.ToString());
#line default
#line hidden
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 67 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
@@ -426,7 +448,7 @@ WriteLiteral(">\r\n");
WriteLiteral("</td>");
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 67 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -435,7 +457,7 @@ WriteLiteral("</td>");
WriteLiteral(" ");
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 68 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowStatus)
{
var statusItem = (JobTableStatusItemModel)item;
@@ -449,23 +471,23 @@ WriteLiteral(" class=\"status\"");
WriteLiteral("><i");
WriteAttribute("class", Tuple.Create(" class=\"", 3239), Tuple.Create("\"", 3286)
, Tuple.Create(Tuple.Create("", 3247), Tuple.Create("fa", 3247), true)
, Tuple.Create(Tuple.Create(" ", 3249), Tuple.Create("fa-square", 3250), true)
, Tuple.Create(Tuple.Create(" ", 3259), Tuple.Create("jobStatus", 3260), true)
WriteAttribute("class", Tuple.Create(" class=\"", 3380), Tuple.Create("\"", 3427)
, Tuple.Create(Tuple.Create("", 3388), Tuple.Create("fa", 3388), true)
, Tuple.Create(Tuple.Create(" ", 3390), Tuple.Create("fa-square", 3391), true)
, Tuple.Create(Tuple.Create(" ", 3400), Tuple.Create("jobStatus", 3401), true)
#line 68 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create(" ", 3269), Tuple.Create<System.Object, System.Int32>(item.StatusId
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create(" ", 3410), Tuple.Create<System.Object, System.Int32>(item.StatusId
#line default
#line hidden
, 3270), false)
, 3411), false)
);
WriteLiteral("></i>&nbsp;");
#line 68 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.StatusDescription);
@@ -474,13 +496,13 @@ WriteLiteral("></i>&nbsp;");
WriteLiteral("\r\n");
#line 69 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 72 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 69 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 72 "..\..\Views\Shared\_JobTableRender.cshtml"
if (statusItem.ActiveJobQueues != null)
{
@@ -493,13 +515,13 @@ WriteLiteral(" class=\"queues\"");
WriteLiteral(">\r\n");
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 74 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 74 "..\..\Views\Shared\_JobTableRender.cshtml"
foreach (var jqToken in ((JobTableStatusItemModel)item).ActiveJobQueues.Select(jqj => new Tuple<JobTableStatusQueueItemModel, Disco.Services.Jobs.JobQueues.JobQueueToken>(jqj, Disco.Services.Jobs.JobQueues.JobQueueService.GetQueue(jqj.QueueId))))
{
@@ -508,50 +530,50 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 3818), Tuple.Create("\"", 3907)
, Tuple.Create(Tuple.Create("", 3826), Tuple.Create("fa", 3826), true)
, Tuple.Create(Tuple.Create(" ", 3828), Tuple.Create("fa-", 3829), true)
WriteAttribute("class", Tuple.Create(" class=\"", 3959), Tuple.Create("\"", 4048)
, Tuple.Create(Tuple.Create("", 3967), Tuple.Create("fa", 3967), true)
, Tuple.Create(Tuple.Create(" ", 3969), Tuple.Create("fa-", 3970), true)
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 3832), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Icon
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 3973), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Icon
#line default
#line hidden
, 3832), false)
, Tuple.Create(Tuple.Create(" ", 3862), Tuple.Create("fa-fw", 3863), true)
, Tuple.Create(Tuple.Create(" ", 3868), Tuple.Create("d-", 3869), true)
, 3973), false)
, Tuple.Create(Tuple.Create(" ", 4003), Tuple.Create("fa-fw", 4004), true)
, Tuple.Create(Tuple.Create(" ", 4009), Tuple.Create("d-", 4010), true)
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 3871), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.IconColour
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 4012), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.IconColour
#line default
#line hidden
, 3871), false)
, 4012), false)
);
WriteAttribute("title", Tuple.Create(" title=\"", 3908), Tuple.Create("\"", 3974)
WriteAttribute("title", Tuple.Create(" title=\"", 4049), Tuple.Create("\"", 4115)
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 3916), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Name
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 4057), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Name
#line default
#line hidden
, 3916), false)
, Tuple.Create(Tuple.Create(" ", 3946), Tuple.Create("[", 3947), true)
, 4057), false)
, Tuple.Create(Tuple.Create(" ", 4087), Tuple.Create("[", 4088), true)
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 3948), Tuple.Create<System.Object, System.Int32>(jqToken.Item1.Priority
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 4089), Tuple.Create<System.Object, System.Int32>(jqToken.Item1.Priority
#line default
#line hidden
, 3948), false)
, Tuple.Create(Tuple.Create("", 3973), Tuple.Create("]", 3973), true)
, 4089), false)
, Tuple.Create(Tuple.Create("", 4114), Tuple.Create("]", 4114), true)
);
WriteLiteral("></i>\r\n");
#line 74 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 77 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -560,7 +582,7 @@ WriteLiteral("></i>\r\n");
WriteLiteral(" </div>");
#line 75 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 78 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -569,7 +591,7 @@ WriteLiteral(" </div>");
WriteLiteral(" </td>");
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 79 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -578,7 +600,38 @@ WriteLiteral(" </td>");
WriteLiteral(" ");
#line 77 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 80 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowLastActivityDate)
{
#line default
#line hidden
WriteLiteral("<td");
WriteLiteral(" class=\"lastActive\"");
WriteLiteral(">");
#line 81 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(CommonHelpers.FriendlyDate(item.LastActivityDate));
#line default
#line hidden
WriteLiteral("</td>");
#line 81 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowDates)
{
@@ -591,21 +644,21 @@ WriteLiteral(" class=\"dates\"");
WriteLiteral(">");
#line 78 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 83 "..\..\Views\Shared\_JobTableRender.cshtml"
if (item.ClosedDate.HasValue)
{
#line default
#line hidden
#line 79 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 84 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(CommonHelpers.FriendlyDate(item.ClosedDate.Value));
#line default
#line hidden
#line 79 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 84 "..\..\Views\Shared\_JobTableRender.cshtml"
}
else
{
@@ -613,14 +666,14 @@ WriteLiteral(">");
#line default
#line hidden
#line 81 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(CommonHelpers.FriendlyDate(item.OpenedDate));
#line default
#line hidden
#line 81 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
@@ -628,7 +681,7 @@ WriteLiteral(">");
WriteLiteral("</td>");
#line 81 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -637,7 +690,7 @@ WriteLiteral("</td>");
WriteLiteral(" ");
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 87 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowType)
{
@@ -649,20 +702,20 @@ WriteLiteral(" class=\"type\"");
WriteLiteral("><span");
WriteAttribute("title", Tuple.Create(" title=\"", 4556), Tuple.Create("\"", 4588)
WriteAttribute("title", Tuple.Create(" title=\"", 4861), Tuple.Create("\"", 4893)
#line 83 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 4564), Tuple.Create<System.Object, System.Int32>(item.JobTypeDescription
#line 88 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 4869), Tuple.Create<System.Object, System.Int32>(item.JobTypeDescription
#line default
#line hidden
, 4564), false)
, 4869), false)
);
WriteLiteral(">");
#line 83 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 88 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.JobTypeId);
@@ -671,7 +724,7 @@ WriteLiteral(">");
WriteLiteral("</span></td>");
#line 83 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 88 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -680,7 +733,7 @@ WriteLiteral("</span></td>");
WriteLiteral(" ");
#line 84 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 89 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowDevice)
{
@@ -693,13 +746,13 @@ WriteLiteral(" class=\"device\"");
WriteLiteral(">\r\n");
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
if (item.DeviceSerialNumber != null)
{
if (Authorization.Has(Claims.Device.Show))
@@ -708,14 +761,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 89 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(Html.ActionLink(item.DeviceSerialNumber, MVC.Device.Show(item.DeviceSerialNumber), new { Title = item.DeviceModelDescription }));
#line default
#line hidden
#line 89 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
}
else
{
@@ -724,20 +777,20 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral("<span");
WriteAttribute("title", Tuple.Create(" title=\"", 5128), Tuple.Create("\"", 5164)
WriteAttribute("title", Tuple.Create(" title=\"", 5433), Tuple.Create("\"", 5469)
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 5136), Tuple.Create<System.Object, System.Int32>(item.DeviceModelDescription
#line 96 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 5441), Tuple.Create<System.Object, System.Int32>(item.DeviceModelDescription
#line default
#line hidden
, 5136), false)
, 5441), false)
);
WriteLiteral(">");
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 96 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.DeviceSerialNumber);
@@ -746,7 +799,7 @@ WriteLiteral(">");
WriteLiteral("</span>");
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 96 "..\..\Views\Shared\_JobTableRender.cshtml"
}
}
else
@@ -761,7 +814,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span>");
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 99 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
@@ -769,7 +822,7 @@ WriteLiteral(">N/A</span>");
WriteLiteral("</td>");
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 99 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -778,7 +831,7 @@ WriteLiteral("</td>");
WriteLiteral(" ");
#line 95 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 100 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowUser)
{
@@ -791,13 +844,13 @@ WriteLiteral(" class=\"user\"");
WriteLiteral(">\r\n");
#line 97 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 102 "..\..\Views\Shared\_JobTableRender.cshtml"
#line default
#line hidden
#line 97 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 102 "..\..\Views\Shared\_JobTableRender.cshtml"
if (item.UserId != null)
{
if (Authorization.Has(Claims.User.Show))
@@ -806,14 +859,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 100 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 105 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(Html.ActionLink(string.Format("{0} ({1})", item.UserDisplayName, item.UserId), MVC.User.Show(item.UserId)));
#line default
#line hidden
#line 100 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 105 "..\..\Views\Shared\_JobTableRender.cshtml"
}
else
{
@@ -821,14 +874,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 102 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(string.Format("{0} ({1})", item.UserDisplayName, item.UserId));
#line default
#line hidden
#line 102 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
}
}
else
@@ -843,7 +896,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span>");
#line 105 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 110 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
@@ -851,7 +904,7 @@ WriteLiteral(">N/A</span>");
WriteLiteral("</td>");
#line 105 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 110 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -860,7 +913,7 @@ WriteLiteral("</td>");
WriteLiteral(" ");
#line 106 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 111 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowTechnician)
{
@@ -872,20 +925,20 @@ WriteLiteral(" class=\"technician\"");
WriteLiteral("><span");
WriteAttribute("title", Tuple.Create(" title=\"", 6116), Tuple.Create("\"", 6155)
WriteAttribute("title", Tuple.Create(" title=\"", 6421), Tuple.Create("\"", 6460)
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 6124), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
#line 112 "..\..\Views\Shared\_JobTableRender.cshtml"
, Tuple.Create(Tuple.Create("", 6429), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
#line default
#line hidden
, 6124), false)
, 6429), false)
);
WriteLiteral(">");
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 112 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.OpenedTechUserId);
@@ -894,7 +947,7 @@ WriteLiteral(">");
WriteLiteral("</span></td>");
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 112 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -903,7 +956,7 @@ WriteLiteral("</span></td>");
WriteLiteral(" ");
#line 108 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 113 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.ShowLocation)
{
@@ -911,13 +964,13 @@ WriteLiteral(" ");
#line hidden
WriteLiteral("<td");
WriteLiteral(" class=\"technician\"");
WriteLiteral(" class=\"location\"");
WriteLiteral("><span>");
#line 109 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.DeviceHeldLocation ?? "Unknown");
#line 114 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(item.DeviceHeldLocation ?? "Unknown");
#line default
@@ -925,8 +978,8 @@ WriteLiteral("><span>");
WriteLiteral("</span></td>");
#line 109 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line 114 "..\..\Views\Shared\_JobTableRender.cshtml"
}
#line default
@@ -934,7 +987,7 @@ WriteLiteral("</span></td>");
WriteLiteral(" </tr>");
#line 110 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 115 "..\..\Views\Shared\_JobTableRender.cshtml"
}
@@ -943,7 +996,7 @@ WriteLiteral(" </tr>");
WriteLiteral(" </tbody>\r\n </table>\r\n");
#line 113 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 118 "..\..\Views\Shared\_JobTableRender.cshtml"
if (Model.HideClosedJobs && Model.Items.All(j => j.ClosedDate.HasValue))
{
@@ -963,7 +1016,7 @@ WriteLiteral(" class=\"dataTables_showStatusClosed button small\"");
WriteLiteral(">Show Closed Jobs (");
#line 117 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 122 "..\..\Views\Shared\_JobTableRender.cshtml"
Write(Model.Items.Count());
@@ -972,7 +1025,7 @@ WriteLiteral(">Show Closed Jobs (");
WriteLiteral(")</a>\r\n </div>\r\n");
#line 119 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 124 "..\..\Views\Shared\_JobTableRender.cshtml"
}
}
else
@@ -984,7 +1037,7 @@ WriteLiteral(")</a>\r\n </div>\r\n");
WriteLiteral(" <h3>No jobs to display</h3>\r\n");
#line 124 "..\..\Views\Shared\_JobTableRender.cshtml"
#line 129 "..\..\Views\Shared\_JobTableRender.cshtml"
}
+8
View File
@@ -42,6 +42,14 @@
{
<li>@Html.ActionLink("Awaiting Technician Action", MVC.Job.AwaitingTechnicianAction())</li>
}
@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
{
<li>@Html.ActionLink("Long Running Jobs", MVC.Job.LongRunning())</li>
}
@if (Authorization.Has(Claims.Job.Lists.StaleJobs))
{
<li>@Html.ActionLink("Stale Jobs", MVC.Job.Stale())</li>
}
@if (Authorization.Has(Claims.Job.Lists.DevicesReadyForReturn))
{
<li>@Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())</li>
+231 -175
View File
@@ -303,7 +303,7 @@ WriteLiteral(" ");
#line 45 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.DevicesReadyForReturn))
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
{
@@ -313,7 +313,7 @@ WriteLiteral(" <li>");
#line 47 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn()));
Write(Html.ActionLink("Long Running Jobs", MVC.Job.LongRunning()));
#line default
@@ -331,7 +331,7 @@ WriteLiteral(" ");
#line 49 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.Locations))
if (Authorization.Has(Claims.Job.Lists.StaleJobs))
{
@@ -341,7 +341,7 @@ WriteLiteral(" <li>");
#line 51 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations()));
Write(Html.ActionLink("Stale Jobs", MVC.Job.Stale()));
#line default
@@ -359,7 +359,7 @@ WriteLiteral(" ");
#line 53 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingUserAction))
if (Authorization.Has(Claims.Job.Lists.DevicesReadyForReturn))
{
@@ -369,7 +369,7 @@ WriteLiteral(" <li>");
#line 55 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction()));
Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn()));
#line default
@@ -387,6 +387,62 @@ WriteLiteral(" ");
#line 57 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.Locations))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 59 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 60 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 61 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingUserAction))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 63 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 64 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 65 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinance))
{
if (Authorization.HasAny(Claims.Job.Lists.AwaitingFinanceCharge, Claims.Job.Lists.AwaitingFinancePayment, Claims.Job.Lists.AwaitingFinanceAgreementBreach, Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
@@ -406,7 +462,7 @@ WriteLiteral(" class=\"fa fa-caret-right\"");
WriteLiteral("></i>");
#line 61 "..\..\Views\Shared\_Layout.cshtml"
#line 69 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
@@ -415,13 +471,13 @@ WriteLiteral("></i>");
WriteLiteral("\r\n <ul>\r\n");
#line 63 "..\..\Views\Shared\_Layout.cshtml"
#line 71 "..\..\Views\Shared\_Layout.cshtml"
#line default
#line hidden
#line 63 "..\..\Views\Shared\_Layout.cshtml"
#line 71 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceCharge))
{
@@ -431,64 +487,8 @@ WriteLiteral("\r\n <ul>\r\n");
WriteLiteral(" <li>");
#line 65 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 66 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 67 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinancePayment))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 69 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 70 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 71 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceAgreementBreach))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 73 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach()));
Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge()));
#line default
@@ -506,7 +506,7 @@ WriteLiteral(" ");
#line 75 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
if (Authorization.Has(Claims.Job.Lists.AwaitingFinancePayment))
{
@@ -516,7 +516,7 @@ WriteLiteral(" <li>");
#line 77 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing()));
Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment()));
#line default
@@ -528,13 +528,69 @@ WriteLiteral("</li>\r\n");
}
#line default
#line hidden
WriteLiteral(" ");
#line 79 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceAgreementBreach))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 81 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 82 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 83 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 85 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 86 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" </ul>\r\n </li>\r" +
"\n");
#line 81 "..\..\Views\Shared\_Layout.cshtml"
#line 89 "..\..\Views\Shared\_Layout.cshtml"
}
else
{
@@ -545,7 +601,7 @@ WriteLiteral(" </ul>\r\n
WriteLiteral(" <li>");
#line 84 "..\..\Views\Shared\_Layout.cshtml"
#line 92 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
@@ -554,7 +610,7 @@ WriteLiteral(" <li>");
WriteLiteral("</li>\r\n");
#line 85 "..\..\Views\Shared\_Layout.cshtml"
#line 93 "..\..\Views\Shared\_Layout.cshtml"
}
}
@@ -564,7 +620,7 @@ WriteLiteral("</li>\r\n");
WriteLiteral(" ");
#line 87 "..\..\Views\Shared\_Layout.cshtml"
#line 95 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.DevicesAwaitingRepair))
{
@@ -574,64 +630,8 @@ WriteLiteral(" ");
WriteLiteral(" <li>");
#line 89 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 90 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 91 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AllOpen))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 93 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("All Open", MVC.Job.AllOpen()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 94 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 95 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.RecentlyClosed))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 97 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed()));
Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair()));
#line default
@@ -645,16 +645,72 @@ WriteLiteral("</li>\r\n");
#line default
#line hidden
WriteLiteral(" </ul>\r\n </li>\r\n");
WriteLiteral(" ");
#line 99 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.AllOpen))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 101 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("All Open", MVC.Job.AllOpen()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 102 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 103 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Job.Lists.RecentlyClosed))
{
#line default
#line hidden
WriteLiteral(" <li>");
#line 105 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed()));
#line default
#line hidden
WriteLiteral("</li>\r\n");
#line 106 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
#line hidden
WriteLiteral(" </ul>\r\n </li>\r\n");
#line 109 "..\..\Views\Shared\_Layout.cshtml"
#line default
#line hidden
#line 101 "..\..\Views\Shared\_Layout.cshtml"
#line 109 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices))
{
@@ -663,20 +719,20 @@ WriteLiteral(" </ul>\r\n </li>\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("class", Tuple.Create(" class=\"", 6391), Tuple.Create("\"", 6479)
WriteAttribute("class", Tuple.Create(" class=\"", 6876), Tuple.Create("\"", 6964)
#line 103 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 6399), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
#line 111 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 6884), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
#line default
#line hidden
, 6399), false)
, 6884), false)
);
WriteLiteral(">");
#line 103 "..\..\Views\Shared\_Layout.cshtml"
#line 111 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
@@ -685,7 +741,7 @@ WriteLiteral(">");
WriteLiteral("</li>\r\n");
#line 104 "..\..\Views\Shared\_Layout.cshtml"
#line 112 "..\..\Views\Shared\_Layout.cshtml"
}
@@ -694,7 +750,7 @@ WriteLiteral("</li>\r\n");
WriteLiteral(" ");
#line 105 "..\..\Views\Shared\_Layout.cshtml"
#line 113 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.HasAny(Claims.User.Search))
{
@@ -703,20 +759,20 @@ WriteLiteral(" ");
#line hidden
WriteLiteral(" <li");
WriteAttribute("class", Tuple.Create(" class=\"", 6692), Tuple.Create("\"", 6778)
WriteAttribute("class", Tuple.Create(" class=\"", 7177), Tuple.Create("\"", 7263)
#line 107 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 6700), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
#line 115 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 7185), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
#line default
#line hidden
, 6700), false)
, 7185), false)
);
WriteLiteral(">");
#line 107 "..\..\Views\Shared\_Layout.cshtml"
#line 115 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
@@ -725,7 +781,7 @@ WriteLiteral(">");
WriteLiteral("</li>\r\n");
#line 108 "..\..\Views\Shared\_Layout.cshtml"
#line 116 "..\..\Views\Shared\_Layout.cshtml"
}
@@ -733,21 +789,21 @@ WriteLiteral("</li>\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("class", Tuple.Create(" class=\"", 6892), Tuple.Create("\"", 6990)
, Tuple.Create(Tuple.Create("", 6900), Tuple.Create("moveRight", 6900), true)
WriteAttribute("class", Tuple.Create(" class=\"", 7377), Tuple.Create("\"", 7475)
, Tuple.Create(Tuple.Create("", 7385), Tuple.Create("moveRight", 7385), true)
#line 109 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 6909), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
#line 117 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 7394), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
#line default
#line hidden
, 6909), false)
, 7394), false)
);
WriteLiteral(">");
#line 109 "..\..\Views\Shared\_Layout.cshtml"
#line 117 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Reports", MVC.Public.Public.Index()));
@@ -756,13 +812,13 @@ WriteLiteral(">");
WriteLiteral("</li>\r\n");
#line 110 "..\..\Views\Shared\_Layout.cshtml"
#line 118 "..\..\Views\Shared\_Layout.cshtml"
#line default
#line hidden
#line 110 "..\..\Views\Shared\_Layout.cshtml"
#line 118 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.Config.Show))
{
@@ -771,20 +827,20 @@ WriteLiteral("</li>\r\n");
#line hidden
WriteLiteral(" <li");
WriteAttribute("class", Tuple.Create(" class=\"", 7168), Tuple.Create("\"", 7256)
WriteAttribute("class", Tuple.Create(" class=\"", 7653), Tuple.Create("\"", 7741)
#line 112 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 7176), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
#line 120 "..\..\Views\Shared\_Layout.cshtml"
, Tuple.Create(Tuple.Create("", 7661), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
#line default
#line hidden
, 7176), false)
, 7661), false)
);
WriteLiteral(">");
#line 112 "..\..\Views\Shared\_Layout.cshtml"
#line 120 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
@@ -793,7 +849,7 @@ WriteLiteral(">");
WriteLiteral("</li>\r\n");
#line 113 "..\..\Views\Shared\_Layout.cshtml"
#line 121 "..\..\Views\Shared\_Layout.cshtml"
}
@@ -806,21 +862,21 @@ WriteLiteral(" id=\"headerMenu\"");
WriteLiteral(">\r\n <span>");
#line 117 "..\..\Views\Shared\_Layout.cshtml"
#line 125 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.Has(Claims.User.Show))
{
#line default
#line hidden
#line 118 "..\..\Views\Shared\_Layout.cshtml"
#line 126 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id)));
#line default
#line hidden
#line 118 "..\..\Views\Shared\_Layout.cshtml"
#line 126 "..\..\Views\Shared\_Layout.cshtml"
}
else
{
@@ -828,14 +884,14 @@ WriteLiteral(">\r\n <span>");
#line default
#line hidden
#line 120 "..\..\Views\Shared\_Layout.cshtml"
#line 128 "..\..\Views\Shared\_Layout.cshtml"
Write(CurrentUser.ToString());
#line default
#line hidden
#line 120 "..\..\Views\Shared\_Layout.cshtml"
#line 128 "..\..\Views\Shared\_Layout.cshtml"
}
#line default
@@ -843,13 +899,13 @@ WriteLiteral(">\r\n <span>");
WriteLiteral("</span>\r\n");
#line 121 "..\..\Views\Shared\_Layout.cshtml"
#line 129 "..\..\Views\Shared\_Layout.cshtml"
#line default
#line hidden
#line 121 "..\..\Views\Shared\_Layout.cshtml"
#line 129 "..\..\Views\Shared\_Layout.cshtml"
if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search))
{
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
@@ -858,14 +914,14 @@ WriteLiteral("</span>\r\n");
#line default
#line hidden
#line 124 "..\..\Views\Shared\_Layout.cshtml"
#line 132 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.TextBox("term", null, new { id = "SearchQuery", accesskey = "s", placeholder = "Search", data_quicksearchurl = Url.Action(MVC.API.Search.QuickQuery()) }));
#line default
#line hidden
#line 124 "..\..\Views\Shared\_Layout.cshtml"
#line 132 "..\..\Views\Shared\_Layout.cshtml"
}
}
@@ -879,7 +935,7 @@ WriteLiteral(" id=\"layout_PageHeading\"");
WriteLiteral(">");
#line 128 "..\..\Views\Shared\_Layout.cshtml"
#line 136 "..\..\Views\Shared\_Layout.cshtml"
Write(CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty));
@@ -894,7 +950,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 130 "..\..\Views\Shared\_Layout.cshtml"
#line 138 "..\..\Views\Shared\_Layout.cshtml"
Write(RenderBody());
@@ -903,7 +959,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
#line 133 "..\..\Views\Shared\_Layout.cshtml"
#line 141 "..\..\Views\Shared\_Layout.cshtml"
Write(Disco.Web.DiscoApplication.Version);
@@ -914,7 +970,7 @@ WriteLiteral(" ");
WriteLiteral("@ ");
#line 133 "..\..\Views\Shared\_Layout.cshtml"
#line 141 "..\..\Views\Shared\_Layout.cshtml"
Write(Disco.Web.DiscoApplication.OrganisationName);
@@ -924,7 +980,7 @@ WriteLiteral(" | <a\r\n href=\"https://discoict.com.au/\" target=
"om.au</a> | ");
#line 134 "..\..\Views\Shared\_Layout.cshtml"
#line 142 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
@@ -933,7 +989,7 @@ WriteLiteral(" | <a\r\n href=\"https://discoict.com.au/\" target=
WriteLiteral(" | ");
#line 134 "..\..\Views\Shared\_Layout.cshtml"
#line 142 "..\..\Views\Shared\_Layout.cshtml"
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
@@ -942,13 +998,13 @@ WriteLiteral(" | ");
WriteLiteral("\r\n </footer>\r\n </div>\r\n");
#line 137 "..\..\Views\Shared\_Layout.cshtml"
#line 145 "..\..\Views\Shared\_Layout.cshtml"
#line default
#line hidden
#line 137 "..\..\Views\Shared\_Layout.cshtml"
#line 145 "..\..\Views\Shared\_Layout.cshtml"
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
#line default