-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathIngressVisibilityStep.ts
More file actions
22 lines (19 loc) · 1.3 KB
/
IngressVisibilityStep.ts
File metadata and controls
22 lines (19 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*---------------------------------------------------------------------------------------------
* 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 { IngressConstants } from "../../constants";
import { localize } from "../../utils/localize";
import { IContainerAppContext } from "./IContainerAppContext";
export class IngressVisibilityStep extends AzureWizardPromptStep<IContainerAppContext> {
public async prompt(context: IContainerAppContext): Promise<void> {
context.enableExternal = (await context.ui.showQuickPick([
{ label: IngressConstants.external, description: IngressConstants.externalDesc, data: true },
{ label: localize('internal', 'Internal'), description: IngressConstants.internalDesc, data: false }],
{ placeHolder: localize('ingressVisibility', 'Select the HTTP traffic that the endpoint will accept.') })).data;
}
public shouldPrompt(context: IContainerAppContext): boolean {
return context.enableIngress === true && context.enableExternal === undefined;
}
}