Update attach database prompt - naming changes of API options (#1610)
This commit is contained in:
Родитель
55fee635e8
Коммит
1a9a30051e
|
@ -81,8 +81,12 @@ export function getExperienceQuickPicks(): IAzureQuickPickItem<Experience>[] {
|
|||
return experiencesArray.map(exp => getExperienceQuickPick(exp.api));
|
||||
}
|
||||
|
||||
export function getCosmosExperienceQuickPicks(): IAzureQuickPickItem<Experience>[] {
|
||||
return cosmosExperiencesArray.map(exp => getExperienceQuickPick(exp.api));
|
||||
export function getCosmosExperienceQuickPicks(attached?: boolean): IAzureQuickPickItem<Experience>[] {
|
||||
if (attached) {
|
||||
return cosmosExperiencesArray.map(exp => getExperienceQuickPickForAttached(exp.api));
|
||||
} else {
|
||||
return cosmosExperiencesArray.map(exp => getExperienceQuickPick(exp.api));
|
||||
}
|
||||
}
|
||||
|
||||
export function getExperienceQuickPick(api: API): IAzureQuickPickItem<Experience> {
|
||||
|
@ -90,6 +94,11 @@ export function getExperienceQuickPick(api: API): IAzureQuickPickItem<Experience
|
|||
return { label: exp.longName, description: exp.description, data: exp };
|
||||
}
|
||||
|
||||
export function getExperienceQuickPickForAttached(api: API): IAzureQuickPickItem<Experience> {
|
||||
const exp = getExperienceFromApi(api);
|
||||
return { label: exp.shortName, description: exp.description, data: exp };
|
||||
}
|
||||
|
||||
// Mongo is distinguished by having kind="MongoDB". All others have kind="GlobalDocumentDB"
|
||||
// Table and Gremlin are distinguished from SQL by their capabilities
|
||||
const CoreExperience: Experience = { api: API.Core, longName: "Core", description: "(SQL)", shortName: "SQL", kind: DBAccountKind.GlobalDocumentDB, tag: "Core (SQL)" };
|
||||
|
|
|
@ -118,7 +118,7 @@ export class AttachedAccountsTreeItem extends AzureParentTreeItem {
|
|||
}
|
||||
|
||||
public async attachNewAccount(): Promise<void> {
|
||||
const defaultExperiencePick = await vscode.window.showQuickPick(getCosmosExperienceQuickPicks(), { placeHolder: "Select a Database Account API...", ignoreFocusOut: true });
|
||||
const defaultExperiencePick = await vscode.window.showQuickPick(getCosmosExperienceQuickPicks(true), { placeHolder: "Select a Database type...", ignoreFocusOut: true });
|
||||
if (defaultExperiencePick) {
|
||||
const defaultExperience = defaultExperiencePick.data;
|
||||
let placeholder: string;
|
||||
|
|
Загрузка…
Ссылка в новой задаче