Permalink
Browse files

Library update, including UnconstrainedMelody to reduce allocations.

  • Loading branch information...
1 parent 5a46f26 commit e1997a76720c1cfe5716ecb30f944726b0f75ced Nick Craver committed Aug 4, 2016
Showing with 480 additions and 63 deletions.
  1. +1 −0 Opserver.Core/Data/HAProxy/Item.cs
  2. +1 −0 Opserver.Core/Data/Pagerduty/PagerDutyAPI.Incidents.cs
  3. +1 −0 Opserver.Core/Data/SQL/SQLInstance.Databases.cs
  4. +1 −0 Opserver.Core/Data/SQL/SQLInstance.Jobs.cs
  5. +2 −1 Opserver.Core/Data/SQL/SQLInstance.Services.cs
  6. +3 −2 Opserver.Core/Data/SQL/SQLNode.AvailabilityGroups.AGDatabaseReplica.cs
  7. +1 −0 Opserver.Core/Data/SQL/SQLNode.AvailabilityGroups.AGReplica.cs
  8. +1 −0 Opserver.Core/Data/SQL/SQLNode.TCPListeners.cs
  9. +1 −20 Opserver.Core/ExtensionMethods.cs
  10. +9 −5 Opserver.Core/Opserver.Core.csproj
  11. +4 −3 Opserver.Core/packages.config
  12. +5 −4 Opserver/ExtensionMethods.cs
  13. +2 −0 Opserver/Models/ExtensionMethods.cs
  14. +9 −5 Opserver/Opserver.csproj
  15. +1 −1 Opserver/Views/SQL/Databases.Modal.Backups.cshtml
  16. +1 −1 Opserver/Views/SQL/Instance.Jobs.cshtml
  17. +2 −2 Opserver/Views/SQL/Instance.cshtml
  18. +1 −1 Opserver/Views/SQL/Operations.Top.cshtml
  19. +2 −2 Opserver/Views/SQL/Servers.AvailabilityGroup.cshtml
  20. +1 −1 Opserver/Views/SQL/Servers.ClusterDetail.cshtml
  21. +1 −0 Opserver/Views/Web.config
  22. +4 −3 Opserver/packages.config
  23. BIN packages/Dapper.1.50.0-rc2b/Dapper.1.50.0-rc2b.nupkg
  24. BIN packages/Dapper.1.50.0-rc2b/lib/net40/Dapper.dll
  25. BIN packages/Dapper.1.50.0-rc2b/lib/net45/Dapper.dll
  26. BIN packages/Dapper.1.50.0-rc2b/lib/net451/Dapper.dll
  27. BIN packages/Dapper.1.50.0-rc2b/lib/netstandard1.3/Dapper.dll
  28. BIN packages/Dapper.1.50.2/Dapper.1.50.2.nupkg
  29. BIN packages/Dapper.1.50.2/lib/net40/Dapper.dll
  30. 0 packages/{Dapper.1.50.0-rc2b → Dapper.1.50.2}/lib/net40/Dapper.xml
  31. BIN packages/Dapper.1.50.2/lib/net45/Dapper.dll
  32. 0 packages/{Dapper.1.50.0-rc2b/lib/net451 → Dapper.1.50.2/lib/net45}/Dapper.xml
  33. BIN packages/Dapper.1.50.2/lib/net451/Dapper.dll
  34. 0 packages/{Dapper.1.50.0-rc2b/lib/net45 → Dapper.1.50.2/lib/net451}/Dapper.xml
  35. BIN packages/Dapper.1.50.2/lib/netstandard1.3/Dapper.dll
  36. 0 packages/{Dapper.1.50.0-rc2b → Dapper.1.50.2}/lib/netstandard1.3/Dapper.xml
  37. BIN packages/Microsoft.Net.Compilers.1.1.1/Microsoft.Net.Compilers.1.1.1.nupkg
  38. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.Build.Tasks.CodeAnalysis.dll
  39. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.CodeAnalysis.CSharp.Scripting.dll
  40. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.CodeAnalysis.CSharp.dll
  41. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.CodeAnalysis.Scripting.dll
  42. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.CodeAnalysis.VisualBasic.dll
  43. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.CodeAnalysis.dll
  44. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.DiaSymReader.Native.amd64.dll
  45. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/Microsoft.DiaSymReader.Native.x86.dll
  46. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/System.Console.dll
  47. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/System.Reflection.Metadata.dll
  48. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/VBCSCompiler.exe
  49. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/csc.exe
  50. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/csi.exe
  51. BIN packages/Microsoft.Net.Compilers.1.1.1/tools/vbc.exe
  52. BIN packages/Microsoft.Net.Compilers.1.3.2/Microsoft.Net.Compilers.1.3.2.nupkg
  53. 0 packages/{Microsoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/ThirdPartyNotices.rtf
  54. 0 ...icrosoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/build/Microsoft.Net.Compilers.props
  55. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.Build.Tasks.CodeAnalysis.dll
  56. +3 −0 ...icrosoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/Microsoft.CSharp.Core.targets
  57. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.CodeAnalysis.CSharp.Scripting.dll
  58. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.CodeAnalysis.CSharp.dll
  59. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.CodeAnalysis.Scripting.dll
  60. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.CodeAnalysis.VisualBasic.dll
  61. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.CodeAnalysis.dll
  62. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.DiaSymReader.Native.amd64.dll
  63. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/Microsoft.DiaSymReader.Native.x86.dll
  64. +3 −0 ...oft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/Microsoft.VisualBasic.Core.targets
  65. BIN packages/{Microsoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/System.AppContext.dll
  66. BIN ...osoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/System.Collections.Immutable.dll
  67. BIN ...soft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/System.Diagnostics.StackTrace.dll
  68. BIN ...ft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/System.IO.FileSystem.Primitives.dll
  69. BIN ...es/{Microsoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/System.IO.FileSystem.dll
  70. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/System.Reflection.Metadata.dll
  71. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/VBCSCompiler.exe
  72. +4 −4 ...ges/{Microsoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/VBCSCompiler.exe.config
  73. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/csc.exe
  74. +4 −4 packages/{Microsoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/csc.exe.config
  75. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/csi.exe
  76. BIN packages/Microsoft.Net.Compilers.1.3.2/tools/vbc.exe
  77. +4 −4 packages/{Microsoft.Net.Compilers.1.1.1 → Microsoft.Net.Compilers.1.3.2}/tools/vbc.exe.config
  78. BIN packages/Newtonsoft.Json.9.0.1-beta1/Newtonsoft.Json.9.0.1-beta1.nupkg
  79. BIN packages/Newtonsoft.Json.9.0.1/Newtonsoft.Json.9.0.1.nupkg
  80. BIN packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net20/Newtonsoft.Json.dll
  81. 0 packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net20/Newtonsoft.Json.xml
  82. BIN packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net35/Newtonsoft.Json.dll
  83. 0 packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net35/Newtonsoft.Json.xml
  84. BIN packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net40/Newtonsoft.Json.dll
  85. 0 packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net40/Newtonsoft.Json.xml
  86. BIN packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net45/Newtonsoft.Json.dll
  87. 0 packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/net45/Newtonsoft.Json.xml
  88. BIN ...ages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/netstandard1.0/Newtonsoft.Json.dll
  89. 0 ...ages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/netstandard1.0/Newtonsoft.Json.xml
  90. BIN ...n.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
  91. 0 ...n.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
  92. BIN ....Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll
  93. 0 ....Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
  94. 0 packages/{Newtonsoft.Json.9.0.1-beta1 → Newtonsoft.Json.9.0.1}/tools/install.ps1
  95. BIN packages/UnconstrainedMelody.0.2.1/UnconstrainedMelody.0.2.1.nupkg
  96. BIN packages/UnconstrainedMelody.0.2.1/lib/UnconstrainedMelody.dll
  97. +408 −0 packages/UnconstrainedMelody.0.2.1/lib/UnconstrainedMelody.xml
@@ -1,5 +1,6 @@
using System;
using System.Text.RegularExpressions;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.HAProxy
{
@@ -4,6 +4,7 @@
using System.Runtime.Serialization;
using System.Threading.Tasks;
using Jil;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.PagerDuty
{
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.SQL
{
@@ -4,6 +4,7 @@
using System.Data.Common;
using System.Threading.Tasks;
using Dapper;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.SQL
{
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.SQL
{
@@ -46,7 +47,7 @@ public string MonitorStatusReason
case ServiceStatuses.PausePending:
return null;
default:
- return ServiceName + " - " + Status.GetDescription();
+ return ServiceName + " - " + (Status.HasValue ? Status.Value.GetDescription() : "");
}
}
}
@@ -1,4 +1,5 @@
using System;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.SQL
{
@@ -101,10 +102,10 @@ public string MonitorStatusReason
}
public string DatabaseStateDescription => DatabaseState.HasValue
- ? DatabaseState.GetDescription() + (IsSuspended.GetValueOrDefault() ? " (Suspended)" : "")
+ ? DatabaseState.Value.GetDescription() + (IsSuspended.GetValueOrDefault() ? " (Suspended)" : "")
: string.Empty;
- public string SuspendReasonDescription => SuspendReason.HasValue ? "Suspended by " + SuspendReason.GetDescription() : string.Empty;
+ public string SuspendReasonDescription => SuspendReason.HasValue ? "Suspended by " + SuspendReason.Value.GetDescription() : string.Empty;
public string GetFetchSQL(Version v) => @"
Select dbrs.database_id DatabaseId,
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.SQL
{
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Data.SQL
{
@@ -14,6 +14,7 @@
using StackExchange.Opserver.Helpers;
using StackExchange.Profiling;
using StackExchange.Redis;
+using UnconstrainedMelody;
namespace StackExchange.Opserver
{
@@ -272,26 +273,6 @@ private static string ToRelativeTimeSimple(TimeSpan ts, string sign)
: string.Join(joinSeparator, o.GetType()
.GetProperties(BindingFlags.Public | BindingFlags.Instance)
.Select(p => p.Name + ":" + p.GetValue(o, null)));
-
- public static string GetDescription<T>(this T? enumValue) where T : struct =>
- enumValue.HasValue ? enumValue.Value.GetDescription() : string.Empty;
-
- /// <summary>
- /// Gets the Description attribute text or the .ToString() of an enum member
- /// </summary>
- public static string GetDescription<T>(this T enumerationValue) where T : struct
- {
- var type = enumerationValue.GetType();
- if (!type.IsEnum) throw new ArgumentException("EnumerationValue must be of Enum type", nameof(enumerationValue));
- var memberInfo = type.GetMember(enumerationValue.ToString());
- if (memberInfo.Length > 0)
- {
- var attrs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
- if (attrs.Length > 0)
- return ((DescriptionAttribute)attrs[0]).Description;
- }
- return enumerationValue.ToString();
- }
/// <summary>
/// Converts a raw long into a readable size
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props')" />
+ <Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -40,8 +40,8 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
- <Reference Include="Dapper, Version=1.50.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Dapper.1.50.0-rc2b\lib\net451\Dapper.dll</HintPath>
+ <Reference Include="Dapper, Version=1.50.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\Dapper.1.50.2\lib\net451\Dapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Jil, Version=2.14.3.0, Culture=neutral, processorArchitecture=MSIL">
@@ -57,7 +57,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>..\packages\Newtonsoft.Json.9.0.1-beta1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sigil, Version=4.7.0.0, Culture=neutral, PublicKeyToken=2d06c3494341c8ab, processorArchitecture=MSIL">
@@ -87,6 +87,10 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
+ <Reference Include="UnconstrainedMelody, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\UnconstrainedMelody.0.2.1\lib\UnconstrainedMelody.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Current.Cache.cs">
@@ -411,7 +415,7 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
- <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props'))" />
+ <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Dapper" version="1.50.0-rc2b" targetFramework="net46" />
+ <package id="Dapper" version="1.50.2" targetFramework="net46" />
<package id="Jil" version="2.14.3" targetFramework="net46" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.1" targetFramework="net45" />
- <package id="Microsoft.Net.Compilers" version="1.1.1" targetFramework="net45" developmentDependency="true" />
+ <package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net46" developmentDependency="true" />
<package id="MiniProfiler" version="3.2.0.157" targetFramework="net45" />
- <package id="Newtonsoft.Json" version="9.0.1-beta1" targetFramework="net46" />
+ <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
<package id="Sigil" version="4.7.0" targetFramework="net46" />
<package id="StackExchange.Exceptional" version="1.0.122" targetFramework="net45" />
<package id="StackExchange.Redis" version="1.1.604-alpha" targetFramework="net46" />
+ <package id="UnconstrainedMelody" version="0.2.1" targetFramework="net46" />
</packages>
@@ -9,6 +9,7 @@
using StackExchange.Opserver.Data.SQL;
using StackExchange.Opserver.Helpers;
using StackExchange.Opserver.Views.Shared;
+using UnconstrainedMelody;
namespace StackExchange.Opserver
{
@@ -488,18 +489,18 @@ public static IHtmlString ToSpan(this SynchronizationStates? state, string toolt
{
case SynchronizationStates.Synchronizing:
case SynchronizationStates.Synchronized:
- return StatusIndicator.UpCustomSpan(state.GetDescription(), tooltip);
+ return StatusIndicator.UpCustomSpan(state.Value.GetDescription(), tooltip);
case SynchronizationStates.NotSynchronizing:
case SynchronizationStates.Reverting:
case SynchronizationStates.Initializing:
- return StatusIndicator.DownCustomSpan(state.GetDescription(), tooltip);
+ return StatusIndicator.DownCustomSpan(state.Value.GetDescription(), tooltip);
default:
- return StatusIndicator.UnknownCustomSpan(state.GetDescription(), tooltip);
+ return StatusIndicator.UnknownCustomSpan(state.Value.GetDescription(), tooltip);
}
}
public static IHtmlString ToSpan(this ReplicaRoles? state, string tooltip = null, bool abbreviate = false)
{
- var desc = state.GetDescription();
+ var desc = state.HasValue ? state.Value.GetDescription() : "";
if (abbreviate) desc = desc.Substring(0, 1);
switch (state)
{
@@ -6,10 +6,12 @@
using System.Web.Mvc;
using System.Xml;
using System.Xml.Xsl;
+using StackExchange.Opserver;
using StackExchange.Opserver.Data;
using StackExchange.Opserver.Data.Dashboard;
using StackExchange.Opserver.Data.SQL;
using StackExchange.Opserver.Helpers;
+using UnconstrainedMelody;
namespace StackExchange.Opserver.Models
{
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props')" />
+ <Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -56,8 +56,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
- <Reference Include="Dapper, Version=1.50.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\packages\Dapper.1.50.0-rc2b\lib\net451\Dapper.dll</HintPath>
+ <Reference Include="Dapper, Version=1.50.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\Dapper.1.50.2\lib\net451\Dapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Jil, Version=2.14.3.0, Culture=neutral, processorArchitecture=MSIL">
@@ -82,7 +82,7 @@
<HintPath>..\packages\MiniProfiler.MVC4.3.0.11\lib\net40\MiniProfiler.Mvc.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>..\packages\Newtonsoft.Json.9.0.1-beta1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sigil, Version=4.7.0.0, Culture=neutral, PublicKeyToken=2d06c3494341c8ab, processorArchitecture=MSIL">
@@ -138,6 +138,10 @@
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Xml.Linq" />
+ <Reference Include="UnconstrainedMelody, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\UnconstrainedMelody.0.2.1\lib\UnconstrainedMelody.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
@@ -768,6 +772,6 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
- <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.1.1\build\Microsoft.Net.Compilers.props'))" />
+ <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props'))" />
</Target>
</Project>
@@ -32,7 +32,7 @@ else {
<td>@(b.StartDate?.ToRelativeTimeSpanMini())</td>
<td>@(b.FinishDate?.ToRelativeTimeSpanMini())</td>
<td>@(b.SizeBytes?.ToSize()) <span class="text-muted">(@(b.CompressedSizeBytes?.ToSize()))</span></td>
- <td>@b.MediaDeviceType.GetDescription()</td>
+ <td>@(b.MediaDeviceType.HasValue ? b.MediaDeviceType.Value.GetDescription() : "")</td>
<td title="@(b.PhysicalDeviceName ?? b.LogicalDeviceName)">@((b.PhysicalDeviceName ?? b.LogicalDeviceName).TruncateWithEllipsis(75))</td>
</tr>
}
@@ -56,7 +56,7 @@ Last Run Message: @j.LastRunMessage">
}
else if (j.LastRunStatus.HasValue)
{
- <td>@j.LastRunMonitorStatus.IconSpan() @j.LastRunMonitorStatus.Span(j.LastRunStatus.GetDescription().IsNullOrEmptyReturn("Unknown")) (@j.LastRunRequestedSource.GetDescription())</td>
+ <td>@j.LastRunMonitorStatus.IconSpan() @j.LastRunMonitorStatus.Span(j.LastRunStatus.Value.GetDescription().IsNullOrEmptyReturn("Unknown")) (@j.LastRunRequestedSource.GetDescription())</td>
<td>@(j.LastStartDate?.ToRelativeTimeSpan())</td>
<td>@(j.LastStopDate?.ToRelativeTimeSpan())</td>
<td>@(j.LastRunDuration.HasValue ? j.LastRunDuration.Value.ToTimeStringMini() : "")</td>
@@ -239,10 +239,10 @@ Top Users:
@foreach (var s in services)
{
<div class="value-block col-md-@cols @s.MonitorStatus.BackgroundClass()" title="Name: @s.ServiceName
- Status: @s.Status.GetDescription()
+ Status: @s.Status.Value.GetDescription()
Account: @s.ServiceAccount
Clustered: @(s.IsClusteredBool ? "Yes" : "No")">
- @s.Status.GetDescription() <span class="small">(@s.StartupType.GetDescription())</span>
+ @s.Status.Value.GetDescription() <span class="small">(@s.StartupType.Value.GetDescription())</span>
<label>@s.ServiceName.Replace(" (MSSQLSERVER)", "").Replace(" Filter Daemon Launcher", "")</label>
</div>
}
@@ -47,7 +47,7 @@
else
{
<h5 class="page-header">
- Top queries on @i.Name by @Model.TopSearchOptions.Sort.GetDescription():
+ Top queries on @i.Name @(Model.TopSearchOptions.Sort.HasValue ? " by " + Model.TopSearchOptions.Sort.Value.GetDescription() : "")
<span class="pull-right">
<a href="#/sql/top/filters" class="hover-pulsate@(Model.TopSearchOptions.IsNonDefault ? " text-warning" : "")"><span class="glyphicon glyphicon-filter"></span></a>
<a href="#" class="js-reload-link">Reload</a>
@@ -20,12 +20,12 @@
Sync: @(db.SynchronizationState.HasValue ? db.SynchronizationState.Value.GetDescription() : "Unknown")
Health: @(db.SynchronizationHealth.HasValue ? db.SynchronizationHealth.Value.GetDescription() : "Unknown")
@if (db.SuspendReason.HasValue) {<text>
-Suspension Reason: @db.SuspendReason.GetDescription()</text>}">@db.IconSpan() @db.MonitorStatus.Span(db.DatabaseName)</div>
+Suspension Reason: @db.SuspendReason.Value.GetDescription()</text>}">@db.IconSpan() @db.MonitorStatus.Span(db.DatabaseName)</div>
}
}
else
{
- <div class="text-danger">Sync: @r.SynchronizationHealth.GetDescription()</div>
+ <div class="text-danger">Sync: @(r.SynchronizationHealth.HasValue ? r.SynchronizationHealth.Value.GetDescription() : "Unknwon")</div>
}
}
}
@@ -90,7 +90,7 @@
<td colspan="9" style="text-align: center; font-size: 12px; padding: 4px 0;">
@if (db.IsSuspended.GetValueOrDefault())
{
- @:Database @db.DatabaseName is @db.SynchronizationState.ToSpan(), was suspended by <b>@db.SuspendReason.GetDescription()</b>
+ @:Database @db.DatabaseName is @db.SynchronizationState.ToSpan(), was suspended by <b>@(db.SuspendReason.HasValue ? db.SuspendReason.Value.GetDescription() : "Unknown")</b>
}
</td>
</tr>
@@ -31,6 +31,7 @@
<add namespace="StackExchange.Opserver"/>
<add namespace="StackExchange.Opserver.Helpers"/>
<add namespace="StackExchange.Opserver.Data"/>
+ <add namespace="UnconstrainedMelody"/>
</namespaces>
</pages>
</system.web.webPages.razor>
Oops, something went wrong.

0 comments on commit e1997a7

Please sign in to comment.