Skip to content

Commit

Permalink
Removed color filter from excluded filters and updated text to indica…
Browse files Browse the repository at this point in the history
…te exclusion
  • Loading branch information
jschick04 authored and bill-long committed May 8, 2024
1 parent 3419095 commit cc1258e
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,29 @@
<div class="flex-align-center">
@if (Value.IsEditing)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")"
T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
@if (!Value.IsExcluded)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")"
T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
}

<span>
Expression:
<input class="input advanced-filter" type="text"
@if (Value.IsExcluded)
{
<text>Exclude Expression: </text>
}
else
{
<text>Expression: </text>
}
<input class="input advanced-filter" @oninput="OnInputChanged"
placeholder="(Id == 1000 || Id == 1001) && Description.Contains('Fault')"
value="@Value.Comparison.Value" @oninput="OnInputChanged" />
type="text" value="@Value.Comparison.Value" />
</span>
}
else if (string.IsNullOrWhiteSpace(Value.Comparison.Value))
Expand Down
25 changes: 17 additions & 8 deletions src/EventLogExpert/Shared/Components/Filters/FilterCacheRow.razor
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
@using EventLogExpert.UI
@using EventLogExpert.UI.Models

<div class="flex-space-between">
<div class="flex-align-center">
@if (Value.IsEditing)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")" T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
if (!Value.IsExcluded)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")" T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
}

<span>Cache Type: </span>
<ValueSelect CssClass="input filter-dropdown" T="CacheType" @bind-Value="_cacheType" ToStringFunc="x => x.ToFullString()">
Expand All @@ -20,7 +22,14 @@
}
</ValueSelect>

<span>Value: </span>
if (Value.IsExcluded)
{
<span>Exclude Value: </span>
}
else
{
<span>Value: </span>
}
<ValueSelect CssClass="input cache-dropdown" T="string" @bind-Value="_filterValue" IsInput>
@if (Items.Any())
{
Expand Down
32 changes: 21 additions & 11 deletions src/EventLogExpert/Shared/Components/Filters/FilterGroupRow.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,29 @@
<div class="flex-align-center">
@if (Value.IsEditing)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")"
T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
if (!Value.IsExcluded)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")"
T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
}

<span>
Expression:
<input class="input advanced-filter" type="text"
placeholder="(Id == 1000 || Id == 1001) && Description.Contains('Fault')"
value="@Value.Comparison.Value" @oninput="OnInputChanged" />
@if (Value.IsExcluded)
{
<text>Exclude Expression: </text>
}
else
{
<text>Expression: </text>
}
<input class="input advanced-filter" @oninput="OnInputChanged"
placeholder="(Id == 1000 || Id == 1001) && Description.Contains('Fault')"
type="text" value="@Value.Comparison.Value" />
</span>
}
else if (string.IsNullOrWhiteSpace(Value.Comparison.Value))
Expand Down
24 changes: 17 additions & 7 deletions src/EventLogExpert/Shared/Components/Filters/FilterRow.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@
<div class="flex-align-center">
@if (Value.IsEditing)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")" T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
if (!Value.IsExcluded)
{
<ValueSelect CssClass="@($"input color-dropdown {Value.Color.ToString().ToLower()}")" T="HighlightColor" @bind-Value="Value.Color">
@foreach (HighlightColor item in Enum.GetValues(typeof(HighlightColor)))
{
<ValueSelectItem CssClass="@($"color-dropdown-item {item.ToString().ToLower()}")" T="HighlightColor" Value="item" />
}
</ValueSelect>
}

<span>Filter On: </span>
if (Value.IsExcluded)
{
<span>Exclude On: </span>
}
else
{
<span>Filter On: </span>
}
<ValueSelect CssClass="input filter-dropdown" T="FilterCategory" @bind-Value="Value.Data.Category" ToStringFunc="x => x.ToFullString()">
@foreach (FilterCategory item in Enum.GetValues(typeof(FilterCategory)))
{
Expand Down

0 comments on commit cc1258e

Please sign in to comment.