1818 <ColumnDefinition Width =" 59*" />
1919 <ColumnDefinition Width =" 853*" />
2020 </Grid .ColumnDefinitions>
21+
2122 <Grid .RowDefinitions>
2223 <RowDefinition Height =" 125" />
2324 <!-- Header -->
@@ -124,7 +125,7 @@ ToolTip="Only show a maximum of this amount of sessions" Background="White" Vert
124125 </Border >
125126
126127 <!-- Key Metrics Cards -->
127- <Grid Margin =" 15,50,15,0" Grid.ColumnSpan=" 4" >
128+ <Grid Margin =" 15,50,15,0" Grid.ColumnSpan=" 4" >
128129 <Grid .ColumnDefinitions>
129130 <ColumnDefinition Width =" *" />
130131 <ColumnDefinition Width =" *" />
@@ -134,12 +135,8 @@ ToolTip="Only show a maximum of this amount of sessions" Background="White" Vert
134135 <ColumnDefinition Width =" *" />
135136 <ColumnDefinition Width =" *" />
136137 <ColumnDefinition Width =" *" />
137- <ColumnDefinition Width =" *" />
138-
139-
140-
141-
142- </Grid .ColumnDefinitions>
138+ <ColumnDefinition Width =" *" />
139+ </Grid .ColumnDefinitions>
143140 <Border Grid.Column=" 0" Background =" White" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
144141 <StackPanel >
145142 <TextBlock Text =" CPU %" FontSize =" 11" Foreground =" #666" />
@@ -200,7 +197,96 @@ ToolTip="Only show a maximum of this amount of sessions" Background="White" Vert
200197 </StackPanel >
201198 </Border >
202199 </Grid >
200+ <Grid Margin =" 15,0,10,0" Grid.Row=" 1" Grid.ColumnSpan=" 4" MinHeight =" 10" >
201+ </Grid >
202+ <Grid Margin =" 15,0,10,0" Grid.Row=" 1" Grid.ColumnSpan=" 4" MinHeight =" 25" >
203+ <Grid .ColumnDefinitions>
204+ <ColumnDefinition Width =" *" />
205+ <ColumnDefinition Width =" *" />
206+ <ColumnDefinition Width =" *" />
207+ <ColumnDefinition Width =" *" />
208+ <ColumnDefinition Width =" *" />
209+ <ColumnDefinition Width =" *" />
210+ <ColumnDefinition Width =" *" />
211+ <ColumnDefinition Width =" *" />
212+ <ColumnDefinition Width =" *" />
203213
214+ </Grid .ColumnDefinitions>
215+ <Border Grid.Column=" 0" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
216+ <StackPanel >
217+ <TextBlock Text =" ServerName" FontSize =" 11" Foreground =" White" />
218+ <TextBlock x : Name =" ServerNameText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
219+ </StackPanel >
220+ </Border >
221+ <Border Grid.Column=" 1" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
222+ <StackPanel >
223+ <TextBlock Text =" Build Nr" FontSize =" 11" Foreground =" White" />
224+ <TextBlock x : Name =" BuildNrText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
225+ </StackPanel >
226+ </Border >
227+ <Border Grid.Column=" 2" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
228+ <StackPanel >
229+ <TextBlock Text =" Edition" FontSize =" 11" Foreground =" White" />
230+ <TextBlock x : Name =" EditionText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
231+ </StackPanel >
232+ </Border >
233+ <Border Grid.Column=" 3" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
234+ <StackPanel >
235+ <TextBlock Text =" Estimated Annual Licensing" FontSize =" 11" Foreground =" White" />
236+ <TextBlock x : Name =" LicensingText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
237+ </StackPanel >
238+ </Border >
239+ <Border Grid.Column=" 4" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
240+ <StackPanel >
241+ <TextBlock Text =" Version" FontSize =" 11" Foreground =" White" />
242+ <TextBlock x : Name =" VersionText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
243+ </StackPanel >
244+ </Border >
245+ <Border Grid.Column=" 5" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
246+ <StackPanel >
247+ <TextBlock Text =" CPU Sockets : Virtual CPUs" FontSize =" 11" Foreground =" White" />
248+ <TextBlock x : Name =" SocketsText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
249+ </StackPanel >
250+ </Border >
251+ <Border Grid.Column=" 6" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
252+ <StackPanel >
253+ <TextBlock Text =" Server Memory GB" FontSize =" 11" Foreground =" White" />
254+ <TextBlock x : Name =" MemoryGBText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
255+ </StackPanel >
256+ </Border >
257+ <Border Grid.Column=" 7" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
258+ <StackPanel >
259+ <TextBlock Text =" SQL Allocated Memory GB" FontSize =" 11" Foreground =" White" />
260+ <TextBlock x : Name =" UsedbySQLGBText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
261+ </StackPanel >
262+ </Border >
263+ <Border Grid.Column=" 8" Background =" Black" CornerRadius =" 4" Padding =" 5" Margin =" 15,0,5,0" >
264+ <StackPanel >
265+ <TextBlock Text =" High-Availability" FontSize =" 11" Foreground =" White" />
266+ <TextBlock x : Name =" HADRText" Text =" --" FontSize =" 18" FontWeight =" Bold" Foreground =" White" />
267+ </StackPanel >
268+ </Border >
269+ <!--
270+ var r = dt.Rows[0];
271+ var sn = r["ServerName"]; ServerNameText
272+ var ed = r["Edition"]; EditionText
273+ var sckt = Convert.ToInt32(r["Sockets"]); SocketsText
274+ var cpus = Convert.ToInt32(r["Virtual CPUs"]); VirtualCPUsText
275+ var vm = r["VM Type"];
276+ var ram = Convert.ToDouble(r["MemoryGB"]); MemoryGBText
277+ var all = Convert.ToDouble(r["SQL Allocated"]);
278+ var usd = Convert.ToDouble(r["Used by SQL"]); UsedbySQLGBText
279+ var ms = r["Memory State"];
280+ var vs = r["Version"]; VersionText
281+ var bld = r["BuildNr"]; BuildNrText
282+ var os = r["OS"];
283+ var ha = r["HADR"]; HADRText
284+ var sa = r["SA"];
285+ var lvl = r["Level"];
286+
287+ -->
288+
289+ </Grid >
204290
205291 <Grid Grid.Row=" 2" Margin =" 15,0,15,0" Grid.ColumnSpan=" 4" MinHeight =" 25" >
206292 <Grid .ColumnDefinitions>
@@ -434,7 +520,7 @@ ToolTip="View the full query text in a copyable window"/>
434520
435521 <TextBlock Text =" Top Usage Queries" FontSize =" 16" FontWeight =" SemiBold" Grid.Row=" 0" Grid.Column=" 0" />
436522 <TextBlock x : Name =" TopQueriesCountText" Width =" 50" Grid.Row=" 0" Grid.Column=" 1" Text =" (refreshes every 30 ticks)" FontSize =" 12" Foreground =" #888" VerticalAlignment =" Center" Margin =" 10,0,0,0" />
437- <Button x : Name =" ViewBlockingQueryButton " Content =" 📋 View Query" Grid.Row=" 0" Grid.Column=" 2"
523+ <Button x : Name =" ViewTopQueryButton " Content =" 📋 View Query" Grid.Row=" 0" Grid.Column=" 2"
438524 Click =" ViewQueryButton_Click"
439525 Width =" 50"
440526 Padding =" 8,4" Margin =" 20,0,5,0"
0 commit comments