Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions OTLPView/Components/FilterDialog.razor
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
@using Microsoft.Fast.Components.FluentUI;

<FluentStack>
<FluentCombobox Items=@Parameters @bind-Value="@Parameter" Width="100px" />
<FluentStack Orientation="Orientation.Vertical" VerticalGap="8">
<FluentCombobox Items=@Parameters @bind-Value="@Parameter" Width="100%" />

<FluentSelect TOption="FilterCondition" Items="@Conditions.Keys" @bind-SelectedOption="@Condition" OptionText="@(i => Conditions[i])" Width="100px" />
<FluentSelect TOption="FilterCondition" Items="@Conditions.Keys" @bind-SelectedOption="@Condition" OptionText="@(i => Conditions[i])" Width="100%" />

<FluentTextField @bind-Value="Value" Placeholder="Value" />
</FluentStack>
<FluentTextField @bind-Value="Value" Placeholder="Value" Style="width: 100%;" />

<FluentButton OnClick="Cancel">Cancel</FluentButton>
<FluentButton Color="Color.Primary" OnClick="Apply">Apply Filter</FluentButton>
@if (Content is { })
{
<FluentButton Appearance="Appearance.Stealth" aria-label="Remove Filter" OnClick="Delete"><FluentIcon Value="@(new Icons.Regular.Size16.Delete())" /></FluentButton>
}
<FluentStack Orientation="Orientation.Horizontal" HorizontalGap="8">
<FluentButton OnClick="Cancel">Cancel</FluentButton>
<FluentButton Appearance="Appearance.Accent" OnClick="Apply">Apply Filter</FluentButton>
@if (Content is { })
{
<FluentButton Appearance="Appearance.Stealth" aria-label="Remove Filter" OnClick="Delete"><FluentIcon Value="@(new Icons.Regular.Size16.Delete())" /></FluentButton>
}
</FluentStack>
</FluentStack>

11 changes: 3 additions & 8 deletions OTLPView/Pages/LogViewer.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,13 @@ private void OpenFilter(LogFilter entry)
Fluent.DialogParameters<LogFilter> parameters = new()
{
OnDialogResult = DialogService.CreateDialogCallback(this, HandleDialog),
ShowTitle = false,
ShowDismiss = false,

Width = "600px",
Height = "100px",
Title = "Filter",
Alignment = Fluent.HorizontalAlignment.Right,
Content = entry,
TrapFocus = true,
Modal = true,
PrimaryAction = null,
SecondaryAction = null,
};
DialogService.ShowDialog<FilterDialog, LogFilter>(parameters);
DialogService.ShowPanel<FilterDialog, LogFilter>(parameters);
}

private async Task HandleDialog(Fluent.DialogResult result)
Expand Down