Component Updates; Search Improvements

This commit is contained in:
Thomas Hounsell 2016-12-10 02:08:24 +00:00
parent 3109e0737a
commit bc4bfbf0e7
34 changed files with 694 additions and 430 deletions

View File

@ -31,21 +31,25 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MongoDB.Bson, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Bson.2.3.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Reference Include="MongoDB.Bson, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Bson.2.4.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.2.3.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Reference Include="MongoDB.Driver, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.2.4.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.Core.2.3.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Reference Include="MongoDB.Driver.Core, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@ -72,6 +76,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MongoDB.Bson" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.4.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.4.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.4.0" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
</packages>

View File

@ -68,61 +68,11 @@ public class Build
public string LabUrl { get; set; }
public bool IsLeaked => (SourceType == TypeOfSource.PublicRelease) || (SourceType == TypeOfSource.InternalLeak) || (SourceType == TypeOfSource.UpdateGDR) || (SourceType == TypeOfSource.UpdateLDR);
public bool IsLeaked => SourceType == TypeOfSource.PublicRelease || SourceType == TypeOfSource.InternalLeak || SourceType == TypeOfSource.UpdateGDR || SourceType == TypeOfSource.UpdateLDR;
public string FullBuildString
{
get
{
StringBuilder sb = new StringBuilder();
sb.Append($"{MajorVersion}.{MinorVersion}.{Number}");
public string FullBuildString { get; set; }
if (Revision.HasValue)
{
sb.Append($".{Revision}");
}
if (!string.IsNullOrWhiteSpace(Lab))
{
sb.Append($".{Lab}");
}
if (BuildTime.HasValue)
{
sb.Append($".{BuildTime.Value.ToString("yyMMdd-HHmm", CultureInfo.InvariantCulture.DateTimeFormat)}");
}
return sb.ToString();
}
}
public string AlternateBuildString
{
get
{
StringBuilder sb = new StringBuilder();
sb.Append($"{MajorVersion}.{MinorVersion}.{Number}");
if (Revision.HasValue)
{
sb.Append($".{Revision}");
}
if (!string.IsNullOrWhiteSpace(Lab))
{
sb.Append($" ({Lab}");
if (BuildTime.HasValue)
{
sb.Append($".{BuildTime.Value.ToString("yyMMdd-HHmm", CultureInfo.InvariantCulture.DateTimeFormat)}");
}
sb.Append(")");
}
return sb.ToString();
}
}
public string AlternateBuildString { get; set; }
public ProjectFamily Family
{
@ -156,8 +106,8 @@ public ProjectFamily Family
{
return ProjectFamily.Windows7;
}
if ((MajorVersion == 6)
&& (Number >= 5000))
if (MajorVersion == 6
&& Number >= 5000)
{
return ProjectFamily.WindowsVista;
}
@ -165,18 +115,18 @@ public ProjectFamily Family
{
return ProjectFamily.Longhorn;
}
if ((MajorVersion == 5)
&& (Number >= 3000))
if (MajorVersion == 5
&& Number >= 3000)
{
return ProjectFamily.Server2003;
}
if ((MajorVersion == 5)
&& (Number >= 2205))
if (MajorVersion == 5
&& Number >= 2205)
{
return ProjectFamily.WindowsXP;
}
if ((MajorVersion == 5)
&& (MinorVersion == 50))
if (MajorVersion == 5
&& MinorVersion == 50)
{
return ProjectFamily.Neptune;
}
@ -210,6 +160,54 @@ public string SourceDetailsFiltered
}
}
public string GenerateFullBuildString()
{
StringBuilder sb = new StringBuilder();
sb.Append($"{MajorVersion}.{MinorVersion}.{Number}");
if (Revision.HasValue)
{
sb.Append($".{Revision}");
}
if (!string.IsNullOrWhiteSpace(Lab))
{
sb.Append($".{Lab}");
}
if (BuildTime.HasValue)
{
sb.Append($".{BuildTime.Value.ToString("yyMMdd-HHmm", CultureInfo.InvariantCulture.DateTimeFormat)}");
}
return sb.ToString();
}
public string GenerateAlternateBuildString()
{
StringBuilder sb = new StringBuilder();
sb.Append($"{MajorVersion}.{MinorVersion}.{Number}");
if (Revision.HasValue)
{
sb.Append($".{Revision}");
}
if (!string.IsNullOrWhiteSpace(Lab))
{
sb.Append($" ({Lab}");
if (BuildTime.HasValue)
{
sb.Append($".{BuildTime.Value.ToString("yyMMdd-HHmm", CultureInfo.InvariantCulture.DateTimeFormat)}");
}
sb.Append(")");
}
return sb.ToString();
}
public string GenerateLabUrl() => !string.IsNullOrEmpty(Lab)
? Lab.Replace('/', '-').ToLower()
: "";

View File

@ -39,22 +39,26 @@
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Bson, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.3.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Reference Include="MongoDB.Bson, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.4.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.3.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Reference Include="MongoDB.Driver, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.4.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.3.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Reference Include="MongoDB.Driver.Core, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
@ -112,6 +116,7 @@
<Compile Include="View\SitemapData.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>

View File

@ -93,6 +93,24 @@ await _buildCollection.Indexes.CreateOneAsync(Builders<Build>.IndexKeys.Descendi
Name = "_idx_date"
});
}
if (indexes.All(i => i["name"] != "_idx_bstr"))
{
await _buildCollection.Indexes.CreateOneAsync(Builders<Build>.IndexKeys.Ascending(b => b.FullBuildString),
new CreateIndexOptions
{
Name = "_idx_bstr"
});
}
if (indexes.All(i => i["name"] != "_idx_alt_bstr"))
{
await _buildCollection.Indexes.CreateOneAsync(Builders<Build>.IndexKeys.Ascending(b => b.AlternateBuildString),
new CreateIndexOptions
{
Name = "_idx_alt_bstr"
});
}
}
[DataObjectMethod(DataObjectMethodType.Select, true)]
@ -182,6 +200,19 @@ public async Task<FrontPage> SelectFrontPage()
return fp;
}
[DataObjectMethod(DataObjectMethodType.Select, false)]
public async Task<List<Build>> SelectBuildsByStringSearch(string term, int limit = -1)
{
IAggregateFluent<Build> query = _buildCollection.Aggregate().Match(b => b.FullBuildString != null).Match(b => b.FullBuildString != "").Match(b => b.FullBuildString.ToLower().Contains(term.ToLower()));
if (limit > 0)
{
query = query.Limit(limit);
}
return await query.ToListAsync();
}
[DataObjectMethod(DataObjectMethodType.Select, false)]
public async Task<List<Build>> SelectBuildsByCompileDate(int limit = -1, int skip = 0)
{
@ -226,6 +257,9 @@ public async Task Insert(Build item)
{
item.Id = Guid.NewGuid();
item.LabUrl = item.GenerateLabUrl();
item.FullBuildString = item.GenerateFullBuildString();
item.AlternateBuildString = item.GenerateAlternateBuildString();
await _buildCollection.InsertOneAsync(item);
}
@ -237,6 +271,8 @@ public async Task InsertAll(IEnumerable<Build> items)
{
item.Id = Guid.NewGuid();
item.LabUrl = item.GenerateLabUrl();
item.FullBuildString = item.GenerateFullBuildString();
item.AlternateBuildString = item.GenerateAlternateBuildString();
generatedItems.Add(item);
}
@ -251,6 +287,8 @@ public async Task Update(Build item)
item.Added = old.Added;
item.Modified = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
item.LabUrl = item.GenerateLabUrl();
item.FullBuildString = item.GenerateFullBuildString();
item.AlternateBuildString = item.GenerateAlternateBuildString();
await _buildCollection.ReplaceOneAsync(Builders<Build>.Filter.Eq(b => b.Id, item.Id), item);
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -5,7 +5,8 @@
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net462" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net462" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.4.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.4.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.4.0" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
</packages>

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25618.0
VisualStudioVersion = 15.0.25928.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed", "BuildFeed\BuildFeed.csproj", "{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}"
EndProject
@ -27,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.Local", "BuildFee
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.Model", "BuildFeed.Model\BuildFeed.Model.csproj", "{7E2B4F61-1C11-4471-AF80-5480E94C0664}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MigrateBuildStrings", "Tools\MigrateBuildStrings\MigrateBuildStrings.csproj", "{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -191,6 +193,22 @@ Global
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x64.Build.0 = Release|Any CPU
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x86.ActiveCfg = Release|Any CPU
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x86.Build.0 = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|ARM.Build.0 = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|x64.ActiveCfg = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|x64.Build.0 = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Debug|x86.Build.0 = Debug|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|Any CPU.Build.0 = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|ARM.ActiveCfg = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|ARM.Build.0 = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|x64.ActiveCfg = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|x64.Build.0 = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|x86.ActiveCfg = Release|Any CPU
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -202,5 +220,6 @@ Global
{CD3C08CC-45BF-484B-A878-69614A4EA098} = {938956E0-6FA0-4432-A238-DAE704686F26}
{B7EC3C45-E5CE-4AD5-B303-65D865F12454} = {938956E0-6FA0-4432-A238-DAE704686F26}
{B68C450F-1475-4B9C-B513-43C79CBAA338} = {938956E0-6FA0-4432-A238-DAE704686F26}
{8C3BD4DC-1DB5-4082-A051-4518AA8250A0} = {938956E0-6FA0-4432-A238-DAE704686F26}
EndGlobalSection
EndGlobal

View File

@ -7,100 +7,98 @@
if (totalPages > 1)
{
<div class="text-center">
<ul class="pagination">
@if (currentPage == 2)
{
RouteValueDictionary rvd = new RouteValueDictionary(rd);
rvd.Remove("page");
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&laquo;"), view, rvd)</li>
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&lsaquo;"), view, rvd)</li>
}
else if (currentPage > 2)
{
RouteValueDictionary firstRvd = new RouteValueDictionary(rd);
firstRvd.Remove("page");
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&laquo;"), view, firstRvd)</li>
<ul class="pagination">
@if (currentPage == 2)
{
RouteValueDictionary rvd = new RouteValueDictionary(rd);
rvd.Remove("page");
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&laquo;"), view, rvd)</li>
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&lsaquo;"), view, rvd)</li>
}
else if (currentPage > 2)
{
RouteValueDictionary firstRvd = new RouteValueDictionary(rd);
firstRvd.Remove("page");
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&laquo;"), view, firstRvd)</li>
RouteValueDictionary rvd = new RouteValueDictionary(rd)
{
["page"] = currentPage - 1
};
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&lsaquo;"), multiView, rvd)</li>
}
else
RouteValueDictionary rvd = new RouteValueDictionary(rd)
{
<li class="disabled">
<span>&laquo;</span>
</li>
<li class="disabled">
<span>&lsaquo;</span>
</li>
}
["page"] = currentPage - 1
};
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&lsaquo;"), multiView, rvd)</li>
}
else
{
<li class="disabled">
<span>&laquo;</span>
</li>
<li class="disabled">
<span>&lsaquo;</span>
</li>
}
@{
RouteValueDictionary rvdIndex = new RouteValueDictionary(rd);
rvdIndex.Remove("page");
IEnumerable<int> pages;
}
@{
RouteValueDictionary rvdIndex = new RouteValueDictionary(rd);
rvdIndex.Remove("page");
IEnumerable<int> pages;
}
@if (totalPages <= 7)
{
pages = Enumerable.Range(1, totalPages);
}
else if (currentPage <= 4)
{
pages = Enumerable.Range(1, 7);
}
else if (currentPage >= totalPages - 2)
{
pages = Enumerable.Range(totalPages - 6, 7);
}
else
{
pages = Enumerable.Range(currentPage - 3, 7);
}
@if (totalPages <= 7)
{
pages = Enumerable.Range(1, totalPages);
}
else if (currentPage <= 4)
{
pages = Enumerable.Range(1, 7);
}
else if (currentPage >= totalPages - 2)
{
pages = Enumerable.Range(totalPages - 6, 7);
}
else
{
pages = Enumerable.Range(currentPage - 3, 7);
}
@foreach (int i in pages)
@foreach (int i in pages)
{
RouteValueDictionary rvd = new RouteValueDictionary(rd)
{
RouteValueDictionary rvd = new RouteValueDictionary(rd)
{
["page"] = i
};
["page"] = i
};
<li @(i == currentPage
? "class=active"
: "")>
@MvcIntrinsics.Html.ActionLink(i.ToString(), multiView, rvd)</li>
}
<li @( i == currentPage
? "class=active"
: "")>
@MvcIntrinsics.Html.ActionLink(i.ToString(), multiView, rvd)</li>
}
@if (currentPage < totalPages)
@if (currentPage < totalPages)
{
RouteValueDictionary rvd = new RouteValueDictionary(rd)
{
RouteValueDictionary rvd = new RouteValueDictionary(rd)
{
["page"] = currentPage + 1
};
["page"] = currentPage + 1
};
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&rsaquo;"), multiView, rvd)</li>
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&rsaquo;"), multiView, rvd)</li>
RouteValueDictionary lastRvd = new RouteValueDictionary(rd)
{
["page"] = totalPages
};
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&raquo;"), multiView, lastRvd)</li>
}
else
RouteValueDictionary lastRvd = new RouteValueDictionary(rd)
{
<li class="disabled">
<span>&rsaquo;</span>
</li>
<li class="disabled">
<span>&raquo;</span>
</li>
}
</ul>
</div>
["page"] = totalPages
};
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&raquo;"), multiView, lastRvd)</li>
}
else
{
<li class="disabled">
<span>&rsaquo;</span>
</li>
<li class="disabled">
<span>&raquo;</span>
</li>
}
</ul>
}
}

View File

@ -107,16 +107,16 @@
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Bson, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.3.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Reference Include="MongoDB.Bson, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.4.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.3.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Reference Include="MongoDB.Driver, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.4.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.3.0.157, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.3.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Reference Include="MongoDB.Driver.Core, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@ -133,8 +133,12 @@
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.4.1.0\lib\net462\System.Runtime.dll</HintPath>
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ServiceModel" />
@ -455,7 +459,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<TypeScriptTarget>ES6</TypeScriptTarget>
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptModuleKind>ES6</TypeScriptModuleKind>
<TypeScriptRemoveComments>True</TypeScriptRemoveComments>

View File

@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Globalization;
using System.Web;
using System.Web.Mvc;
using BuildFeed.Code.Options;
namespace BuildFeed.Code
{
public class OutputCachePushAttribute: ActionFilterAttribute
public class OutputCachePushAttribute : ActionFilterAttribute
{
public override void OnResultExecuted(ResultExecutedContext filterContext)
{
@ -21,7 +18,7 @@ public override void OnResultExecuted(ResultExecutedContext filterContext)
{
filterContext.HttpContext.Response.PushPromise("/res/css/rtl.css");
}
filterContext.HttpContext.Response.PushPromise("/res/ts/bfs.min.js");
filterContext.HttpContext.Response.PushPromise("/res/ts/bfs.js");
}
}
}

View File

@ -99,7 +99,7 @@ public async Task<IEnumerable<SearchResult>> GetSearchResult(string id)
const int maxResults = 16;
var results = new List<SearchResult>();
results.AddRange(from s in (from c in Enum.GetValues(typeof(TypeOfSource)).Cast<TypeOfSource>()
results.AddRange(from s in (from c in await _bModel.SelectAllSources()
select new
{
Text = MvcExtensions.GetDisplayTextForEnum(c),
@ -191,9 +191,7 @@ orderby y descending
return results.Take(maxResults);
}
results.AddRange(from b in await _bModel.Select()
where b.FullBuildString.ToLower().Contains(id.ToLower())
orderby b.FullBuildString.ToLower().IndexOf(id.ToLower(), StringComparison.Ordinal) ascending, b.BuildTime descending
results.AddRange(from b in await _bModel.SelectBuildsByStringSearch(id, maxResults)
select new SearchResult
{
Url = Url.Route("Build",

View File

@ -4,7 +4,7 @@
* intended to be used only for design-time IntelliSense. Please use the
* standard jQuery library for all production use.
*
* Comment version: 1.15.0
* Comment version: 1.16.0
*/
/*
@ -15,7 +15,7 @@
* for informational purposes only and are not the license terms under
* which Microsoft distributed this file.
*
* jQuery Validation Plugin - v1.15.0 - 2/4/2013
* jQuery Validation Plugin - v1.16.0 - 12/5/2016
* https://github.com/jzaefferer/jquery-validation
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT
*

View File

@ -1,5 +1,5 @@
/*!
* jQuery Validation Plugin v1.15.1
* jQuery Validation Plugin v1.16.0
*
* http://jqueryvalidation.org/
*
@ -204,7 +204,7 @@ $.extend( $.fn, {
} );
// Custom selectors
$.extend( $.expr[ ":" ], {
$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
// http://jqueryvalidation.org/blank-selector/
blank: function( a ) {
@ -417,7 +417,7 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
"[type='radio'], [type='checkbox'], [contenteditable]", delegate )
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
@ -1570,5 +1570,5 @@ if ( $.ajaxPrefilter ) {
return ajax.apply( this, arguments );
};
}
return $;
}));

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
Response.PushPromise("/res/css/rtl.css");
}
Response.PushPromise("/res/ts/bfs.min.js");
Response.PushPromise("/res/ts/bfs.js");
}
<!DOCTYPE html>
<html dir="@(isRtl
@ -39,7 +39,7 @@
@RenderSection("head", false)
<script type="text/javascript">
var appInsights = window.appInsights || function (config) {
function r(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, u = document, e = window, o = "script", s = u.createElement(o), i, f; for (s.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", u.getElementsByTagName(o)[0].parentNode.appendChild(s), t.cookie = u.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) r("track" + i.pop()); return r("setAuthenticatedUserContext"), r("clearAuthenticatedUserContext"), config.disableExceptionTracking || (i = "onerror", r("_" + i), f = e[i], e[i] = function (config, r, u, e, o) { var s = f && f(config, r, u, e, o); return s !== !0 && t["_" + i](config, r, u, e, o), s }), t
function r(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, u = document, e = window, o = "script", s = u.createElement(o), i, f; for (s.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", u.getElementsByTagName(o)[0].parentNode.appendChild(s), t.cookie = u.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) r("track" + i.pop()); return r("setAuthenticatedUserContext"), r("clearAuthenticatedUserContext"), config.disableExceptionTracking || (i = "onerror", r("_" + i), f = e[i], e[i] = function (config, r, u, e, o) { var s = f && f(config, r, u, e, o); return s !== !0 && t["_" + i](config, r, u, e, o), s }), t;
}({
instrumentationKey: "4632419f-7a2f-4ab5-8374-34384b650f42"
});
@ -49,201 +49,201 @@
</script>
</head>
<body>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments);
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-55417692-1', 'auto');
ga('require', 'displayfeatures');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
</script>
<header id="page-header">
<div class="container">
<h1>
@Html.ActionLink(InvariantTerms.SiteName, nameof(FrontController.Index), new
{
controller = "Front",
area = ""
})
</h1>
</div>
</header>
<nav id="page-navigation" role="navigation">
<div class="container">
<button id="page-navigation-toggle">
<i class="fa fa-bars"></i>&ensp;@VariantTerms.Common_ToggleNavigation
</button>
<ul id="page-navigation-links">
@if (!User.Identity.IsAuthenticated)
{
<li>
<a href="@Url.Action(nameof(SupportController.Login), new
{
controller = "Support",
area = ""
})" title="@VariantTerms.Common_LogIn">
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogIn
</a>
</li>
}
else
{
if (Roles.IsUserInRole("Administrators"))
ga('create', 'UA-55417692-1', 'auto');
ga('require', 'displayfeatures');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
</script>
<header id="page-header">
<div class="container">
<h1>
@Html.ActionLink(InvariantTerms.SiteName, nameof(FrontController.Index), new
{
controller = "Front",
area = ""
})
</h1>
</div>
</header>
<nav id="page-navigation" role="navigation">
<div class="container">
<button id="page-navigation-toggle">
<i class="fa fa-bars"></i>&ensp;@VariantTerms.Common_ToggleNavigation
</button>
<ul id="page-navigation-links">
@if (!User.Identity.IsAuthenticated)
{
<li>
<a href="@Url.Action("index", new
<a href="@Url.Action(nameof(SupportController.Login), new
{
controller = "base",
area = "admin"
})" title="@VariantTerms.Common_Admin">
<i class="fa fa-fw fa-cogs"></i> @VariantTerms.Common_Admin
controller = "Support",
area = ""
})" title="@VariantTerms.Common_LogIn">
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogIn
</a>
</li>
}
else
{
if (Roles.IsUserInRole("Administrators"))
{
<li>
<a href="@Url.Action("index", new
{
controller = "base",
area = "admin"
})" title="@VariantTerms.Common_Admin">
<i class="fa fa-fw fa-cogs"></i> @VariantTerms.Common_Admin
</a>
</li>
}
<li>
<a href="@Url.Action(nameof(FrontController.AddBuild), new
{
controller = "Front",
area = ""
})" title="@VariantTerms.Common_AddBuild">
<i class="fa fa-fw fa-plus-square"></i> @VariantTerms.Common_AddBuild
</a>
</li>
<li>
<a href="@Url.Action(nameof(SupportController.Logout), new
{
controller = "Support",
area = ""
})" title="@VariantTerms.Common_LogOut">
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogOut
</a>
</li>
}
<li>
<a href="@Url.Action(nameof(FrontController.AddBuild), new
{
controller = "Front",
area = ""
})" title="@VariantTerms.Common_AddBuild">
<i class="fa fa-fw fa-plus-square"></i> @VariantTerms.Common_AddBuild
<a href="#" id="page-navigation-search" title="@VariantTerms.Search_Title">
<i class="fa fa-fw fa-search"></i> @VariantTerms.Search_Title
</a>
</li>
<li>
<a href="@Url.Action(nameof(SupportController.Logout), new
<a href="@Url.Action(nameof(SupportController.Rss), new
{
controller = "Support",
area = ""
})" title="@VariantTerms.Common_LogOut">
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogOut
})" title="@VariantTerms.Common_RssFeeds">
<i class="fa fa-fw fa-rss"></i> @VariantTerms.Common_RssFeeds
</a>
</li>
}
<li>
<a href="#" id="page-navigation-search" title="@VariantTerms.Search_Title">
<i class="fa fa-fw fa-search"></i> @VariantTerms.Search_Title
</a>
</li>
<li>
<a href="@Url.Action(nameof(SupportController.Rss), new
{
controller = "Support",
area = ""
})" title="@VariantTerms.Common_RssFeeds">
<i class="fa fa-fw fa-rss"></i> @VariantTerms.Common_RssFeeds
</a>
</li>
<li>
<a href="https://twitter.com/buildfeed" title="@VariantTerms.Common_Twitter" target="_blank">
<i class="fa fa-fw fa-twitter"></i> @VariantTerms.Common_Twitter
</a>
</li>
<li class="dropdown-parent">
<a href="#">
<i class="fa fa-gear"></i>
</a>
<ul class="dropdown-menu">
<li id="settings-theme-menu" class="dropdown-menu-block">
<h4>@VariantTerms.Common_NavigationTheme</h4>
<ul>
@foreach (Theme item in Theme.AvailableThemes)
{
<li>
<a href="#" data-theme="@item.CookieValue">@item.DisplayName</a>
</li>
}
</ul>
</li>
<li id="settings-lang-menu" class="dropdown-menu-block">
<h4>@VariantTerms.Common_NavigationLanguage</h4>
<ul>
@foreach (Locale locale in Locale.AvailableLocales)
{
<li>
<a href="#" data-lang="@locale.LocaleId" dir="@(locale.Info.TextInfo.IsRightToLeft
? "rtl"
: "ltr")">
@locale.DisplayName</a>
</li>
}
</ul>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<article id="page-content">
<div class="container">
@RenderBody()
</div>
</article>
<footer id="page-footer">
<div class="container">
<div class="footer-flex">
<div class="footer-flex-item">
<p>
<a href="@Url.Action(nameof(SupportController.Sitemap), new
<li>
<a href="https://twitter.com/buildfeed" title="@VariantTerms.Common_Twitter" target="_blank">
<i class="fa fa-fw fa-twitter"></i> @VariantTerms.Common_Twitter
</a>
</li>
<li class="dropdown-parent">
<a href="#">
<i class="fa fa-gear"></i>
</a>
<ul class="dropdown-menu">
<li id="settings-theme-menu" class="dropdown-menu-block">
<h4>@VariantTerms.Common_NavigationTheme</h4>
<ul>
@foreach (Theme item in Theme.AvailableThemes)
{
controller = "Support",
area = ""
})">
@VariantTerms.Common_Sitemap</a>
</p>
<p>
<i class="fa fa-language"></i>&ensp;
@CultureInfo.CurrentUICulture.NativeName
(<a href="@Url.Action(nameof(SupportController.Credits), new
{
controller = "Support",
area = ""
})">
@VariantTerms.Common_Credits
</a>)
</p>
</div>
<div class="footer-flex-item">
<p>
&copy; 2013 - @DateTime.Now.Year.ToString(), <span dir="ltr">@InvariantTerms.SiteName</span>
</p>
<p>
@Html.Raw(string.Format(VariantTerms.Common_DevelopedBy, $"<a href=\"https://twitter.com/tomhounsell\" target=\"_blank\" dir=\"ltr\">{InvariantTerms.DeveloperName}</a>"))
</p>
<p>
@Html.Raw(string.Format(VariantTerms.Common_ContributeOn, "<a href=\"https://github.com/hounsell/BuildFeed\" target=\"_blank\" dir=\"ltr\"><i class=\"fa fa-github\"></i>&ensp;GitHub</a>"))
</p>
<li>
<a href="#" data-theme="@item.CookieValue">@item.DisplayName</a>
</li>
}
</ul>
</li>
<li id="settings-lang-menu" class="dropdown-menu-block">
<h4>@VariantTerms.Common_NavigationLanguage</h4>
<ul>
@foreach (Locale locale in Locale.AvailableLocales)
{
<li>
<a href="#" data-lang="@locale.LocaleId" dir="@(locale.Info.TextInfo.IsRightToLeft
? "rtl"
: "ltr")">
@locale.DisplayName</a>
</li>
}
</ul>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<article id="page-content">
<div class="container">
@RenderBody()
</div>
</article>
<footer id="page-footer">
<div class="container">
<div class="footer-flex">
<div class="footer-flex-item">
<p>
<a href="@Url.Action(nameof(SupportController.Sitemap), new
{
controller = "Support",
area = ""
})">
@VariantTerms.Common_Sitemap</a>
</p>
<p>
<i class="fa fa-language"></i>&ensp;
@CultureInfo.CurrentUICulture.NativeName
(<a href="@Url.Action(nameof(SupportController.Credits), new
{
controller = "Support",
area = ""
})">
@VariantTerms.Common_Credits
</a>)
</p>
</div>
<div class="footer-flex-item">
<p>
&copy; 2013 - @DateTime.Now.Year.ToString(), <span dir="ltr">@InvariantTerms.SiteName</span>
</p>
<p>
@Html.Raw(string.Format(VariantTerms.Common_DevelopedBy, $"<a href=\"https://twitter.com/tomhounsell\" target=\"_blank\" dir=\"ltr\">{InvariantTerms.DeveloperName}</a>"))
</p>
<p>
@Html.Raw(string.Format(VariantTerms.Common_ContributeOn, "<a href=\"https://github.com/hounsell/BuildFeed\" target=\"_blank\" dir=\"ltr\"><i class=\"fa fa-github\"></i>&ensp;GitHub</a>"))
</p>
</div>
</div>
</div>
</div>
</footer>
</footer>
<div id="modal-search-overlay">
<div id="modal-search">
<h3>@VariantTerms.Search_BuildFeed</h3>
<div id="modal-search-box">
<input id="modal-search-input" type="text" placeholder="@VariantTerms.Search_TypePlaceholder" />
<button id="modal-search-button">
<i class="fa fa-search"></i>
</button>
<div id="modal-search-overlay">
<div id="modal-search">
<h3>@VariantTerms.Search_BuildFeed</h3>
<div id="modal-search-box">
<input id="modal-search-input" type="text" placeholder="@VariantTerms.Search_TypePlaceholder" />
<button id="modal-search-button">
<i class="fa fa-search"></i>
</button>
</div>
<div id="modal-search-result"></div>
</div>
<div id="modal-search-result"></div>
</div>
</div>
<script type="text/javascript" t src="https://cdnjs.cloudflare.com/ajax/libs/jsrender/1.0.0-rc.70/jsrender.min.js" integrity="sha256-3UBtL0tzgKVuJU8ZZiWLXEWGEjXEr6Z023rpauMnBUE=" crossorigin="anonymous"></script>
<script type="text/javascript" src="/res/ts/bfs.js"></script>
@RenderSection("scripts", false)
<script id="result-template" type="text/x-jsrender">
<script type="text/javascript" t src="https://cdnjs.cloudflare.com/ajax/libs/jsrender/1.0.0-rc.70/jsrender.min.js" integrity="sha256-3UBtL0tzgKVuJU8ZZiWLXEWGEjXEr6Z023rpauMnBUE=" crossorigin="anonymous"></script>
<script type="text/javascript" src="/res/ts/bfs.js"></script>
@RenderSection("scripts", false)
<script id="result-template" type="text/x-jsrender">
<a href="{{:Url}}" class="search-result-item" title="{{:Title}}">
<h4 class="search-result-heading no-wrapping">{{:Label}}</h4>
<p class="search-result-text">{{:Group}}</p>
</a>
</script>
<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>
</body>
</html>

View File

@ -132,7 +132,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
@ -146,6 +146,10 @@
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>

View File

@ -8,38 +8,39 @@ var uglify = require("gulp-uglify");
var autoprefixer = require("gulp-autoprefixer");
gulp.task("sass-compile",
function ()
{
gulp.src("./res/css/*.scss")
.pipe(sourceMaps.init())
.pipe(sass())
.pipe(autoprefixer({
cascade: false
}))
.pipe(cleanCss())
.pipe(sourceMaps.write("./"))
.pipe(gulp.dest("./res/css/"));
});
function()
{
gulp.src("./res/css/*.scss")
.pipe(sourceMaps.init())
.pipe(sass())
.pipe(autoprefixer({
browsers: ["> 1%", "IE 10-11", "last 5 versions"],
cascade: false
}))
.pipe(cleanCss())
.pipe(sourceMaps.write("./"))
.pipe(gulp.dest("./res/css/"));
});
gulp.task("typescript",
function ()
{
var result = gulp.src("./res/ts/*.ts")
.pipe(sourceMaps.init())
.pipe(ts({
target: "es5",
sourceMap: false
}));
function()
{
var result = gulp.src("./res/ts/*.ts")
.pipe(sourceMaps.init())
.pipe(ts({
target: "es5",
sourceMap: false
}));
return result.js
.pipe(uglify())
.pipe(sourceMaps.write("./"))
.pipe(gulp.dest("./res/ts/"));
});
return result.js
.pipe(uglify())
.pipe(sourceMaps.write("./"))
.pipe(gulp.dest("./res/ts/"));
});
gulp.task("watch-sass",
function ()
{
gulp.watch("./res/scss/*.scss", ["sass-compile"]);
gulp.watch("./res/ts/*.ts", ["typescript"]);
});
function()
{
gulp.watch("./res/scss/*.scss", ["sass-compile"]);
gulp.watch("./res/ts/*.ts", ["typescript"]);
});

View File

@ -45,7 +45,7 @@
<package id="Humanizer.Core.zh-Hant" version="2.1.0" targetFramework="net462" />
<package id="jQuery" version="2.2.4" targetFramework="net462" />
<package id="jquery.TypeScript.DefinitelyTyped" version="3.1.2" targetFramework="net462" />
<package id="jQuery.Validation" version="1.15.1" targetFramework="net462" />
<package id="jQuery.Validation" version="1.16.0" targetFramework="net462" />
<package id="jsrender.TypeScript.DefinitelyTyped" version="0.1.8" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights" version="2.1.0" targetFramework="net461" />
<package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.0.1" targetFramework="net461" />
@ -62,18 +62,19 @@
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net462" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net462" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.2" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.0.1" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="net462" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net462" />
<package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net462" developmentDependency="true" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.3.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.4.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.4.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.4.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net462" />
<package id="System.Collections" version="4.0.11" targetFramework="net462" />
<package id="System.Linq" version="4.1.0" targetFramework="net462" />
<package id="System.Runtime" version="4.1.0" targetFramework="net462" />
<package id="System.Threading" version="4.0.11" targetFramework="net462" />
<package id="System.Xml.XDocument" version="4.0.11" targetFramework="net462" />
<package id="System.Collections" version="4.3.0" targetFramework="net462" />
<package id="System.Linq" version="4.3.0" targetFramework="net462" />
<package id="System.Runtime" version="4.3.0" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
<package id="System.Threading" version="4.3.0" targetFramework="net462" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net462" />
<package id="WilderMinds.RssSyndication" version="1.0.4" targetFramework="net462" />
</packages>

View File

@ -1,7 +1,8 @@
/// <reference path="../../scripts/typings/google.analytics/ga.d.ts" />
/// <reference path="../../scripts/typings/jsrender/jsrender.d.ts" />
"use strict";
module BuildFeed
export module BuildFeed
{
let ajax: XMLHttpRequest;
let timeout: number;

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="data:MongoDB" value="BuildFeed" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8C3BD4DC-1DB5-4082-A051-4518AA8250A0}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>MigrateBuildStrings</RootNamespace>
<AssemblyName>MigrateBuildStrings</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\BuildFeed.Model\BuildFeed.Model.csproj">
<Project>{7e2b4f61-1c11-4471-af80-5480e94c0664}</Project>
<Name>BuildFeed.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,20 @@
using System.Threading.Tasks;
using BuildFeed.Model;
namespace MigrateBuildStrings
{
internal class Program
{
private static void Main(string[] args)
{
Task.Run(async () =>
{
BuildRepository bModel = new BuildRepository();
foreach (Build build in await bModel.SelectBuildsByOrder())
{
await bModel.Update(build);
}
}).Wait();
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MigrateBuildStrings")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MigrateBuildStrings")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8c3bd4dc-1db5-4082-a051-4518aa8250a0")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -33,16 +33,16 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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>
<Reference Include="MongoDB.Bson, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Bson.2.4.0\lib\net45\MongoDB.Bson.dll</HintPath>
<Private>True</Private>
</Reference>
<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>
<Reference Include="MongoDB.Driver, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.2.4.0\lib\net45\MongoDB.Driver.dll</HintPath>
<Private>True</Private>
</Reference>
<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>
<Reference Include="MongoDB.Driver.Core, Version=2.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NServiceKit.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@ -64,6 +64,10 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<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="MongoDB.Bson" version="2.4.0" targetFramework="net46" />
<package id="MongoDB.Driver" version="2.4.0" targetFramework="net46" />
<package id="MongoDB.Driver.Core" version="2.4.0" targetFramework="net46" />
<package id="NServiceKit.Common" version="1.0.31" targetFramework="net46" />
<package id="NServiceKit.Redis" version="1.0.17" targetFramework="net46" />
<package id="NServiceKit.Text" version="1.0.10" targetFramework="net46" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
</packages>

View File

@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -33,20 +33,24 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Bson.2.4.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.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.2.4.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.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MongoDB.Bson" version="2.0.1" targetFramework="net452" />
<package id="MongoDB.Driver" version="2.0.1" targetFramework="net452" />
<package id="MongoDB.Driver.Core" version="2.0.1" targetFramework="net452" />
<package id="MongoDB.Bson" version="2.4.0" targetFramework="net452" />
<package id="MongoDB.Driver" version="2.4.0" targetFramework="net452" />
<package id="MongoDB.Driver.Core" version="2.4.0" targetFramework="net452" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net452" />
</packages>

View File

@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -33,16 +33,16 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Bson.2.4.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.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.2.4.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.4.0.70, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MongoDB.Driver.Core.2.4.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NServiceKit.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@ -64,6 +64,10 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<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.4.0" targetFramework="net46" />
<package id="MongoDB.Driver" version="2.4.0" targetFramework="net46" />
<package id="MongoDB.Driver.Core" version="2.4.0" targetFramework="net46" />
<package id="NServiceKit.Common" version="1.0.27" targetFramework="net46" />
<package id="NServiceKit.Redis" version="1.0.10" targetFramework="net46" />
<package id="NServiceKit.Text" version="1.0.10" targetFramework="net46" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
</packages>