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
7 changes: 5 additions & 2 deletions AxialSqlTools/AxialSqlTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@
<PackageReference Include="Octokit">
<Version>14.0.0</Version>
</PackageReference>
<PackageReference Include="OxyPlot.Wpf">
<Version>2.2.0</Version>
<PackageReference Include="ScottPlot.WPF">
<Version>5.1.57</Version>
</PackageReference>
<PackageReference Include="SkiaSharp.Views.WPF">
<Version>3.119.1</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
<Version>4.3.4</Version>
Expand Down
24 changes: 10 additions & 14 deletions AxialSqlTools/AxialSqlToolsPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,17 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
_logger.Error(ex, "An exception occurred");
}

// needed for the OxyPlot library
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);


}

private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
// add this into main module -> AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

if (args.Name.Contains("OxyPlot") || args.Name.Contains("SkiaSharp"))
return AppDomain.CurrentDomain.Load(args.Name);
else return null;
}

#endregion
Expand Down Expand Up @@ -511,18 +519,6 @@ public void LoadGlobalSnippets()

}

// I don't understand the purpose, but it works
private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
// add this into main module -> AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

if (args.Name.Contains("OxyPlot"))
return AppDomain.CurrentDomain.Load(args.Name);
else return null;
}
//----------------


// This method aligns all numeric values to the right
public static void SQLResultsControl_ScriptExecutionCompleted(object QEOLESQLExec, object b)
{
Expand Down
46 changes: 23 additions & 23 deletions AxialSqlTools/HealthDashboards/HealthDashboard_ServerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vsshell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:oxy="http://oxyplot.org/wpf"
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="1000"
x:Name="MyToolWindow">
Expand Down Expand Up @@ -178,36 +178,36 @@

<!-- Row 1, Column 2: Disk info chart (right panel) -->
<StackPanel Grid.Row="1" Grid.Column="2" Margin="5">
<oxy:PlotView x:Name="DiskInfoModel" Width="400" Height="250"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<sp:WpfPlot x:Name="DiskInfoModel" Width="400" Height="250"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</StackPanel>

<!-- Row 2: Exception label -->
<Label Grid.Row="2" Grid.ColumnSpan="3" HorizontalAlignment="Center"
x:Name="LabelInternalException" Margin="5"/>

<!-- Row 3: Wait Stats plot -->
<oxy:PlotView Grid.Row="3" Grid.ColumnSpan="3" x:Name="WaitStatsModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<sp:WpfPlot Grid.Row="3" Grid.ColumnSpan="3" x:Name="WaitStatsModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Grid>
</TabItem>

<!-- TAB 4: Performance Metrics (15 minutes) -->
<TabItem Header="Performance (15m)">
<ScrollViewer Margin="0" VerticalScrollBarVisibility="Auto">
<UniformGrid Columns="3" Rows="4" Margin="5" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<oxy:PlotView x:Name="PerfChart_CpuUtilization" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_UserConnections" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_BatchRequests" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_SqlCompilations" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_PageLifeExpectancy" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_PageReads" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_PageWrites" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_LogFlushes" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_Transactions" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_LockWaits" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_MemoryGrantsPending" Height="250" Margin="5"/>
<oxy:PlotView x:Name="PerfChart_TotalServerMemory" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_CpuUtilization" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_UserConnections" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_BatchRequests" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_SqlCompilations" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_PageLifeExpectancy" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_PageReads" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_PageWrites" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_LogFlushes" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_Transactions" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_LockWaits" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_MemoryGrantsPending" Height="250" Margin="5"/>
<sp:WpfPlot x:Name="PerfChart_TotalServerMemory" Height="250" Margin="5"/>
</UniformGrid>
</ScrollViewer>
</TabItem>
Expand Down Expand Up @@ -254,10 +254,10 @@
</StackPanel>

<!-- Row 2: Plots -->
<oxy:PlotView Grid.Row="2" Grid.Column="0" x:Name="BackupTimelineModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<oxy:PlotView Grid.Row="2" Grid.Column="1" x:Name="BackupSizeModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<sp:WpfPlot Grid.Row="2" Grid.Column="0" x:Name="BackupTimelineModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<sp:WpfPlot Grid.Row="2" Grid.Column="1" x:Name="BackupSizeModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Grid>
</TabItem>

Expand Down Expand Up @@ -287,8 +287,8 @@
</StackPanel>

<!-- Row 1: Plot -->
<oxy:PlotView Grid.Row="1" x:Name="AgentJobsTimelineModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<sp:WpfPlot Grid.Row="1" x:Name="AgentJobsTimelineModel"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Grid>
</TabItem>

Expand Down
Loading