@@ -7,7 +7,7 @@ import { type Site, type WebSiteManagementClient } from "@azure/arm-appservice";
7
7
import { type ServiceClient } from "@azure/core-client" ;
8
8
import { createHttpHeaders , createPipelineRequest } from "@azure/core-rest-pipeline" ;
9
9
import { LocationListStep , createGenericClient } from "@microsoft/vscode-azext-azureutils" ;
10
- import { AzureWizardExecuteStep , nonNullProp } from "@microsoft/vscode-azext-utils" ;
10
+ import { AzureWizardExecuteStepWithActivityOutput , nonNullProp } from "@microsoft/vscode-azext-utils" ;
11
11
import { type AppResource } from "@microsoft/vscode-azext-utils/hostapi" ;
12
12
import { type Progress } from "vscode" ;
13
13
import { webProvider } from "../../../constants" ;
@@ -16,15 +16,33 @@ import { createWebSiteClient } from "../../../utils/azureClients";
16
16
import { getStorageConnectionString } from "../../appSettings/connectionSettings/getLocalConnectionSetting" ;
17
17
import { type IFunctionAppWizardContext } from "../IFunctionAppWizardContext" ;
18
18
19
- export class ContainerizedFunctionAppCreateStep extends AzureWizardExecuteStep < IFunctionAppWizardContext > {
19
+ export class ContainerizedFunctionAppCreateStep extends AzureWizardExecuteStepWithActivityOutput < IFunctionAppWizardContext > {
20
+ public stepName : string = 'containerizedFunctionAppCreateStep' ;
20
21
public priority : number = 140 ;
21
22
23
+ protected getTreeItemLabel ( context : IFunctionAppWizardContext ) : string {
24
+ const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
25
+ return localize ( 'creatingNewApp' , 'Create containerized function app "{0}"' , siteName ) ;
26
+ }
27
+ protected getOutputLogSuccess ( context : IFunctionAppWizardContext ) : string {
28
+ const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
29
+ return localize ( 'createdNewApp' , 'Successfully created containerized function app "{0}".' , siteName ) ;
30
+ }
31
+ protected getOutputLogFail ( context : IFunctionAppWizardContext ) : string {
32
+ const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
33
+ return localize ( 'failedToCreateNewApp' , 'Failed to create containerized function app "{0}".' , siteName ) ;
34
+ }
35
+ protected getOutputLogProgress ( context : IFunctionAppWizardContext ) : string {
36
+ const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
37
+ return localize ( 'creatingNewApp' , 'Creating containerized function app "{0}"...' , siteName ) ;
38
+ }
39
+
22
40
public async execute ( context : IFunctionAppWizardContext , progress : Progress < { message ?: string ; increment ?: number } > ) : Promise < void > {
23
41
if ( ! context . deployWorkspaceResult ?. registryLoginServer || ! context . deployWorkspaceResult ?. imageName ) {
24
- throw new Error ( localize ( 'failToCreateApp' , 'Failed to create function app. There was an error creating the necessary container resources.' ) ) ;
42
+ throw new Error ( localize ( 'failToCreateApp' , 'Failed to create containerized function app. There was an error creating the necessary container resources.' ) ) ;
25
43
}
26
44
27
- const message : string = localize ( 'creatingNewApp' , 'Creating function app "{0}"...' , context . newSiteName ) ;
45
+ const message : string = localize ( 'creatingNewApp' , 'Creating containerized function app "{0}"...' , context . newSiteName ) ;
28
46
progress . report ( { message } ) ;
29
47
30
48
const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
@@ -77,23 +95,6 @@ export class ContainerizedFunctionAppCreateStep extends AzureWizardExecuteStep<I
77
95
}
78
96
}
79
97
}
80
-
81
- protected getTreeItemLabel ( context : IFunctionAppWizardContext ) : string {
82
- const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
83
- return localize ( 'creatingNewApp' , 'Create function app "{0}"' , siteName ) ;
84
- }
85
- protected getOutputLogSuccess ( context : IFunctionAppWizardContext ) : string {
86
- const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
87
- return localize ( 'createdNewApp' , 'Successfully created function app "{0}".' , siteName ) ;
88
- }
89
- protected getOutputLogFail ( context : IFunctionAppWizardContext ) : string {
90
- const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
91
- return localize ( 'failedToCreateNewApp' , 'Failed to create function app "{0}".' , siteName ) ;
92
- }
93
- protected getOutputLogProgress ( context : IFunctionAppWizardContext ) : string {
94
- const siteName : string = nonNullProp ( context , 'newSiteName' ) ;
95
- return localize ( 'creatingNewApp' , 'Creating function app "{0}"...' , siteName ) ;
96
- }
97
98
}
98
99
99
100
async function pingContainerizedFunctionApp ( context : IFunctionAppWizardContext , client : WebSiteManagementClient , site : Site ) : Promise < void > {
0 commit comments