Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add list of matched requests on mapping
- Loading branch information
1 parent
4368cd8
commit 19d2aa2
Showing
5 changed files
with
113 additions
and
38 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,38 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:viewModels="clr-namespace:WireMockInspector.ViewModels" | ||
xmlns:avalonia="clr-namespace:Markdown.Avalonia;assembly=Markdown.Avalonia" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="WireMockInspector.Views.RequestLogs" | ||
x:DataType="viewModels:RequestLogViewModel"> | ||
<ItemsControl Items="{Binding }"> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate> | ||
<Expander HorizontalAlignment="Stretch"> | ||
<Expander.Header> | ||
<DockPanel HorizontalAlignment="Stretch"> | ||
<TextBlock VerticalAlignment="Center" Margin="0,0,10,0" Text="{Binding Timestamp, StringFormat={}{0:s}}"></TextBlock> | ||
<Border Width="100" BorderThickness="2" Margin="5,0" VerticalAlignment="Center" CornerRadius="5" BorderBrush="{Binding Method, Converter={x:Static viewModels:RequestMethodToColorConverter.Instance}}"> | ||
<TextBlock TextAlignment="Center" Text="{Binding Method}" Margin="5" Foreground="white"></TextBlock> | ||
</Border> | ||
<TextBlock Margin="10,0" VerticalAlignment="Center" Text="{Binding Path}"></TextBlock> | ||
<Border HorizontalAlignment="Right" DockPanel.Dock="Right" ToolTip.Tip="{Binding StatusCode, Converter={x:Static viewModels:HttpStatusCodeToDescriptionConverter.Instance}}" Grid.Column="4" BorderThickness="2" Margin="5,0" VerticalAlignment="Center" CornerRadius="5" BorderBrush="{Binding StatusCode, Converter={x:Static viewModels:ResponseCodeToColorConverter.Instance}}"> | ||
<TextBlock TextAlignment="Center" Text="{Binding StatusCode}" Margin="5" Foreground="white"></TextBlock> | ||
</Border> | ||
</DockPanel> | ||
</Expander.Header> | ||
<TabControl Classes="minor"> | ||
<TabItem Header="Request"> | ||
<avalonia:MarkdownScrollViewer Markdown="{Binding RequestDefinition}"></avalonia:MarkdownScrollViewer> | ||
</TabItem> | ||
<TabItem Header="Response"> | ||
<avalonia:MarkdownScrollViewer Markdown="{Binding ResponseDefinition}"></avalonia:MarkdownScrollViewer> | ||
</TabItem> | ||
</TabControl> | ||
</Expander> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
</ItemsControl> | ||
</UserControl> |
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 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace WireMockInspector.Views; | ||
|
||
public partial class RequestLogs : UserControl | ||
{ | ||
public RequestLogs() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
} |
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