Skip to content

Commit a0f9353

Browse files
authored
Merge pull request Azure#3871 from twitchax/preview_fix
Revert "Implement Send-Feedback cmdlet."
2 parents 34f75ac + 5c69ae8 commit a0f9353

File tree

12 files changed

+2
-346
lines changed

12 files changed

+2
-346
lines changed

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ protected bool CheckIfInteractive()
224224
}
225225
}
226226

227-
if (!interactive && _dataCollectionProfile != null && !_dataCollectionProfile.EnableAzureDataCollection.HasValue)
227+
if (!interactive && !_dataCollectionProfile.EnableAzureDataCollection.HasValue)
228228
{
229229
_dataCollectionProfile.EnableAzureDataCollection = false;
230230
}

src/Common/Commands.Common/MetricHelper.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
using Microsoft.ApplicationInsights.DataContracts;
1717
using Microsoft.ApplicationInsights.Extensibility;
1818
using Microsoft.WindowsAzure.Commands.Utilities.Common;
19-
using Newtonsoft.Json;
20-
using Newtonsoft.Json.Serialization;
2119
using System;
2220
using System.Collections.Generic;
2321
using System.Diagnostics;
@@ -106,19 +104,6 @@ public void LogQoSEvent(AzurePSQoSEvent qos, bool isUsageMetricEnabled, bool isE
106104
}
107105
}
108106

109-
public void LogCustomEvent<T>(string eventName, T payload, bool force = false)
110-
{
111-
if (!force && !IsMetricTermAccepted())
112-
{
113-
return;
114-
}
115-
116-
foreach (TelemetryClient client in TelemetryClients)
117-
{
118-
client.TrackEvent(eventName, SerializeCustomEventPayload(payload));
119-
}
120-
}
121-
122107
private void LogUsageEvent(AzurePSQoSEvent qos)
123108
{
124109
foreach (TelemetryClient client in TelemetryClients)
@@ -233,21 +218,6 @@ public static string GenerateSha256HashString(string originInput)
233218
return BitConverter.ToString(bytes);
234219
}
235220
}
236-
237-
/// <summary>
238-
/// Generate a serialized payload for custom events.
239-
/// </summary>
240-
/// <param name="payload">The payload object for the custom event.</param>
241-
/// <returns>The serialized payload.</returns>
242-
public static Dictionary<string, string> SerializeCustomEventPayload<T>(T payload)
243-
{
244-
var payloadAsJson = JsonConvert.SerializeObject(payload, new JsonSerializerSettings
245-
{
246-
ContractResolver = new CamelCasePropertyNamesContractResolver()
247-
});
248-
249-
return JsonConvert.DeserializeObject<Dictionary<string, string>>(payloadAsJson);
250-
}
251221
}
252222
}
253223

src/ResourceManager/Profile/ChangeLog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
* Added `Send-Feedback' cmdlet: allows a user to initiate a set of prompts which sends feedback to the Azure PowerShell team.
2221

2322
## Version 2.8.0
2423
* *Obsolete*: Save-AzureRmProfile is renamed to Save-AzureRmContext, there is an alias to the old cmdlet name, the alias will be removed in the next release.

src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@
191191
<Compile Include="ProfileController.cs" />
192192
<Compile Include="RPRegistrationDelegatingHandlerTests.cs" />
193193
<Compile Include="SubscriptionCmdletTests.cs" />
194-
<Compile Include="SendFeedbackTests.cs" />
195194
<Compile Include="TelemetryTests.cs" />
196195
<Compile Include="TenantCmdletTests.cs" />
197196
<Compile Include="LoginCmdletTests.cs" />

src/ResourceManager/Profile/Commands.Profile.Test/SendFeedbackTests.cs

Lines changed: 0 additions & 89 deletions
This file was deleted.

src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,9 @@
131131
<Compile Include="Environment\GetAzureRMEnvironment.cs" />
132132
<Compile Include="Environment\SetAzureRMEnvironment.cs" />
133133
<Compile Include="Environment\AddAzureRMEnvironment.cs" />
134-
<Compile Include="Feedback\SendFeedback.cs" />
135134
<Compile Include="Models\ModelExtensions.cs" />
136135
<Compile Include="Models\PSAzureContext.cs" />
137136
<Compile Include="Models\PSAzureEnvironment.cs" />
138-
<Compile Include="Models\PSAzureFeedback.cs" />
139137
<Compile Include="Models\PSAzureProfile.cs" />
140138
<Compile Include="Models\PSAzureRmAccount.cs" />
141139
<Compile Include="Models\PSAzureSubscription.cs" />

src/ResourceManager/Profile/Commands.Profile/Feedback/SendFeedback.cs

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/ResourceManager/Profile/Commands.Profile/Models/PSAzureFeedback.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/ResourceManager/Profile/Commands.Profile/Properties/Resources.Designer.cs

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

src/ResourceManager/Profile/Commands.Profile/Properties/Resources.resx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -220,25 +220,6 @@
220220
<data name="SelectedSubscriptionNotActive" xml:space="preserve">
221221
<value>Selected subscription is in '{0}' state. </value>
222222
</data>
223-
<data name="SendFeedbackEmailQuestion" xml:space="preserve">
224-
<value>Please enter your email if you are interested in providing follow up information:</value>
225-
</data>
226-
<data name="SendFeedbackNegativeCommentsQuestion" xml:space="preserve">
227-
<value>Upon what could Azure PowerShell improve? </value>
228-
</data>
229-
<data name="SendFeedbackNonInteractiveMessage" xml:space="preserve">
230-
<value>{0} must be issued in interactive mode.</value>
231-
<comment>{0} is nameof feedback cmdlet</comment>
232-
</data>
233-
<data name="SendFeedbackOutOfRangeMessage" xml:space="preserve">
234-
<value>The value entered was either not convertible to an integer or out of range [0, 10].</value>
235-
</data>
236-
<data name="SendFeedbackPositiveCommentsQuestion" xml:space="preserve">
237-
<value>What does Azure PowerShell do well?</value>
238-
</data>
239-
<data name="SendFeedbackRecommendationQuestion" xml:space="preserve">
240-
<value>With zero (0) being the least and ten (10) being the most, how likely are you to recommend Azure PowerShell to a friend or colleague?</value>
241-
</data>
242223
<data name="SetAzureRmContextNoParameterSet" xml:space="preserve">
243224
<value>Please provide either a subscription ID, subscription name, tenant Id or domain.</value>
244225
</data>

src/ResourceManager/Profile/Commands.Profile/Tenant/GetAzureRMTenant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public override void ExecuteCmdlet()
3737
{
3838
var profileClient = new RMProfileClient(AzureRmProfileProvider.Instance.Profile);
3939

40-
WriteObject(profileClient.ListTenants(TenantId).Cast<PSAzureTenant>(), enumerateCollection: true);
40+
WriteObject(profileClient.ListTenants(TenantId).Select((t) => (PSAzureTenant)t), enumerateCollection: true);
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)