Skip to content

Commit 14e370a

Browse files
authored
Merge pull request #8308 from NuGet/dev
[ReleasePrep][2020.11.01]NuGetGallery of dev into master
2 parents d693ade + 151e107 commit 14e370a

6 files changed

Lines changed: 16 additions & 15 deletions

File tree

NuGet.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
</packageRestore>
1010
<packageSources>
1111
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
12-
<add key="nugetbuild" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
13-
<add key="dotnetcore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
12+
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
1413
</packageSources>
1514
<activePackageSource>
1615
<add key="All" value="(Aggregate source)" />

src/Bootstrap/dist/css/bootstrap-theme.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bootstrap/less/theme/base.less

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ body {
249249
.alert {
250250
margin: 0;
251251
padding: 10px;
252-
}
252+
}
253253
}
254254

255255
.alert-transient-jumbotron {
@@ -261,7 +261,7 @@ body {
261261

262262
li {
263263
position: relative;
264-
264+
265265
i.ms-Icon {
266266
position: absolute;
267267
left: -24px;
@@ -286,11 +286,12 @@ h2, h3 {
286286
.container {
287287
// Bootstrap doesn't set the container width when the screen is xs.
288288
// This works fine when there are no elements in the container that are wider than the viewport,
289-
// however, if there are elements in the container that are wider than the viewport,
289+
// however, if there are elements in the container that are wider than the viewport,
290290
// their overflow properties will not work properly because they are not bound by the size of the container.
291291
// To fix this, we need to set the container width to be the width of the viewport minus the row margin on xs screens.
292292
// This way, those elements that are larger than the viewport are properly bound by the size of the container and overflow properly.
293-
width: calc(100vw - 15px);
293+
// 2020.10.27: We actually need to set it slightly smaller than the row margin as a horizontal scrollbar appears at xs when exactly matched.
294+
width: calc(100vw - 20px);
294295
}
295296

296297
.navbar-toggle {
@@ -425,4 +426,4 @@ img.reserved-indicator-icon {
425426

426427
.sortable {
427428
cursor: pointer;
428-
}
429+
}

src/NuGetGallery/Services/SqlAggregateStatsService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public SqlAggregateStatsService(IAppConfiguration configuration, ISqlConnectionF
2626
_connectionFactory = galleryDbConnectionFactory;
2727
}
2828

29-
public Task<AggregateStats> GetAggregateStats()
29+
public async Task<AggregateStats> GetAggregateStats()
3030
{
31-
var connection = Task.Run(() => _connectionFactory.CreateAsync()).Result;
31+
var connection = await _connectionFactory.CreateAsync();
3232
using (var dbContext = new EntitiesContext(connection, readOnly: true)) // true - set readonly but it is ignored anyway, as this class doesn't call EntitiesContext.SaveChanges()
3333
{
3434
var database = dbContext.Database;
@@ -41,15 +41,15 @@ public Task<AggregateStats> GetAggregateStats()
4141
bool hasData = reader.Read();
4242
if (!hasData)
4343
{
44-
return Task.FromResult(new AggregateStats());
44+
return new AggregateStats();
4545
}
4646

47-
return Task.FromResult(new AggregateStats
47+
return new AggregateStats
4848
{
4949
Downloads = reader.IsDBNull(0) ? 0 : reader.GetInt32(0),
5050
UniquePackages = reader.IsDBNull(1) ? 0 : reader.GetInt32(1),
5151
TotalPackages = reader.IsDBNull(2) ? 0 : reader.GetInt32(2)
52-
});
52+
};
5353
}
5454
}
5555
}

src/NuGetGallery/Views/Users/Account.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
ViewBag.MdPageColumns = GalleryConstants.ColumnsFormMd;
55
TempData["Parent"] = this;
66
}
7+
@ViewHelpers.AjaxAntiForgeryToken(Html)
78

89
<section role="main" class="container main-container page-account-settings">
910
<div class="row">

tests/NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<packageSources>
1111
<clear />
1212
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
13-
<add key="nugetbuild" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
13+
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
1414
</packageSources>
1515
<activePackageSource>
1616
<add key="All" value="(Aggregate source)" />

0 commit comments

Comments
 (0)