diff --git a/serviceconnector/src/createLinker/ICreateLinkerContext.ts b/serviceconnector/src/createLinker/ICreateLinkerContext.ts index be4e72f134..c8b48a1b28 100644 --- a/serviceconnector/src/createLinker/ICreateLinkerContext.ts +++ b/serviceconnector/src/createLinker/ICreateLinkerContext.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { AuthInfoBase, KnownClientType, LinkerResource } from "@azure/arm-servicelinker"; import { IStorageAccountWizardContext } from "@microsoft/vscode-azext-azureutils"; -import { ISubscriptionActionContext } from "@microsoft/vscode-azext-utils"; +import { ExecuteActivityContext, ISubscriptionActionContext } from "@microsoft/vscode-azext-utils"; import { TargetServiceType } from "../../constants"; import { DatabaseAccountJsonResponse } from "./CosmosDBAccountListStep"; import { KeyVaultAccountJsonResponse } from "./KeyVaultListStep"; -export interface ICreateLinkerContext extends ISubscriptionActionContext, IStorageAccountWizardContext { +export interface ICreateLinkerContext extends ISubscriptionActionContext, IStorageAccountWizardContext, ExecuteActivityContext { //Source resource sourceResourceUri?: string; /** This is only assigned when the source resource is a container app to indicate which container is being connected */ diff --git a/serviceconnector/src/createLinker/LinkerCreateStep.ts b/serviceconnector/src/createLinker/LinkerCreateStep.ts index 7750e43cae..82336c4654 100644 --- a/serviceconnector/src/createLinker/LinkerCreateStep.ts +++ b/serviceconnector/src/createLinker/LinkerCreateStep.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, nonNullValue } from "@microsoft/vscode-azext-utils"; +import { AzureWizardExecuteStep, GenericTreeItem, nonNullProp, nonNullValue, randomUtils } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { TargetServiceTypeName } from "../../constants"; import { createLinkerClient } from "../linkerClient"; @@ -26,6 +26,16 @@ export class LinkerCreateStep extends AzureWizardExecuteStep public async execute(context: IPickLinkerContext): Promise { const client = await createLinkerClient(context.credentials); + const config = await client.linker.listConfigurations(nonNullValue(context.sourceResourceUri), nonNullValue(context.linkerName)); + + context.activityChildren = []; + for (const item of nonNullProp(config, 'configurations')) { + context.activityChildren.push(new GenericTreeItem(undefined, { + contextValue: `createResult-` + randomUtils.getRandomHexString(3), + label: `Deleted application setting: ${nonNullProp(item, 'name')}`, + + })); + } + await client.linker.beginDeleteAndWait(nonNullValue(context.sourceResourceUri), nonNullValue(context.linkerName)); }