Skip to content

Commit a79b0f0

Browse files
authoredFeb 16, 2021
Merge pull request #8418 from NuGet/dev
[ReleasePrep][2020.02.15] RI of dev into master
2 parents 2571315 + 2a4b380 commit a79b0f0

File tree

25 files changed

+53
-204
lines changed

25 files changed

+53
-204
lines changed
 

‎src/AccountDeleter/Configuration/GalleryConfiguration.cs

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public string SiteRoot
108108
public string EmbeddedIconUrlTemplate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
109109
public bool SelfServiceAccountDeleteEnabled { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
110110
public string DeploymentLabel { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
111-
public string UsabillaFeedbackButtonId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
112111
public int? MinWorkerThreads { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
113112
public int? MaxWorkerThreads { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
114113
public int? MinIoThreads { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

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

-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Bootstrap/dist/css/bootstrap.css

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Bootstrap/less/responsive-utilities.less

-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
width: device-width;
2525
}
2626

27-
// See: https://stackoverflow.com/a/19706857
28-
body {
29-
-ms-overflow-style: scrollbar;
30-
}
3127

3228
// Visibility utilities
3329
// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0

‎src/Bootstrap/less/theme/base.less

-11
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,6 @@ img.reserved-indicator-icon {
417417
}
418418
}
419419

420-
.usabilla-button {
421-
top: auto !important;
422-
margin-top: -65px;
423-
bottom: 20%;
424-
width: 40px;
425-
height: 130px;
426-
position: fixed;
427-
z-index: 99999;
428-
right: 0;
429-
}
430-
431420
.sortable {
432421
cursor: pointer;
433422
}

‎src/DatabaseMigrationTools/DatabaseMigrationTools.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<PrivateAssets>all</PrivateAssets>
6666
</PackageReference>
6767
<PackageReference Include="NuGet.Services.Validation">
68-
<Version>2.82.0</Version>
68+
<Version>2.84.0</Version>
6969
</PackageReference>
7070
</ItemGroup>
7171
<ItemGroup>

‎src/GitHubVulnerabilities2Db/GitHubVulnerabilities2Db.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<Version>4.3.0-dev-3612825</Version>
9090
</PackageReference>
9191
<PackageReference Include="NuGet.Services.Cursor">
92-
<Version>2.82.0</Version>
92+
<Version>2.84.0</Version>
9393
</PackageReference>
9494
</ItemGroup>
9595
<ItemGroup>

‎src/NuGetGallery.Core/NuGetGallery.Core.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<Version>5.8.0</Version>
4848
</PackageReference>
4949
<PackageReference Include="NuGet.Services.FeatureFlags">
50-
<Version>2.82.0</Version>
50+
<Version>2.84.0</Version>
5151
</PackageReference>
5252
<PackageReference Include="WindowsAzure.Storage">
5353
<Version>9.3.3</Version>
@@ -56,13 +56,13 @@
5656

5757
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
5858
<PackageReference Include="NuGet.Services.Messaging.Email">
59-
<Version>2.82.0</Version>
59+
<Version>2.84.0</Version>
6060
</PackageReference>
6161
<PackageReference Include="NuGet.Services.Validation">
62-
<Version>2.82.0</Version>
62+
<Version>2.84.0</Version>
6363
</PackageReference>
6464
<PackageReference Include="NuGet.Services.Validation.Issues">
65-
<Version>2.82.0</Version>
65+
<Version>2.84.0</Version>
6666
</PackageReference>
6767
<PackageReference Include="NuGet.StrongName.elmah.corelibrary">
6868
<Version>1.2.2</Version>

‎src/NuGetGallery.Services/Configuration/AppConfiguration.cs

-2
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,6 @@ public string ExternalBrandingMessage
406406
[DefaultValue(null)]
407407
public string DeploymentLabel { get; set; }
408408

409-
public string UsabillaFeedbackButtonId { get; set; }
410-
411409
[DefaultValue(null)]
412410
public int? MinWorkerThreads { get; set; }
413411
[DefaultValue(null)]

‎src/NuGetGallery.Services/Configuration/FeatureFlagService.cs

-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public class FeatureFlagService : IFeatureFlagService
3939
private const string ODataCacheDurationsFeatureName = GalleryPrefix + "ODataCacheDurations";
4040
private const string ShowEnable2FADialog = GalleryPrefix + "ShowEnable2FADialog";
4141
private const string Get2FADismissFeedback = GalleryPrefix + "Get2FADismissFeedback";
42-
private const string UsabillaOnEveryPageFeatureName = GalleryPrefix + "UsabillaEveryPage";
4342
private const string PackageRenamesFeatureName = GalleryPrefix + "PackageRenames";
4443
private const string EmbeddedReadmeFlightName = GalleryPrefix + "EmbeddedReadmes";
4544
private const string LicenseMdRenderingFlightName = GalleryPrefix + "LicenseMdRendering";
@@ -215,11 +214,6 @@ public bool IsGet2FADismissFeedbackEnabled()
215214
return _client.IsEnabled(Get2FADismissFeedback, defaultValue: false);
216215
}
217216

218-
public bool IsUsabillaButtonEnabledOnEveryPage()
219-
{
220-
return _client.IsEnabled(UsabillaOnEveryPageFeatureName, defaultValue: false);
221-
}
222-
223217
public bool IsPackageRenamesEnabled(User user)
224218
{
225219
return _client.IsEnabled(PackageRenamesFeatureName, user, defaultValue: false);

‎src/NuGetGallery.Services/Configuration/IAppConfiguration.cs

-6
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,6 @@ public interface IAppConfiguration : IMessageServiceConfiguration
461461
/// </summary>
462462
string DeploymentLabel { get; set; }
463463

464-
/// <summary>
465-
/// The Usabilla feedback button ID embedded in the JavaScript snippet obtained from Usabilla. The ID can found
466-
/// in your button's JavaScript code. Look for "//w.usabilla.com/{button ID}.js".
467-
/// </summary>
468-
string UsabillaFeedbackButtonId { get; set; }
469-
470464
/// <summary>
471465
/// Allows to override the default (or externally configured) minWorkerThreads setting. Must be specified with <see cref="MinIoThreads"/>.
472466
/// This is a global (not per CPU core) limit.

‎src/NuGetGallery.Services/Configuration/IFeatureFlagService.cs

-5
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ public interface IFeatureFlagService
153153
/// </summary>
154154
bool IsGet2FADismissFeedbackEnabled();
155155

156-
/// <summary>
157-
/// Whether we should enable the Usabilla feedback button on every page.
158-
/// </summary>
159-
bool IsUsabillaButtonEnabledOnEveryPage();
160-
161156
/// <summary>
162157
/// Whether the user is able to see or manage the package renames information.
163158
/// </summary>

‎src/NuGetGallery.Services/NuGetGallery.Services.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@
307307
<Version>5.8.0</Version>
308308
</PackageReference>
309309
<PackageReference Include="NuGet.Services.Configuration">
310-
<Version>2.82.0</Version>
310+
<Version>2.84.0</Version>
311311
</PackageReference>
312312
<PackageReference Include="NuGet.Services.Logging">
313-
<Version>2.82.0</Version>
313+
<Version>2.84.0</Version>
314314
</PackageReference>
315315
<PackageReference Include="NuGet.StrongName.WebBackgrounder">
316316
<Version>0.2.0</Version>

‎src/NuGetGallery/App_Code/ViewHelpers.cshtml

-54
Original file line numberDiff line numberDiff line change
@@ -348,37 +348,6 @@
348348
}
349349
}
350350

351-
@helper UsabillaButton(UrlHelper url, dynamic viewBag)
352-
{
353-
if (GetUsabillaButtonIdOrNull(viewBag) != null)
354-
{
355-
<div class="usabilla-button" id="usabilla-button" style="display: none">
356-
<a tabindex="0" id="usbl-integrated-button" href="#" role="button">
357-
<img width="40" height="130" src="~/Content/gallery/img/feedback.svg" alt="Usabilla Feedback"
358-
@ViewHelpers.ImageFallback(url.Absolute("~/Content/gallery/img/feedback-40x130.png")) />
359-
</a>
360-
</div>
361-
}
362-
}
363-
364-
@helper UsabillaScript(dynamic viewBag)
365-
{
366-
var buttonId = GetUsabillaButtonIdOrNull(viewBag);
367-
if (buttonId != null)
368-
{
369-
var obfuscatedPath = ObfuscationHelper.ObfuscateRequestUrl(new HttpContextWrapper(HttpContext.Current), RouteTable.Routes);
370-
<!-- begin usabilla live embed code -->
371-
<script type="text/javascript">
372-
/*{literal}<![CDATA[*/window.lightningjs||function(c){function g(b,d){d&&(d+=(/\?/.test(d)?"&":"?")+"lv=1");c[b]||function(){var i=window,h=document,j=b,g=h.location.protocol,l="load",k=0;(function(){function b(){a.P(l);a.w=1;c[j]("_load")}c[j]=function(){function m(){m.id=e;return c[j].apply(m,arguments)}var b,e=++k;b=this&&this!=i?this.id||0:0;(a.s=a.s||[]).push([e,b,arguments]);m.then=function(b,c,h){var d=a.fh[e]=a.fh[e]||[],j=a.eh[e]=a.eh[e]||[],f=a.ph[e]=a.ph[e]||[];b&&d.push(b);c&&j.push(c);h&&f.push(h);return m};return m};var a=c[j]._={};a.fh={};a.eh={};a.ph={};a.l=d?d.replace(/^\/\//,(g=="https:"?g:"http:")+"//"):d;a.p={0:+new Date};a.P=function(b){a.p[b]=new Date-a.p[0]};a.w&&b();i.addEventListener?i.addEventListener(l,b,!1):i.attachEvent("on"+l,b);var q=function(){function b(){return["<head></head><",c,' onload="var d=',n,";d.getElementsByTagName('head')[0].",d,"(d.",g,"('script')).",i,"='",a.l,"'\"></",c,">"].join("")}var c="body",e=h[c];if(!e)return setTimeout(q,100);a.P(1);var d="appendChild",g="createElement",i="src",k=h[g]("div"),l=k[d](h[g]("div")),f=h[g]("iframe"),n="document",p;k.style.display="none";e.insertBefore(k,e.firstChild).id=o+"-"+j;f.frameBorder="0";f.id=o+"-frame-"+j;/MSIE[ ]+6/.test(navigator.userAgent)&&(f[i]="javascript:false");f.allowTransparency="true";l[d](f);try{f.contentWindow[n].open()}catch(s){a.domain=h.domain,p="javascript:var d="+n+".open();d.domain='"+h.domain+"';",f[i]=p+"void(0);"}try{var r=f.contentWindow[n];r.write(b());r.close()}catch(t){f[i]=p+'d.write("'+b().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};a.l&&setTimeout(q,0)})()}();c[b].lv="1";return c[b]}var o="lightningjs",k=window[o]=g(o);k.require=g;k.modules=c}({});
373-
window.usabilla_live = lightningjs.require("usabilla_live", "//w.usabilla.com/@(buttonId).js");
374-
/*]]>{/literal}*/</script>
375-
<!-- end usabilla live embed code -->
376-
<script type="text/javascript">
377-
window.nuget.enableUsabilla('@obfuscatedPath');
378-
</script>
379-
}
380-
}
381-
382351
@helper AccordionBar(
383352
string groupName,
384353
WebViewPage page,
@@ -728,29 +697,6 @@ var hlp = new AccordionHelper(name, formModelStatePrefix, expanded, page);
728697

729698
@functions
730699
{
731-
public static string GetUsabillaButtonIdOrNull(dynamic viewBag)
732-
{
733-
var config = DependencyResolver.Current.GetService<IGalleryConfigurationService>();
734-
if (config != null)
735-
{
736-
var buttonId = config.Current.UsabillaFeedbackButtonId;
737-
if (!string.IsNullOrWhiteSpace(buttonId))
738-
{
739-
var featureFlagService = DependencyResolver.Current.GetService<IFeatureFlagService>();
740-
if (featureFlagService.IsUsabillaButtonEnabledOnEveryPage())
741-
{
742-
bool canWriteAnalyticsCookies = viewBag.CanWriteAnalyticsCookies ?? false;
743-
if (canWriteAnalyticsCookies)
744-
{
745-
return buttonId;
746-
}
747-
}
748-
}
749-
}
750-
751-
return null;
752-
}
753-
754700
public static bool IsLicenseOrException(CompositeLicenseExpressionSegment segment)
755701
{
756702
return segment.Type == CompositeLicenseExpressionSegmentType.LicenseIdentifier || segment.Type == CompositeLicenseExpressionSegmentType.ExceptionIdentifier;

‎src/NuGetGallery/App_Data/Files/Content/flags.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"NuGetGallery.ODataCacheDurations": "Enabled",
99
"NuGetGallery.ShowEnable2FADialog": "Enabled",
1010
"NuGetGallery.Get2FADismissFeedback": "Disabled",
11-
"NuGetGallery.UsabillaEveryPage": "Enabled",
1211
"NuGetGallery.ODataV1GetAllNonHijacked": "Enabled",
1312
"NuGetGallery.ODataV1GetAllCountNonHijacked": "Enabled",
1413
"NuGetGallery.ODataV1GetSpecificNonHijacked": "Enabled",

‎src/NuGetGallery/Areas/Admin/Controllers/ValidationController.cs

+18-13
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,39 @@ public virtual ActionResult Index()
3131
public virtual ActionResult Pending()
3232
{
3333
var validationSets = _validationAdminService.GetPending();
34-
var validatedPackages = ToValidatedPackages(validationSets);
35-
var validationSetIds = validatedPackages
34+
var packageValidations = ToPackageValidations(validationSets);
35+
var validationSetIds = packageValidations
3636
.SelectMany(p => p.ValidationSets)
3737
.Select(s => s.ValidationTrackingId);
3838
var query = string.Join("\r\n", validationSetIds);
3939

40-
return View(nameof(Index), new ValidationPageViewModel(query, validatedPackages));
40+
return View(nameof(Index), new ValidationPageViewModel(query, packageValidations));
4141
}
4242

4343
[HttpGet]
4444
public virtual ActionResult Search(string q)
4545
{
4646
var packageValidationSets = _validationAdminService.Search(q ?? string.Empty);
47-
var validatedPackages = ToValidatedPackages(packageValidationSets);
47+
var validatedPackages = ToPackageValidations(packageValidationSets);
4848

4949
return View(nameof(Index), new ValidationPageViewModel(q, validatedPackages));
5050
}
5151

52-
private List<ValidatedPackageViewModel> ToValidatedPackages(IReadOnlyList<PackageValidationSet> packageValidationSets)
52+
private List<NuGetPackageValidationViewModel> ToPackageValidations(IReadOnlyList<PackageValidationSet> packageValidationSets)
5353
{
54-
var validatedPackages = new List<ValidatedPackageViewModel>();
55-
AppendValidatedPackages(validatedPackages, packageValidationSets, ValidatingType.Package);
56-
AppendValidatedPackages(validatedPackages, packageValidationSets, ValidatingType.SymbolPackage);
54+
// TODO: Add generic validation sets.
55+
// Tracked by: https://github.com/NuGet/Engineering/issues/3587
56+
var packageValidations = new List<NuGetPackageValidationViewModel>();
57+
AppendNuGetPackageValidations(packageValidations, packageValidationSets, ValidatingType.Package);
58+
AppendNuGetPackageValidations(packageValidations, packageValidationSets, ValidatingType.SymbolPackage);
5759

58-
return validatedPackages;
60+
return packageValidations;
5961
}
6062

61-
private void AppendValidatedPackages(List<ValidatedPackageViewModel> validatedPackages, IEnumerable<PackageValidationSet> validationSets, ValidatingType validatingType)
63+
private void AppendNuGetPackageValidations(
64+
List<NuGetPackageValidationViewModel> packageValidations,
65+
IEnumerable<PackageValidationSet> validationSets,
66+
ValidatingType validatingType)
6267
{
6368
var groups = validationSets
6469
.Where(x => x.ValidatingType == validatingType)
@@ -77,9 +82,9 @@ private void AppendValidatedPackages(List<ValidatedPackageViewModel> validatedPa
7782
.OrderBy(x => x.Started)
7883
.ToList();
7984
}
80-
var deletedStatus = _validationAdminService.GetDeletedStatus(group.Key, validatingType);
81-
var validatedPackage = new ValidatedPackageViewModel(group.ToList(), deletedStatus, validatingType);
82-
validatedPackages.Add(validatedPackage);
85+
var deletedStatus = _validationAdminService.GetDeletedStatus(group.Key.Value, validatingType);
86+
var packageValidation = new NuGetPackageValidationViewModel(group.ToList(), deletedStatus, validatingType);
87+
packageValidations.Add(packageValidation);
8388
}
8489
}
8590
}

‎src/NuGetGallery/Areas/Admin/Services/ValidationAdminService.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,16 @@ public IReadOnlyList<PackageValidationSet> GetPending()
6767
var pendingPackages = _packages
6868
.GetAll()
6969
.Where(p => p.PackageStatusKey == PackageStatus.Validating)
70-
.Select(p => p.Key)
70+
.Select(p => (int?)p.Key)
7171
.ToList();
7272
var pendingSymbolPackages = _symbolPackages
7373
.GetAll()
7474
.Where(s => s.StatusKey == PackageStatus.Validating)
75-
.Select(s => s.Key)
75+
.Select(s => (int?)s.Key)
7676
.ToList();
7777

78+
// TODO: Add generic validation sets.
79+
// Tracked by: https://github.com/NuGet/Engineering/issues/3587
7880
AddPendingValidationSets(pendingValidations, pendingPackages, ValidatingType.Package);
7981
AddPendingValidationSets(pendingValidations, pendingSymbolPackages, ValidatingType.SymbolPackage);
8082

@@ -228,7 +230,7 @@ private void SearchByPackageId(Dictionary<long, PackageValidationSet> validation
228230

229231
private void AddPendingValidationSets(
230232
List<PackageValidationSet> validationSets,
231-
IReadOnlyList<int> packageKeys,
233+
IReadOnlyList<int?> packageKeys,
232234
ValidatingType type)
233235
{
234236
foreach (var packageKeyBatch in Batch(packageKeys, PendingValidationsBatchSize))
@@ -237,7 +239,7 @@ private void AddPendingValidationSets(
237239
_validationSets
238240
.GetAll()
239241
.Where(v => v.ValidatingType == type)
240-
.Where(v => packageKeys.Contains(v.PackageKey)));
242+
.Where(v => packageKeyBatch.Contains(v.PackageKey)));
241243
}
242244
}
243245

‎src/NuGetGallery/Areas/Admin/ViewModels/ValidatedPackageViewModel.cs ‎src/NuGetGallery/Areas/Admin/ViewModels/NuGetPackageValidationViewModel.cs

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
using System;
45
using System.Collections.Generic;
56
using System.Linq;
67
using NuGet.Services.Validation;
78
using NuGetGallery.Areas.Admin.Models;
89

910
namespace NuGetGallery.Areas.Admin.ViewModels
1011
{
11-
public class ValidatedPackageViewModel : IPackageVersionModel
12+
public class NuGetPackageValidationViewModel : IPackageVersionModel
1213
{
13-
public ValidatedPackageViewModel(IReadOnlyList<PackageValidationSet> validationSets, PackageDeletedStatus deletedStatus, ValidatingType validatingType)
14+
public NuGetPackageValidationViewModel(
15+
IReadOnlyList<PackageValidationSet> validationSets,
16+
PackageDeletedStatus deletedStatus,
17+
ValidatingType validatingType)
1418
{
19+
if (validatingType == ValidatingType.Generic)
20+
{
21+
throw new ArgumentException(
22+
$"Unsupported validation type of {validatingType}",
23+
nameof(validatingType));
24+
}
25+
1526
var first = validationSets.First();
16-
PackageKey = first.PackageKey;
27+
PackageKey = first.PackageKey.Value;
1728
Id = first.PackageId;
1829
NormalizedVersion = first.PackageNormalizedVersion;
1930
DeletedStatus = deletedStatus;

‎src/NuGetGallery/Areas/Admin/ViewModels/ValidationPageViewModel.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public ValidationPageViewModel() : this(null, null)
1111
{
1212
}
1313

14-
public ValidationPageViewModel(string query, IReadOnlyList<ValidatedPackageViewModel> packages)
14+
public ValidationPageViewModel(string query, IReadOnlyList<NuGetPackageValidationViewModel> packages)
1515
{
1616
Query = query ?? string.Empty;
17-
Packages = packages ?? new List<ValidatedPackageViewModel>();
17+
Packages = packages ?? new List<NuGetPackageValidationViewModel>();
1818
}
1919

2020
public string Query { get; }
@@ -23,6 +23,6 @@ public ValidationPageViewModel(string query, IReadOnlyList<ValidatedPackageViewM
2323

2424
public bool HasResults => Packages.Count > 0;
2525

26-
public IReadOnlyList<ValidatedPackageViewModel> Packages { get; }
26+
public IReadOnlyList<NuGetPackageValidationViewModel> Packages { get; }
2727
}
2828
}
Binary file not shown.

‎src/NuGetGallery/Content/gallery/img/feedback.svg

-7
This file was deleted.

‎src/NuGetGallery/NuGetGallery.csproj

+4-6
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
<Compile Include="Areas\Admin\ViewModels\ModifyFeatureFlagsFlightViewModel.cs" />
191191
<Compile Include="Areas\Admin\ViewModels\ApiKeyRevokeViewModel.cs" />
192192
<Compile Include="Areas\Admin\ViewModels\SiteAdminsViewModel.cs" />
193-
<Compile Include="Areas\Admin\ViewModels\ValidatedPackageViewModel.cs" />
193+
<Compile Include="Areas\Admin\ViewModels\NuGetPackageValidationViewModel.cs" />
194194
<Compile Include="Areas\Admin\ViewModels\RevalidationPageViewModel.cs" />
195195
<Compile Include="Areas\Admin\ViewModels\ValidationPageViewModel.cs" />
196196
<Compile Include="Areas\Admin\ViewModels\DeleteAccountSearchResult.cs" />
@@ -1305,8 +1305,6 @@
13051305
<Content Include="Areas\Admin\DynamicData\PageTemplates\ListDetails.aspx" />
13061306
<Content Include="Content\admin\SupportRequestStyles.css" />
13071307
<Content Include="Content\fabric.css" />
1308-
<Content Include="Content\gallery\img\feedback-40x130.png" />
1309-
<Content Include="Content\gallery\img\feedback.svg" />
13101308
<Content Include="Content\gallery\img\logo-og-600x600.png" />
13111309
<Content Include="Content\gallery\img\rss-24x24.png" />
13121310
<Content Include="Content\Images\icons\apiKey.png" />
@@ -2242,13 +2240,13 @@
22422240
<Version>5.8.0</Version>
22432241
</PackageReference>
22442242
<PackageReference Include="NuGet.Services.Licenses">
2245-
<Version>2.82.0</Version>
2243+
<Version>2.84.0</Version>
22462244
</PackageReference>
22472245
<PackageReference Include="NuGet.Services.Owin">
2248-
<Version>2.82.0</Version>
2246+
<Version>2.84.0</Version>
22492247
</PackageReference>
22502248
<PackageReference Include="NuGet.Services.Sql">
2251-
<Version>2.82.0</Version>
2249+
<Version>2.84.0</Version>
22522250
</PackageReference>
22532251
<PackageReference Include="Owin">
22542252
<Version>1.0.0</Version>

‎src/NuGetGallery/Scripts/gallery/common.js

-53
Original file line numberDiff line numberDiff line change
@@ -462,59 +462,6 @@
462462
}
463463
};
464464

465-
nuget.enableUsabilla = function (obfuscatedPath) {
466-
// Only enable Usabilla if the API is available and the button container is in the DOM. If the user has
467-
// external scripts blocked or trackers blocks, Usabilla might not be loaded at all. This method was confirmed
468-
// with Usabilla support staff.
469-
if (window.usabilla_live !== undefined && $(".usabilla_live_button_container").length > 0) {
470-
// If there is an obfuscated path, hook into the outgoing AJAX request containing the feedback and obfuscate
471-
// the URL data. This approach was provided by the Usabilla technical support.
472-
if (obfuscatedPath) {
473-
var obfuscatedUrl = document.createElement('a');
474-
obfuscatedUrl.href = window.location.href;
475-
if (obfuscatedPath.substring(0, 1) != "/") {
476-
obfuscatedUrl.pathname = "/" + obfuscatedPath;
477-
} else {
478-
obfuscatedUrl.pathname = obfuscatedPath;
479-
}
480-
481-
window.usabilla_live("setEventCallback", function (category, action, label, value, eventdata) {
482-
if (action != "Feedback:Open") {
483-
return;
484-
}
485-
486-
function sendWithObfuscation(vData) {
487-
if (vData) {
488-
var data = JSON.parse(vData);
489-
data.url = obfuscatedUrl.href;
490-
vData = JSON.stringify(data);
491-
arguments[0] = vData;
492-
}
493-
realSend.apply(this, arguments);
494-
}
495-
496-
var realSend = XMLHttpRequest.prototype.send;
497-
var ub_window = document.getElementById("lightningjs-frame-usabilla_live_feedback").contentWindow;
498-
ub_window.XMLHttpRequest.prototype.send = sendWithObfuscation;
499-
if (window.XDomainRequest) {
500-
realSend = XDomainRequest.prototype.send;
501-
ub_window.XDomainRequest.prototype.send = sendWithObfuscation;
502-
}
503-
});
504-
}
505-
506-
// Hide the default feedback button.
507-
window.usabilla_live("hide");
508-
509-
// Wire-up and show the custom feedback button.
510-
document.getElementById("usbl-integrated-button").addEventListener("click", function (event) {
511-
event.preventDefault();
512-
window.usabilla_live("click");
513-
});
514-
document.getElementById("usabilla-button").style.display = "block";
515-
}
516-
};
517-
518465
window.nuget = nuget;
519466

520467
jQuery.extend(jQuery.expr.pseudos, {

‎src/NuGetGallery/Views/Shared/Gallery/Layout.cshtml

-2
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@
4242
<div id="skippedToContent">
4343
@RenderBody()
4444
</div>
45-
@ViewHelpers.UsabillaButton(Url, ViewBag)
4645
@Html.Partial("Gallery/Footer")
4746
@ViewHelpers.CookieComplianceScript()
4847
@Scripts.Render("~/Scripts/gallery/site.min.js")
4948
@RenderSection("BottomScripts", required: false)
50-
@ViewHelpers.UsabillaScript(ViewBag)
5149
</body>
5250
</html>

‎src/NuGetGallery/Web.config

-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@
8181
<add key="Gallery.AppInsightsHeartbeatIntervalSeconds" value="60"/>
8282
<!-- Set this if you have a Google Analytics property for the site -->
8383
<add key="Gallery.GoogleAnalyticsPropertyId" value=""/>
84-
<!-- Set this if you have a Usabilla button ID so that a feedback button appears on every page -->
85-
<add key="Gallery.UsabillaFeedbackButtonId" value=""/>
8684
<!-- Set this to the Azure CDN Host you are using for blob storage, if you have configured one -->
8785
<add key="Gallery.AzureCdnHost" value=""/>
8886
<add key="Gallery.SiteRoot" value="http://localhost"/>

0 commit comments

Comments
 (0)
Please sign in to comment.