mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
MongoDB's new driver breaks
And not just the code, but my sanity too.
This commit is contained in:
parent
fe0ce82603
commit
53b89fb161
|
@ -71,28 +71,28 @@
|
|||
<HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.0\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.DependencyCollector, Version=1.2.1.210, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.DependencyCollector.1.2.1\lib\net45\Microsoft.AI.DependencyCollector.dll</HintPath>
|
||||
<Reference Include="Microsoft.AI.DependencyCollector, Version=1.2.3.246, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.DependencyCollector.1.2.3\lib\net45\Microsoft.AI.DependencyCollector.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.PerfCounterCollector, Version=1.2.1.210, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.1.2.1\lib\net45\Microsoft.AI.PerfCounterCollector.dll</HintPath>
|
||||
<Reference Include="Microsoft.AI.PerfCounterCollector, Version=1.2.3.246, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.1.2.3\lib\net45\Microsoft.AI.PerfCounterCollector.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.ServerTelemetryChannel, Version=1.2.1.210, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.1.2.1\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll</HintPath>
|
||||
<Reference Include="Microsoft.AI.ServerTelemetryChannel, Version=1.2.3.246, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.1.2.3\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.Web, Version=1.2.1.210, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.Web.1.2.1\lib\net45\Microsoft.AI.Web.dll</HintPath>
|
||||
<Reference Include="Microsoft.AI.Web, Version=1.2.3.246, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.Web.1.2.3\lib\net45\Microsoft.AI.Web.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.WindowsServer, Version=1.2.1.210, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsServer.1.2.1\lib\net45\Microsoft.AI.WindowsServer.dll</HintPath>
|
||||
<Reference Include="Microsoft.AI.WindowsServer, Version=1.2.3.246, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsServer.1.2.3\lib\net45\Microsoft.AI.WindowsServer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationInsights, Version=1.2.0.5639, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.1.2.0\lib\net45\Microsoft.ApplicationInsights.dll</HintPath>
|
||||
<Reference Include="Microsoft.ApplicationInsights, Version=1.2.3.490, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.1.2.3\lib\net45\Microsoft.ApplicationInsights.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
@ -105,16 +105,16 @@
|
|||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Bson, Version=2.0.1.27, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Bson.2.0.1\lib\net45\MongoDB.Bson.dll</HintPath>
|
||||
<Reference Include="MongoDB.Bson, Version=2.1.0.145, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Bson.2.1.0\lib\net45\MongoDB.Bson.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver, Version=2.0.1.27, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.2.0.1\lib\net45\MongoDB.Driver.dll</HintPath>
|
||||
<Reference Include="MongoDB.Driver, Version=2.1.0.145, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.2.1.0\lib\net45\MongoDB.Driver.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver.Core, Version=2.0.1.27, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.Core.2.0.1\lib\net45\MongoDB.Driver.Core.dll</HintPath>
|
||||
<Reference Include="MongoDB.Driver.Core, Version=2.1.0.145, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.Core.2.1.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
|
|
|
@ -58,7 +58,7 @@ public async Task<ActionResult> indexPage(int page)
|
|||
#endif
|
||||
public async Task<ActionResult> viewGroup(byte major, byte minor, ushort number, ushort? revision = null)
|
||||
{
|
||||
var builds = await bModel.SelectSingleBuildGroup(new BuildGroup()
|
||||
var builds = await bModel.SelectBuildGroup(new BuildGroup()
|
||||
{
|
||||
Major = major,
|
||||
Minor = minor,
|
||||
|
|
|
@ -11,6 +11,19 @@ namespace BuildFeed.Models
|
|||
{
|
||||
public partial class Build
|
||||
{
|
||||
[DataObjectMethod(DataObjectMethodType.Select, false)]
|
||||
public async Task<Tuple<BuildGroup, List<BuildModel>>> SelectBuildGroup(BuildGroup bGroup)
|
||||
{
|
||||
var pipeline = _buildCollection.Aggregate()
|
||||
.Match(Builders<BuildModel>.Filter.Eq(b => b.MajorVersion, bGroup.Major))
|
||||
.Match(Builders<BuildModel>.Filter.Eq(b => b.MinorVersion, bGroup.Minor))
|
||||
.Match(Builders<BuildModel>.Filter.Eq(b => b.Number, bGroup.Build))
|
||||
.Match(Builders<BuildModel>.Filter.Eq(b => b.Revision, bGroup.Revision))
|
||||
.SortByDescending(b => b.BuildTime);
|
||||
|
||||
return new Tuple<BuildGroup, List<BuildModel>>(bGroup, await pipeline.ToListAsync());
|
||||
}
|
||||
|
||||
[DataObjectMethod(DataObjectMethodType.Select, false)]
|
||||
public async Task<List<FrontBuildGroup>> SelectBuildGroups(int limit, int skip)
|
||||
{
|
||||
|
@ -52,18 +65,5 @@ public async Task<int> SelectBuildGroupsCount()
|
|||
|
||||
return (await pipeline.ToListAsync()).Count;
|
||||
}
|
||||
|
||||
[DataObjectMethod(DataObjectMethodType.Select, false)]
|
||||
public async Task<Tuple<BuildGroup, List<BuildModel>>> SelectSingleBuildGroup(BuildGroup bGroup)
|
||||
{
|
||||
var pipeline = _buildCollection.Aggregate()
|
||||
.Match(b => b.MajorVersion == bGroup.Major)
|
||||
.Match(b => b.MinorVersion == bGroup.Minor)
|
||||
.Match(b => b.Number == bGroup.Build)
|
||||
.Match(b => b.Revision == bGroup.Revision)
|
||||
.SortByDescending(b => b.BuildTime);
|
||||
|
||||
return new Tuple<BuildGroup, List<BuildModel>>(bGroup, await pipeline.ToListAsync());
|
||||
}
|
||||
}
|
||||
}
|
2
BuildFeed/Scripts/typings/jquery/jquery.d.ts
vendored
2
BuildFeed/Scripts/typings/jquery/jquery.d.ts
vendored
|
@ -3050,7 +3050,7 @@ interface JQuery {
|
|||
*
|
||||
* @param elements One or more DOM elements to remove from the matched set.
|
||||
*/
|
||||
not(...elements: Element[]): JQuery;
|
||||
not(elements: Element|Element[]): JQuery;
|
||||
/**
|
||||
* Remove elements from the set of matched elements.
|
||||
*
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
@model IEnumerable<BuildFeed.Models.ViewModel.Front.FrontBuildGroup>
|
||||
@using Humanizer;
|
||||
@{
|
||||
ViewBag.Title = BuildFeed.Local.Common.SiteName;
|
||||
ViewBag.Title = BuildFeed.Local.Common.SiteName;
|
||||
}
|
||||
@section head
|
||||
{
|
||||
@if (ViewBag.PageNumber != 1)
|
||||
{
|
||||
<meta name="robots" content="noindex, follow" />
|
||||
}
|
||||
@if (ViewBag.PageNumber == 1)
|
||||
{
|
||||
<meta name="description" content="BuildFeed tracks builds of Microsoft Windows NT, using a variety of sources. We're the best place to follow the latest builds as they become known." />
|
||||
}
|
||||
else
|
||||
{
|
||||
<meta name="robots" content="noindex, follow" />
|
||||
}
|
||||
}
|
||||
|
||||
<h1>@BuildFeed.Local.Front.HomepageH1</h1>
|
||||
|
@ -16,30 +20,30 @@
|
|||
<div class="addthis_sharing_toolbox"></div>
|
||||
<h3>@BuildFeed.Local.Front.Listing</h3>
|
||||
<div class="row">
|
||||
@foreach (BuildFeed.Models.ViewModel.Front.FrontBuildGroup group in Model)
|
||||
{
|
||||
<div class="col-md-2 col-sm-3 col-xs-6 build-group">
|
||||
<h3 class="build-group-title"><a href="@Url.Action("viewGroup", new { major = group.Key.Major, minor = group.Key.Minor, number = group.Key.Build, revision = group.Key.Revision })">@group.Key.ToString()</a></h3>
|
||||
<p>
|
||||
@if (group.LastBuild.HasValue)
|
||||
{
|
||||
var maxDate = group.LastBuild.Value;
|
||||
if (maxDate.AddDays(28) > DateTime.Now)
|
||||
{
|
||||
<span title="@maxDate.ToLongDateWithoutDay()"><i class="fa fa-calendar fa-fw"></i> @maxDate.Humanize()</span><br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span title="@maxDate.Humanize()"><i class="fa fa-calendar fa-fw"></i> @maxDate.ToLongDateWithoutDay()</span><br />
|
||||
}
|
||||
}
|
||||
<i class="fa fa-server fa-fw"></i> @string.Format(BuildFeed.Local.Front.xBuilds, group.BuildCount)
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@foreach (BuildFeed.Models.ViewModel.Front.FrontBuildGroup group in Model)
|
||||
{
|
||||
<div class="col-md-2 col-sm-3 col-xs-6 build-group">
|
||||
<h3 class="build-group-title"><a href="@Url.Action("viewGroup", new { major = group.Key.Major, minor = group.Key.Minor, number = group.Key.Build, revision = group.Key.Revision })">@group.Key.ToString()</a></h3>
|
||||
<p>
|
||||
@if (group.LastBuild.HasValue)
|
||||
{
|
||||
var maxDate = group.LastBuild.Value;
|
||||
if (maxDate.AddDays(28) > DateTime.Now)
|
||||
{
|
||||
<span title="@maxDate.ToLongDateWithoutDay()"><i class="fa fa-calendar fa-fw"></i> @maxDate.Humanize()</span><br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span title="@maxDate.Humanize()"><i class="fa fa-calendar fa-fw"></i> @maxDate.ToLongDateWithoutDay()</span><br />
|
||||
}
|
||||
}
|
||||
<i class="fa fa-server fa-fw"></i> @string.Format(BuildFeed.Local.Front.xBuilds, group.BuildCount)
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "index", ViewContext.RouteData.Values)
|
||||
@section scripts
|
||||
{
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||
}
|
|
@ -7,16 +7,16 @@
|
|||
<package id="Glimpse.Mvc5" version="1.5.3" targetFramework="net46" />
|
||||
<package id="Humanizer" version="1.37.7" targetFramework="net46" />
|
||||
<package id="jQuery" version="2.1.4" targetFramework="net452" />
|
||||
<package id="jquery.TypeScript.DefinitelyTyped" version="2.3.1" targetFramework="net46" />
|
||||
<package id="jquery.TypeScript.DefinitelyTyped" version="2.3.2" targetFramework="net46" />
|
||||
<package id="jQuery.Validation" version="1.14.0" targetFramework="net46" />
|
||||
<package id="jsrender.TypeScript.DefinitelyTyped" version="0.0.3" targetFramework="net45" />
|
||||
<package id="Microsoft.ApplicationInsights" version="1.2.0" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights" version="1.2.3" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.Agent.Intercept" version="1.2.0" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.DependencyCollector" version="1.2.1" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="1.2.1" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.Web" version="1.2.1" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.WindowsServer" version="1.2.1" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="1.2.1" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.DependencyCollector" version="1.2.3" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="1.2.3" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.Web" version="1.2.3" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.WindowsServer" version="1.2.3" targetFramework="net46" />
|
||||
<package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="1.2.3" targetFramework="net46" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
|
||||
|
@ -30,9 +30,9 @@
|
|||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="MongoDB.Bson" version="2.0.1" targetFramework="net46" />
|
||||
<package id="MongoDB.Driver" version="2.0.1" targetFramework="net46" />
|
||||
<package id="MongoDB.Driver.Core" version="2.0.1" targetFramework="net46" />
|
||||
<package id="MongoDB.Bson" version="2.1.0" targetFramework="net46" />
|
||||
<package id="MongoDB.Driver" version="2.1.0" targetFramework="net46" />
|
||||
<package id="MongoDB.Driver.Core" version="2.1.0" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="routedebugger" version="2.1.4.0" targetFramework="net45" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
|
||||
|
|
Loading…
Reference in New Issue
Block a user