diff --git a/src/commands/createFunctionApp/stacks/getStackPicks.ts b/src/commands/createFunctionApp/stacks/getStackPicks.ts index cf1c7cd33..aaf18d761 100644 --- a/src/commands/createFunctionApp/stacks/getStackPicks.ts +++ b/src/commands/createFunctionApp/stacks/getStackPicks.ts @@ -9,6 +9,7 @@ import { AzExtPipelineResponse, createGenericClient } from '@microsoft/vscode-az import { IAzureQuickPickItem, openUrl, parseError } from '@microsoft/vscode-azext-utils'; import { FuncVersion, funcVersionLink } from '../../../FuncVersion'; import { hiddenStacksSetting, noRuntimeStacksAvailableLabel } from '../../../constants'; +import { previewDescription } from '../../../constants-nls'; import { localize } from '../../../localize'; import { requestUtils } from '../../../utils/requestUtils'; import { getWorkspaceSetting } from '../../../vsCodeConfig/settings'; @@ -37,7 +38,7 @@ export async function getStackPicks(context: IFunctionAppWizardContext): Promise const previewOs = getFlagOs(minorVersion.stackSettings, 'isPreview'); switch (previewOs) { case 'All': - description = localize('preview', '(Preview)'); + description = previewDescription; break; case 'Linux': case 'Windows': diff --git a/src/commands/createNewProject/ProgrammingModelStep.ts b/src/commands/createNewProject/ProgrammingModelStep.ts index 31c38c50e..cac1af415 100644 --- a/src/commands/createNewProject/ProgrammingModelStep.ts +++ b/src/commands/createNewProject/ProgrammingModelStep.ts @@ -7,25 +7,20 @@ import { AzureWizardPromptStep, IAzureQuickPickItem, IAzureQuickPickOptions, non import { localize } from '../../localize'; import { IProjectWizardContext } from './IProjectWizardContext'; -type ProgrammingModel = { modelVersion: number | undefined, label: string }; export class ProgrammingModelStep extends AzureWizardPromptStep { public hideStepCount: boolean = true; - private _models: ProgrammingModel[] = []; + private _models: IAzureQuickPickItem[] = []; private _learnMoreLink: string | undefined; - public constructor(options: { models: ProgrammingModel | ProgrammingModel[], learnMoreLink?: string }) { + public constructor(options: { models: IAzureQuickPickItem[], learnMoreLink?: string }) { super(); this._models = Array.isArray(options.models) ? options.models : [options.models]; this._learnMoreLink = options.learnMoreLink; } public async prompt(context: IProjectWizardContext): Promise { - const modelsPick: IAzureQuickPickItem[] = this._models.map(model => { - return { - label: model.label, - data: model.modelVersion - } - }); + // duplicate the array so we don't modify the original + const modelsPick: IAzureQuickPickItem[] = this._models.slice(); const learnMoreQp = { label: localize('learnMore', '$(link-external) Learn more about Model V4...'), description: '', data: undefined }; if (this._learnMoreLink) { @@ -53,7 +48,7 @@ export class ProgrammingModelStep extends AzureWizardPromptStep = { data: nodeV4ModelVersion, label: localize('modelV4', 'Model V4'), description: defaultDescription }; +export const nodeV3Model: IAzureQuickPickItem = { data: undefined, label: localize('modelV3', 'Model V3') } -export const nodeModels = [nodeDefaultModel, nodeV4Model]; +export const nodeModels = [nodeDefaultModel, nodeV3Model]; export const nodeLearnMoreLink = 'https://aka.ms/AzFuncNodeV4'; export const webProvider: string = 'Microsoft.Web';