aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-07-01 17:56:49 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-07-01 17:56:49 +0300
commit8a1e772f025eaf3bfdf17905d9e33c460993e559 (patch)
treeb6d705cca71033cd6c5f814596ceb9abc849bf50 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels
parentc0fd8dcc53e45aa5aa0095cc2c8c5f39a34f7886 (diff)
downloadTango-8a1e772f025eaf3bfdf17905d9e33c460993e559.tar.gz
Tango-8a1e772f025eaf3bfdf17905d9e33c460993e559.zip
Many bug fixes !!!
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
index 997ea70d5..d2a730cd7 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/ViewModels/MainViewVM.cs
@@ -97,7 +97,7 @@ namespace Tango.PPC.Events.ViewModels
using (var db = ObservablesContext.CreateDefault())
{
var last_week = DateTime.UtcNow.AddDays(-7);
- HistoryEvents = (await db.MachinesEvents.Where(x => x.MachineGuid == MachineProvider.Machine.Guid && x.DateTime > last_week).Take(100).Include(x => x.EventType).Where(x => (EventTypeNotificationTimes)x.EventType.EventNotificationTime != EventTypeNotificationTimes.None).ToListAsync()).OrderByDescending(x => x.DateTime).ToObservableCollection();
+ HistoryEvents = (await db.MachinesEvents.Where(x => x.MachineGuid == MachineProvider.Machine.Guid && x.DateTime > last_week).Take(100).Include(x => x.EventType).Where(x => (EventTypeNotificationTimes)x.EventType.EventNotificationTime != EventTypeNotificationTimes.None || x.EventType.Code == (int)EventTypes.JOB_FAILED || x.EventType.Code == (int)EventTypes.JOB_STARTED || x.EventType.Code == (int)EventTypes.JOB_COMPLETED || x.EventType.Code == (int)EventTypes.JOB_ABORTED).ToListAsync()).OrderByDescending(x => x.DateTime).ToObservableCollection();
}
MachineProvider.MachineOperator.StatusChanged += MachineOperator_StatusChanged;
@@ -160,6 +160,10 @@ namespace Tango.PPC.Events.ViewModels
_notifications.Add(new KeyValuePair<EventTypes, NotificationItem>(ev.EventType.Type, notificationItem));
}
+ else if (ev.IsJobProgressEvent())
+ {
+ HistoryEvents.Insert(0, ev);
+ }
});
}