|
5 | 5 |
|
6 | 6 | import { type ResourceManagementClient } from '@azure/arm-resources'; |
7 | 7 | import { type AzExtClientContext, createAzureClient, type ILocationWizardContext, type IResourceGroupWizardContext, LocationListStep, parseClientContext, ResourceGroupCreateStep, ResourceGroupListStep, VerifyProvidersStep } from "@microsoft/vscode-azext-azureutils"; |
8 | | -import { AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, createSubscriptionContext, type ExecuteActivityContext, type IActionContext, type IAzureQuickPickItem, type ISubscriptionActionContext, subscriptionExperience } from "@microsoft/vscode-azext-utils"; |
| 8 | +import { AzureWizard, AzureWizardExecuteStepWithActivityOutput, AzureWizardPromptStep, createSubscriptionContext, type ExecuteActivityContext, type IActionContext, type IAzureQuickPickItem, type ISubscriptionActionContext, subscriptionExperience } from "@microsoft/vscode-azext-utils"; |
9 | 9 | import { type AzureSubscription } from "@microsoft/vscode-azureresources-api"; |
10 | 10 | import { type Progress } from "vscode"; |
11 | 11 | import { DurableTaskProvider, DurableTaskSchedulersResourceType } from "../../constants"; |
@@ -59,16 +59,22 @@ class SchedulerSkuStep extends AzureWizardPromptStep<ICreateSchedulerContext> { |
59 | 59 | } |
60 | 60 | } |
61 | 61 |
|
62 | | -class SchedulerCreationStep extends AzureWizardExecuteStep<ICreateSchedulerContext> { |
| 62 | +class SchedulerCreationStep extends AzureWizardExecuteStepWithActivityOutput<ICreateSchedulerContext> { |
63 | 63 | priority: number = 110; |
| 64 | + readonly stepName: string = 'schedulerCreationStep'; |
| 65 | + |
| 66 | + protected getTreeItemLabel = (context: ICreateSchedulerContext) => localize('createSchedulerLabel', 'Create Durable Task Scheduler "{0}"', context.schedulerName); |
| 67 | + protected getOutputLogSuccess = (context: ICreateSchedulerContext) => localize('createSchedulerSuccess', 'Successfully created Durable Task Scheduler "{0}".', context.schedulerName); |
| 68 | + protected getOutputLogFail = (context: ICreateSchedulerContext) => localize('createSchedulerFail', 'Failed to create Durable Task Scheduler "{0}".', context.schedulerName); |
64 | 69 |
|
65 | 70 | constructor(private readonly schedulerClient: DurableTaskSchedulerClient) { |
66 | 71 | super(); |
67 | 72 | } |
68 | 73 |
|
69 | | - async execute(wizardContext: ICreateSchedulerContext, _: Progress<{ message?: string; increment?: number; }>): Promise<void> { |
70 | | - const location = await LocationListStep.getLocation(wizardContext); |
| 74 | + async execute(wizardContext: ICreateSchedulerContext, progress: Progress<{ message?: string; increment?: number; }>): Promise<void> { |
| 75 | + progress.report({ message: localize('creatingScheduler', 'Creating Durable Task Scheduler...') }); |
71 | 76 |
|
| 77 | + const location = await LocationListStep.getLocation(wizardContext); |
72 | 78 | const response = await this.schedulerClient.createScheduler( |
73 | 79 | wizardContext.subscription as AzureSubscription, |
74 | 80 | wizardContext.resourceGroup?.name as string, |
@@ -117,7 +123,7 @@ export function createSchedulerCommandFactory(dataBranchProvider: DurableTaskSch |
117 | 123 |
|
118 | 124 | ...actionContext, |
119 | 125 | ...createSubscriptionContext(subscription), |
120 | | - ...await createActivityContext() |
| 126 | + ...await createActivityContext({ withChildren: true }), |
121 | 127 | }; |
122 | 128 |
|
123 | 129 | if (!await isDtsProviderRegistered(wizardContext)) { |
|
0 commit comments