From 670c369a5e6542ab72b4bca95f727bb7d6fad500 Mon Sep 17 00:00:00 2001 From: Reinier Cruz Date: Thu, 29 Aug 2024 11:05:17 -0400 Subject: [PATCH 1/2] Added option to easily provide feedback --- package.json | 12 +++++++++++- .../aksProvideFeedback/aksProvideFeedback.ts | 8 ++++++++ src/extension.ts | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/commands/aksProvideFeedback/aksProvideFeedback.ts diff --git a/package.json b/package.json index d20f730dc..793ec4a7b 100644 --- a/package.json +++ b/package.json @@ -200,6 +200,10 @@ "command": "aks.installAzureServiceOperator", "title": "Install Azure Service Operator" }, + { + "command": "aks.provideFeedback", + "title": "Report a Bug/Request a Feature" + }, { "command": "aks.aksCRUDDiagnostics", "title": "Create, Upgrade, Delete and Scale" @@ -360,7 +364,13 @@ }, { "command": "aks.installAzureServiceOperator", - "when": "view == kubernetes.cloudExplorer && viewItem =~ /aks\\.cluster/i || view == extension.vsKubernetesExplorer && viewItem =~ /vsKubernetes\\.\\w*cluster$/i" + "when": "view == kubernetes.cloudExplorer && viewItem =~ /aks\\.cluster/i || view == extension.vsKubernetesExplorer && viewItem =~ /vsKubernetes\\.\\w*cluster$/i", + "group": "99@1" + }, + { + "command": "aks.provideFeedback", + "when": "view == kubernetes.cloudExplorer && viewItem =~ /aks\\.cluster/i || view == extension.vsKubernetesExplorer && viewItem =~ /vsKubernetes\\.\\w*cluster$/i", + "group": "999@1" }, { "submenu": "aks.automatedDeploymentsSubMenu", diff --git a/src/commands/aksProvideFeedback/aksProvideFeedback.ts b/src/commands/aksProvideFeedback/aksProvideFeedback.ts new file mode 100644 index 000000000..55ecc7f1d --- /dev/null +++ b/src/commands/aksProvideFeedback/aksProvideFeedback.ts @@ -0,0 +1,8 @@ +import * as vscode from "vscode"; +import { IActionContext } from "@microsoft/vscode-azext-utils"; + +export default async function aksProvideFeedback(_context: IActionContext): Promise { + await vscode.commands.executeCommand("workbench.action.openIssueReporter", { + extensionId: "ms-kubernetes-tools.vscode-aks-tools", + }); +} diff --git a/src/extension.ts b/src/extension.ts index cc15a1021..0ccc50adf 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -44,6 +44,7 @@ import { aksRetinaCapture } from "./commands/aksRetinaCapture/aksRetinaCapture"; import { signInToAzure, selectSubscriptions, selectTenant } from "./commands/aksAccount/aksAccount"; import { activateAzureSessionProvider, getSessionProvider } from "./auth/azureSessionProvider"; import { getReadySessionProvider } from "./auth/azureAuth"; +import aksProvideFeedback from "./commands/aksProvideFeedback/aksProvideFeedback"; export async function activate(context: vscode.ExtensionContext) { const cloudExplorer = await k8s.extension.cloudExplorer.v1; @@ -101,6 +102,7 @@ export async function activate(context: vscode.ExtensionContext) { registerCommandWithTelemetry("aks.refreshSubscription", refreshSubscription); registerCommandWithTelemetry("aks.eraserTool", aksEraserTool); registerCommandWithTelemetry("aks.aksRetinaCapture", aksRetinaCapture); + registerCommandWithTelemetry("aks.provideFeedback", aksProvideFeedback); await registerAzureServiceNodes(context); From a782a22a58d6cd980ec365b88655379109c105eb Mon Sep 17 00:00:00 2001 From: Reinier Cruz Date: Thu, 29 Aug 2024 11:15:15 -0400 Subject: [PATCH 2/2] Removing unused context --- src/commands/aksProvideFeedback/aksProvideFeedback.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/aksProvideFeedback/aksProvideFeedback.ts b/src/commands/aksProvideFeedback/aksProvideFeedback.ts index 55ecc7f1d..02eea32e6 100644 --- a/src/commands/aksProvideFeedback/aksProvideFeedback.ts +++ b/src/commands/aksProvideFeedback/aksProvideFeedback.ts @@ -1,7 +1,6 @@ import * as vscode from "vscode"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; -export default async function aksProvideFeedback(_context: IActionContext): Promise { +export default async function aksProvideFeedback(): Promise { await vscode.commands.executeCommand("workbench.action.openIssueReporter", { extensionId: "ms-kubernetes-tools.vscode-aks-tools", });