19 lines
533 B
C#
19 lines
533 B
C#
using ECM.JobRunner.Common.JobRunnerReference;
|
|
|
|
namespace ECM.JobRunner.Web.Data
|
|
{
|
|
public class DashboardResponse
|
|
{
|
|
public DateTime heartbeat = DateTime.MinValue;
|
|
public List<HistoryItem> jobHistory = new();
|
|
public List<StatusItem> jobStatus = new();
|
|
|
|
public List<HistoryItem> GetHistoryForLastMinutes(int pMinutes)
|
|
{
|
|
return jobHistory.
|
|
Where(h => (DateTime.Now - h.CreatedAt) < new TimeSpan(0, pMinutes, 0)).
|
|
ToList();
|
|
}
|
|
}
|
|
}
|