-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathSkuListStep.ts
More file actions
29 lines (25 loc) · 1.36 KB
/
SkuListStep.ts
File metadata and controls
29 lines (25 loc) · 1.36 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
29
/*---------------------------------------------------------------------------------------------
* 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 { localize } from "../../../../../../utils/localize";
import { CreateAcrContext } from "./CreateAcrContext";
export class SkuListStep extends AzureWizardPromptStep<CreateAcrContext> {
public async prompt(context: CreateAcrContext): Promise<void> {
const placeHolder: string = localize("sku", "Select a SKU");
const picks: IAzureQuickPickItem<KnownSkuName>[] = [
{ label: KnownSkuName.Basic, data: KnownSkuName.Basic },
{ label: KnownSkuName.Standard, data: KnownSkuName.Standard },
{ label: KnownSkuName.Premium, data: KnownSkuName.Premium },
];
context.newRegistrySku = (await context.ui.showQuickPick(picks, {
placeHolder,
suppressPersistence: true
})).data;
}
public shouldPrompt(context: CreateAcrContext): boolean {
return !context.newRegistrySku;
}
}