-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathSkuListStep.ts
More file actions
28 lines (24 loc) · 1.24 KB
/
SkuListStep.ts
File metadata and controls
28 lines (24 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { KnownSkuName } from "@azure/arm-containerregistry";
import { AzureWizardPromptStep, IAzureQuickPickItem } from "@microsoft/vscode-azext-utils";
import { ICreateAcrContext } from "./ICreateAcrContext";
export class SkuListStep extends AzureWizardPromptStep<ICreateAcrContext> {
public async prompt(context: ICreateAcrContext): Promise<void> {
const placeHolder: string = "Select a SKU";
const picks: IAzureQuickPickItem<KnownSkuName>[] = [
{ label: "Basic", data: KnownSkuName.Basic },
{ label: "Standard", data: KnownSkuName.Standard },
{ label: "Premium", data: KnownSkuName.Premium },
];
context.sku = (await context.ui.showQuickPick(picks, {
placeHolder,
suppressPersistence: true
})).data;
}
public shouldPrompt(context: ICreateAcrContext): boolean {
return !context.sku;
}
}