-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow selecting mongo version when creating database server (#2223)
* Allow selecting mongo version * Remove noisy pick options * Localize wizard string
- Loading branch information
1 parent
9497ddb
commit 3944a7c
Showing
4 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils'; | ||
import { localize } from "../../utils/localize"; | ||
import { ICosmosDBWizardContext } from './ICosmosDBWizardContext'; | ||
|
||
export class MongoVersionStep extends AzureWizardPromptStep<ICosmosDBWizardContext> { | ||
|
||
public async prompt(context: ICosmosDBWizardContext): Promise<void> { | ||
const mongoVersionOption = await context.ui.showQuickPick([ | ||
{ label: "v4.0", detail: "4.0" }, | ||
{ label: "v3.6", detail: "3.6" }, | ||
{ label: "v3.2", detail: "3.2" }, | ||
], { | ||
placeHolder: localize("selectMongoVersion", "Select MongoDB version") | ||
}); | ||
context.mongoVersion = mongoVersionOption.detail; | ||
} | ||
|
||
public shouldPrompt(_context: ICosmosDBWizardContext): boolean { | ||
return true; | ||
} | ||
} |