-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
890 additions
and
935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// // Copyright (c) Microsoft Corporation. | ||
// // Licensed under the MIT License. | ||
|
||
using System.Collections.Immutable; | ||
|
||
namespace EventLogExpert.UI.Models; | ||
|
||
public sealed record EventFilter( | ||
AdvancedFilterModel? AdvancedFilter, | ||
FilterDateModel? DateFilter, | ||
ImmutableList<AdvancedFilterModel> CachedFilters, | ||
ImmutableList<FilterModel> Filters); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// // Copyright (c) Microsoft Corporation. | ||
// // Licensed under the MIT License. | ||
|
||
using EventLogExpert.Eventing.Models; | ||
using System.Collections.Immutable; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace EventLogExpert.UI.Models; | ||
|
||
public sealed record EventLogData( | ||
string Name, | ||
LogType Type, | ||
ReadOnlyCollection<DisplayEventModel> Events, | ||
ImmutableHashSet<int> EventIds, | ||
ImmutableHashSet<Guid?> EventActivityIds, | ||
ImmutableHashSet<string> EventProviderNames, | ||
ImmutableHashSet<string> TaskNames, | ||
ImmutableHashSet<string> KeywordNames); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// // Copyright (c) Microsoft Corporation. | ||
// // Licensed under the MIT License. | ||
|
||
using EventLogExpert.Eventing.Models; | ||
using Microsoft.AspNetCore.Components; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace EventLogExpert.UI.Models; | ||
|
||
public sealed record EventTableModel | ||
{ | ||
public Guid Id { get; } = Guid.NewGuid(); | ||
|
||
public string? FileName { get; init; } | ||
|
||
public string ComputerName => DisplayedEvents.FirstOrDefault()?.ComputerName ?? string.Empty; | ||
|
||
public string LogName { get; init; } = string.Empty; | ||
|
||
public LogType LogType { get; init; } | ||
|
||
// Yes this is mutable but HTML refs are only directly assigned to fields and properties | ||
public ElementReference? ElementReference { get; set; } | ||
|
||
public ReadOnlyCollection<DisplayEventModel> DisplayedEvents { get; init; } = | ||
new List<DisplayEventModel>().AsReadOnly(); | ||
|
||
public bool IsCombined { get; init; } | ||
|
||
public bool IsLoading { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,54 @@ | ||
// // Copyright (c) Microsoft Corporation. | ||
// // Licensed under the MIT License. | ||
|
||
using EventLogExpert.Eventing.Helpers; | ||
using EventLogExpert.Eventing.Models; | ||
using static EventLogExpert.UI.Store.EventLog.EventLogState; | ||
using EventLogExpert.UI.Models; | ||
using System.Collections.Immutable; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace EventLogExpert.UI.Store.EventLog; | ||
|
||
public record EventLogAction | ||
public sealed record EventLogAction | ||
{ | ||
public record AddEvent(DisplayEventModel NewEvent, ITraceLogger TraceLogger) : EventLogAction; | ||
public sealed record AddEvent(DisplayEventModel NewEvent); | ||
|
||
public record LoadEvents( | ||
public sealed record AddEventBuffered(ReadOnlyCollection<DisplayEventModel> UpdatedBuffer, bool IsFull); | ||
|
||
public sealed record AddEventSuccess(ImmutableDictionary<string, EventLogData> ActiveLogs); | ||
|
||
public sealed record CloseAll; | ||
|
||
public sealed record CloseLog(string LogName); | ||
|
||
public sealed record LoadEvents( | ||
string LogName, | ||
LogType Type, | ||
List<DisplayEventModel> Events, | ||
IEnumerable<int> AllEventIds, | ||
IEnumerable<Guid?> AllActivityIds, | ||
IEnumerable<string> AllProviderNames, | ||
IEnumerable<string> AllTaskNames, | ||
IEnumerable<string> AllKeywords, | ||
ITraceLogger TraceLogger | ||
) : EventLogAction; | ||
IEnumerable<string> AllKeywords); | ||
|
||
public record LoadNewEvents(ITraceLogger TraceLogger) : EventLogAction; | ||
public sealed record LoadEventsSuccess(ImmutableDictionary<string, EventLogData> ActiveLogs); | ||
|
||
public record OpenLog(string LogName, LogType LogType) : EventLogAction; | ||
public sealed record LoadNewEvents; | ||
|
||
public record CloseLog(string LogName) : EventLogAction; | ||
public sealed record OpenLog(string LogName, LogType LogType); | ||
|
||
public record CloseAll : EventLogAction; | ||
public sealed record SelectEvent(DisplayEventModel? SelectedEvent); | ||
|
||
public record SelectEvent(DisplayEventModel? SelectedEvent) : EventLogAction; | ||
public sealed record SetContinouslyUpdate(bool ContinuouslyUpdate); | ||
|
||
/// <summary> | ||
/// This action only has meaning for the UI. | ||
/// </summary> | ||
/// <param name="LogName"></param> | ||
public record SelectLog(string? LogName) : EventLogAction; | ||
|
||
public record SetContinouslyUpdate(bool ContinuouslyUpdate, ITraceLogger TraceLogger) : EventLogAction; | ||
|
||
/// <summary> | ||
/// Used to indicate the progress of event logs being loaded. | ||
/// </summary> | ||
/// <summary>Used to indicate the progress of event logs being loaded.</summary> | ||
/// <param name="ActivityId"> | ||
/// A unique id that distinguishes this loading activity from others, since log names such as | ||
/// Application will be common and many file names will be the same. | ||
/// </param> | ||
/// <param name="Count"></param> | ||
public record SetEventsLoading(Guid ActivityId, int Count) : EventLogAction; | ||
|
||
public record SetFilters(EventFilter EventFilter, ITraceLogger TraceLogger) : EventLogAction; | ||
public sealed record SetEventsLoading(Guid ActivityId, int Count); | ||
|
||
public record SetOrderBy(ColumnName? OrderBy, ITraceLogger TraceLogger) : EventLogAction; | ||
public sealed record SetFilters(EventFilter EventFilter); | ||
|
||
public record ToggleSorting(ITraceLogger TraceLogger) : EventLogAction; | ||
public sealed record SetFiltersSuccess(EventFilter EventFilter); | ||
} |
Oops, something went wrong.