Tidy: Sort/remove usings, simplify names
This commit is contained in:
@@ -7,8 +7,6 @@ using Disco.Services.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ using Disco.Services.Authorization;
|
||||
.Subscribe(JobNotification, NotificationError);
|
||||
|
||||
// Initially fill table
|
||||
base.Items = this.SortFunction(this.DetermineItems(Database, this.FilterFunction(Database.Jobs), FilterAuthorization)).ToList();
|
||||
base.Items = SortFunction(this.DetermineItems(Database, FilterFunction(Database.Jobs), FilterAuthorization)).ToList();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ using Disco.Services.Authorization;
|
||||
|
||||
private void NotificationError(Exception ex)
|
||||
{
|
||||
SystemLog.LogException(string.Format("Disco.Services.Jobs.JobLists.ManagedJobList: [{0}]", this.Name), ex);
|
||||
SystemLog.LogException(string.Format("Disco.Services.Jobs.JobLists.ManagedJobList: [{0}]", Name), ex);
|
||||
}
|
||||
|
||||
private void JobNotification(RepositoryMonitorEvent e)
|
||||
@@ -262,7 +262,7 @@ using Disco.Services.Authorization;
|
||||
if (existingItems == null)
|
||||
existingItems = base.Items.Where(i => jobIds.Contains(i.JobId)).ToArray();
|
||||
|
||||
var updatedItems = this.DetermineItems(Database, this.FilterFunction(Database.Jobs.Where(j => jobIds.Contains(j.Id))), false);
|
||||
var updatedItems = this.DetermineItems(Database, FilterFunction(Database.Jobs.Where(j => jobIds.Contains(j.Id))), false);
|
||||
|
||||
var refreshedList = base.Items.ToList();
|
||||
|
||||
@@ -277,7 +277,7 @@ using Disco.Services.Authorization;
|
||||
refreshedList.Add(updatedItem);
|
||||
|
||||
// Reorder
|
||||
base.Items = this.SortFunction(refreshedList).ToList();
|
||||
base.Items = SortFunction(refreshedList).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,7 @@ using Disco.Services.Web.Signalling;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Microsoft.AspNet.SignalR.Hubs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Reactive.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Disco.Services.Users;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Expressions;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -29,15 +29,15 @@ namespace Disco.Services.Jobs.Noticeboards
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(this.DeviceComputerNameFriendly);
|
||||
StringBuilder sb = new StringBuilder(DeviceComputerNameFriendly);
|
||||
|
||||
if (UserId != null)
|
||||
sb.Append(" - ").Append(this.UserDisplayName).Append(" (").Append(this.UserIdFriendly).Append(")");
|
||||
sb.Append(" - ").Append(UserDisplayName).Append(" (").Append(UserIdFriendly).Append(")");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.DeviceLocation))
|
||||
sb.Append(" - ").Append(this.DeviceLocation);
|
||||
if (!string.IsNullOrWhiteSpace(DeviceLocation))
|
||||
sb.Append(" - ").Append(DeviceLocation);
|
||||
else if (UserId == null)
|
||||
sb.Append(" - ").Append(this.DeviceSerialNumber);
|
||||
sb.Append(" - ").Append(DeviceSerialNumber);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -108,10 +108,10 @@ namespace Disco.Services.Jobs.Noticeboards
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.ReadyForReturn && (this.ReadyForReturnSince.Value < DateTime.Now.AddDays(-3)))
|
||||
if (ReadyForReturn && (ReadyForReturnSince.Value < DateTime.Now.AddDays(-3)))
|
||||
return true;
|
||||
|
||||
if (this.WaitingForUserAction && (this.WaitingForUserActionSince.Value < DateTime.Now.AddDays(-6)))
|
||||
if (WaitingForUserAction && (WaitingForUserActionSince.Value < DateTime.Now.AddDays(-6)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Disco.Services.Jobs.Statistics
|
||||
// Trigger Daily @ 12:29am
|
||||
TriggerBuilder triggerBuilder = TriggerBuilder.Create().WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 29));
|
||||
|
||||
this.ScheduleTask(triggerBuilder);
|
||||
ScheduleTask(triggerBuilder);
|
||||
}
|
||||
protected override void ExecuteTask()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user