|
1 | | -<Window x:Class="PerformanceMonitorDashboard.MuteRuleDialog" |
2 | | - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | | - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | | - Title="Create Mute Rule" |
5 | | - SizeToContent="Height" Width="500" |
6 | | - WindowStartupLocation="CenterOwner" |
7 | | - ResizeMode="NoResize" |
8 | | - Background="{DynamicResource BackgroundBrush}"> |
9 | | - <Grid Margin="20"> |
10 | | - <Grid.RowDefinitions> |
11 | | - <RowDefinition Height="Auto"/> |
12 | | - <RowDefinition Height="Auto"/> |
13 | | - <RowDefinition Height="Auto"/> |
14 | | - <RowDefinition Height="Auto"/> |
15 | | - <RowDefinition Height="Auto"/> |
16 | | - <RowDefinition Height="Auto"/> |
17 | | - <RowDefinition Height="Auto"/> |
18 | | - <RowDefinition Height="Auto"/> |
19 | | - <RowDefinition Height="Auto"/> |
20 | | - <RowDefinition Height="Auto"/> |
21 | | - <RowDefinition Height="Auto"/> |
22 | | - <RowDefinition Height="Auto"/> |
23 | | - <RowDefinition Height="Auto"/> |
24 | | - <RowDefinition Height="Auto"/> |
25 | | - <RowDefinition Height="Auto"/> |
26 | | - <RowDefinition Height="Auto"/> |
27 | | - <RowDefinition Height="Auto"/> |
28 | | - </Grid.RowDefinitions> |
29 | | - |
30 | | - <!-- Header --> |
31 | | - <TextBlock Grid.Row="0" x:Name="HeaderText" Text="Create Mute Rule" FontSize="18" FontWeight="Bold" |
32 | | - Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,5"/> |
33 | | - <TextBlock Grid.Row="1" Text="Alerts matching all specified fields will be suppressed from notifications." |
34 | | - Foreground="{DynamicResource ForegroundDimBrush}" TextWrapping="Wrap" Margin="0,0,0,15"/> |
35 | | - |
36 | | - <!-- Reason --> |
37 | | - <TextBlock Grid.Row="2" Text="Reason (optional)" FontWeight="Bold" |
38 | | - Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
39 | | - <TextBox Grid.Row="3" x:Name="ReasonBox" Margin="0,0,0,12"/> |
40 | | - |
41 | | - <!-- Expiration --> |
42 | | - <TextBlock Grid.Row="4" Text="Expires After" FontWeight="Bold" |
43 | | - Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
44 | | - <ComboBox Grid.Row="5" x:Name="ExpirationCombo" SelectedIndex="3" Margin="0,0,0,12"> |
45 | | - <ComboBoxItem Content="1 hour"/> |
46 | | - <ComboBoxItem Content="24 hours"/> |
47 | | - <ComboBoxItem Content="7 days"/> |
48 | | - <ComboBoxItem Content="Never (permanent)"/> |
49 | | - </ComboBox> |
50 | | - |
51 | | - <!-- Separator --> |
52 | | - <Border Grid.Row="6" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,0,0,12"/> |
53 | | - |
54 | | - <!-- Match Criteria --> |
55 | | - <TextBlock Grid.Row="7" Text="Match Criteria" FontSize="14" FontWeight="SemiBold" |
56 | | - Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
57 | | - <TextBlock Grid.Row="8" Text="Leave fields blank to match any value. All filled fields must match (AND logic)." |
58 | | - Foreground="{DynamicResource ForegroundDimBrush}" TextWrapping="Wrap" Margin="0,0,0,12"/> |
59 | | - |
60 | | - <!-- Server Name --> |
61 | | - <TextBlock Grid.Row="9" Text="Server Name (exact match)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
62 | | - <TextBox Grid.Row="10" x:Name="ServerNameBox" Margin="0,0,0,8"/> |
63 | | - |
64 | | - <!-- Metric Name --> |
65 | | - <TextBlock Grid.Row="11" Text="Metric" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
66 | | - <ComboBox Grid.Row="12" x:Name="MetricCombo" SelectedIndex="0" Margin="0,0,0,8" |
67 | | - SelectionChanged="MetricCombo_SelectionChanged"> |
68 | | - <ComboBoxItem Content="(any)"/> |
69 | | - <ComboBoxItem Content="Blocking Detected"/> |
70 | | - <ComboBoxItem Content="Deadlocks Detected"/> |
71 | | - <ComboBoxItem Content="High CPU"/> |
72 | | - <ComboBoxItem Content="Poison Wait"/> |
73 | | - <ComboBoxItem Content="Long-Running Query"/> |
74 | | - <ComboBoxItem Content="TempDB Space"/> |
75 | | - <ComboBoxItem Content="Long-Running Job"/> |
76 | | - </ComboBox> |
77 | | - |
78 | | - <!-- Pattern fields in a uniform grid --> |
79 | | - <Grid Grid.Row="13" x:Name="PatternFieldsGrid" Margin="0,0,0,8"> |
80 | | - <Grid.ColumnDefinitions> |
81 | | - <ColumnDefinition Width="*"/> |
82 | | - <ColumnDefinition Width="8"/> |
83 | | - <ColumnDefinition Width="*"/> |
84 | | - </Grid.ColumnDefinitions> |
85 | | - <Grid.RowDefinitions> |
86 | | - <RowDefinition Height="Auto"/> |
87 | | - <RowDefinition Height="Auto"/> |
88 | | - <RowDefinition Height="Auto"/> |
89 | | - <RowDefinition Height="Auto"/> |
90 | | - </Grid.RowDefinitions> |
91 | | - |
92 | | - <TextBlock Grid.Row="0" Grid.Column="0" x:Name="DatabaseLabel" Text="Database (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
93 | | - <TextBox Grid.Row="1" Grid.Column="0" x:Name="DatabasePatternBox" Margin="0,0,0,8"/> |
94 | | - |
95 | | - <TextBlock Grid.Row="0" Grid.Column="2" x:Name="WaitTypeLabel" Text="Wait Type (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
96 | | - <TextBox Grid.Row="1" Grid.Column="2" x:Name="WaitTypePatternBox" Margin="0,0,0,8"/> |
97 | | - |
98 | | - <TextBlock Grid.Row="2" Grid.Column="0" x:Name="QueryTextLabel" Text="Query Text (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
99 | | - <TextBox Grid.Row="3" Grid.Column="0" x:Name="QueryTextPatternBox" Margin="0,0,0,8"/> |
100 | | - |
101 | | - <TextBlock Grid.Row="2" Grid.Column="2" x:Name="JobNameLabel" Text="Job Name (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
102 | | - <TextBox Grid.Row="3" Grid.Column="2" x:Name="JobNamePatternBox" Margin="0,0,0,8"/> |
103 | | - </Grid> |
104 | | - |
105 | | - <!-- Buttons --> |
106 | | - <StackPanel Grid.Row="16" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0"> |
107 | | - <Button Content="Save" Width="80" Height="28" Margin="0,0,8,0" |
108 | | - Click="Save_Click" Style="{StaticResource AccentButton}"/> |
109 | | - <Button Content="Cancel" Width="80" Height="28" Click="Cancel_Click" IsCancel="True"/> |
110 | | - </StackPanel> |
111 | | - </Grid> |
112 | | -</Window> |
| 1 | +<Window x:Class="PerformanceMonitorDashboard.MuteRuleDialog" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + Title="Create Mute Rule" |
| 5 | + SizeToContent="Height" Width="500" |
| 6 | + WindowStartupLocation="CenterOwner" |
| 7 | + ResizeMode="NoResize" |
| 8 | + Background="{DynamicResource BackgroundBrush}"> |
| 9 | + <Grid Margin="20"> |
| 10 | + <Grid.RowDefinitions> |
| 11 | + <RowDefinition Height="Auto"/> |
| 12 | + <RowDefinition Height="Auto"/> |
| 13 | + <RowDefinition Height="Auto"/> |
| 14 | + <RowDefinition Height="Auto"/> |
| 15 | + <RowDefinition Height="Auto"/> |
| 16 | + <RowDefinition Height="Auto"/> |
| 17 | + <RowDefinition Height="Auto"/> |
| 18 | + <RowDefinition Height="Auto"/> |
| 19 | + <RowDefinition Height="Auto"/> |
| 20 | + <RowDefinition Height="Auto"/> |
| 21 | + <RowDefinition Height="Auto"/> |
| 22 | + <RowDefinition Height="Auto"/> |
| 23 | + <RowDefinition Height="Auto"/> |
| 24 | + <RowDefinition Height="Auto"/> |
| 25 | + <RowDefinition Height="Auto"/> |
| 26 | + <RowDefinition Height="Auto"/> |
| 27 | + <RowDefinition Height="Auto"/> |
| 28 | + </Grid.RowDefinitions> |
| 29 | + |
| 30 | + <!-- Header --> |
| 31 | + <TextBlock Grid.Row="0" x:Name="HeaderText" Text="Create Mute Rule" FontSize="18" FontWeight="Bold" |
| 32 | + Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,5"/> |
| 33 | + <TextBlock Grid.Row="1" Text="Alerts matching all specified fields will be suppressed from notifications." |
| 34 | + Foreground="{DynamicResource ForegroundDimBrush}" TextWrapping="Wrap" Margin="0,0,0,15"/> |
| 35 | + |
| 36 | + <!-- Reason --> |
| 37 | + <TextBlock Grid.Row="2" Text="Reason (optional)" FontWeight="Bold" |
| 38 | + Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 39 | + <TextBox Grid.Row="3" x:Name="ReasonBox" Margin="0,0,0,12"/> |
| 40 | + |
| 41 | + <!-- Expiration --> |
| 42 | + <TextBlock Grid.Row="4" Text="Expires After" FontWeight="Bold" |
| 43 | + Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 44 | + <ComboBox Grid.Row="5" x:Name="ExpirationCombo" SelectedIndex="3" Margin="0,0,0,12"> |
| 45 | + <ComboBoxItem Content="1 hour"/> |
| 46 | + <ComboBoxItem Content="24 hours"/> |
| 47 | + <ComboBoxItem Content="7 days"/> |
| 48 | + <ComboBoxItem Content="Never (permanent)"/> |
| 49 | + </ComboBox> |
| 50 | + |
| 51 | + <!-- Separator --> |
| 52 | + <Border Grid.Row="6" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,0,0,12"/> |
| 53 | + |
| 54 | + <!-- Match Criteria --> |
| 55 | + <TextBlock Grid.Row="7" Text="Match Criteria" FontSize="14" FontWeight="SemiBold" |
| 56 | + Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 57 | + <TextBlock Grid.Row="8" Text="Leave fields blank to match any value. All filled fields must match (AND logic)." |
| 58 | + Foreground="{DynamicResource ForegroundDimBrush}" TextWrapping="Wrap" Margin="0,0,0,12"/> |
| 59 | + |
| 60 | + <!-- Server Name --> |
| 61 | + <TextBlock Grid.Row="9" Text="Server Name (exact match)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 62 | + <TextBox Grid.Row="10" x:Name="ServerNameBox" Margin="0,0,0,8"/> |
| 63 | + |
| 64 | + <!-- Metric Name --> |
| 65 | + <TextBlock Grid.Row="11" Text="Metric" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 66 | + <ComboBox Grid.Row="12" x:Name="MetricCombo" SelectedIndex="0" Margin="0,0,0,8" |
| 67 | + SelectionChanged="MetricCombo_SelectionChanged"> |
| 68 | + <ComboBoxItem Content="(any)"/> |
| 69 | + <ComboBoxItem Content="Blocking Detected"/> |
| 70 | + <ComboBoxItem Content="Deadlocks Detected"/> |
| 71 | + <ComboBoxItem Content="High CPU"/> |
| 72 | + <ComboBoxItem Content="Poison Wait"/> |
| 73 | + <ComboBoxItem Content="Long-Running Query"/> |
| 74 | + <ComboBoxItem Content="TempDB Space"/> |
| 75 | + <ComboBoxItem Content="Long-Running Job"/> |
| 76 | + </ComboBox> |
| 77 | + |
| 78 | + <!-- Pattern fields in a uniform grid --> |
| 79 | + <Grid Grid.Row="13" x:Name="PatternFieldsGrid" Margin="0,0,0,8"> |
| 80 | + <Grid.ColumnDefinitions> |
| 81 | + <ColumnDefinition Width="*"/> |
| 82 | + <ColumnDefinition Width="8"/> |
| 83 | + <ColumnDefinition Width="*"/> |
| 84 | + </Grid.ColumnDefinitions> |
| 85 | + <Grid.RowDefinitions> |
| 86 | + <RowDefinition Height="Auto"/> |
| 87 | + <RowDefinition Height="Auto"/> |
| 88 | + <RowDefinition Height="Auto"/> |
| 89 | + <RowDefinition Height="Auto"/> |
| 90 | + </Grid.RowDefinitions> |
| 91 | + |
| 92 | + <TextBlock Grid.Row="0" Grid.Column="0" x:Name="DatabaseLabel" Text="Database (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 93 | + <TextBox Grid.Row="1" Grid.Column="0" x:Name="DatabasePatternBox" Margin="0,0,0,8"/> |
| 94 | + |
| 95 | + <TextBlock Grid.Row="0" Grid.Column="2" x:Name="WaitTypeLabel" Text="Wait Type (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 96 | + <TextBox Grid.Row="1" Grid.Column="2" x:Name="WaitTypePatternBox" Margin="0,0,0,8"/> |
| 97 | + |
| 98 | + <TextBlock Grid.Row="2" Grid.Column="0" x:Name="QueryTextLabel" Text="Query Text (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 99 | + <TextBox Grid.Row="3" Grid.Column="0" x:Name="QueryTextPatternBox" Margin="0,0,0,8" |
| 100 | + ToolTip="Alerts whose query text contains this value (case-insensitive) will be muted. Use a distinctive fragment such as a table name or procedure call."/> |
| 101 | + |
| 102 | + <TextBlock Grid.Row="2" Grid.Column="2" x:Name="JobNameLabel" Text="Job Name (substring)" Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,0,4"/> |
| 103 | + <TextBox Grid.Row="3" Grid.Column="2" x:Name="JobNamePatternBox" Margin="0,0,0,8"/> |
| 104 | + </Grid> |
| 105 | + |
| 106 | + <!-- Buttons --> |
| 107 | + <StackPanel Grid.Row="16" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0"> |
| 108 | + <Button Content="Save" Width="80" Height="28" Margin="0,0,8,0" |
| 109 | + Click="Save_Click" Style="{StaticResource AccentButton}"/> |
| 110 | + <Button Content="Cancel" Width="80" Height="28" Click="Cancel_Click" IsCancel="True"/> |
| 111 | + </StackPanel> |
| 112 | + </Grid> |
| 113 | +</Window> |
0 commit comments