Search in sources :

Example 1 with SubscriptionComboBox

use of com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox in project azure-tools-for-java by Microsoft.

the class ApplicationInsightsNewDialog method createUIComponents.

private void createUIComponents() {
    this.comboSub = new SubscriptionComboBox();
    this.comboReg = new RegionComboBox();
}
Also used : SubscriptionComboBox(com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox) RegionComboBox(com.microsoft.azure.toolkit.intellij.common.component.RegionComboBox)

Example 2 with SubscriptionComboBox

use of com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox in project azure-tools-for-java by Microsoft.

the class CreateRedisCacheForm method createUIComponents.

private void createUIComponents() {
    this.cbSubs = new SubscriptionComboBox();
    this.cbLocations = new RegionComboBox();
}
Also used : SubscriptionComboBox(com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox) RegionComboBox(com.microsoft.azure.toolkit.intellij.common.component.RegionComboBox)

Example 3 with SubscriptionComboBox

use of com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox in project azure-tools-for-java by Microsoft.

the class RedisCreationDialog method createUIComponents.

private void createUIComponents() {
    this.subscriptionComboBox = new SubscriptionComboBox();
    this.resourceGroupComboBox = new ResourceGroupComboBox();
    this.regionComboBox = new RegionComboBox() {

        protected List<? extends Region> loadItems() {
            if (Objects.nonNull(this.subscription)) {
                return Azure.az(AzureRedis.class).listSupportedRegions(subscription.getId());
            }
            return Collections.emptyList();
        }
    };
    this.redisNameTextField = new ValidationDebouncedTextInput();
    this.pricingComboBox = new AzureComboBoxSimple<>(PricingTier::values);
}
Also used : ResourceGroupComboBox(com.microsoft.azure.toolkit.intellij.common.component.resourcegroup.ResourceGroupComboBox) SubscriptionComboBox(com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox) Region(com.microsoft.azure.toolkit.lib.common.model.Region) List(java.util.List) RegionComboBox(com.microsoft.azure.toolkit.intellij.common.component.RegionComboBox) ValidationDebouncedTextInput(com.microsoft.azure.toolkit.intellij.common.ValidationDebouncedTextInput)

Example 4 with SubscriptionComboBox

use of com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox in project azure-tools-for-java by Microsoft.

the class CreateDeploymentForm method createUIComponents.

private void createUIComponents() {
    this.subscriptionCb = new SubscriptionComboBox();
    this.regionCb = new RegionComboBox();
}
Also used : SubscriptionComboBox(com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox) RegionComboBox(com.microsoft.azure.toolkit.intellij.common.component.RegionComboBox)

Example 5 with SubscriptionComboBox

use of com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox in project azure-tools-for-java by Microsoft.

the class AbstractSpringCloudAppInfoPanel method init.

protected void init() {
    final SubscriptionComboBox selectorSubscription = this.getSelectorSubscription();
    final SpringCloudClusterComboBox selectorCluster = this.getSelectorCluster();
    final ValidationDebouncedTextInput textName = this.getTextName();
    selectorSubscription.setRequired(true);
    selectorSubscription.addItemListener(this::onSubscriptionChanged);
    selectorCluster.setRequired(true);
    selectorCluster.addItemListener(this::onClusterChanged);
    textName.setRequired(true);
    textName.setValue(this.defaultAppName);
    textName.setValidator(() -> {
        try {
            validateSpringCloudAppName(textName.getValue(), this.cluster);
        } catch (final IllegalArgumentException e) {
            final AzureValidationInfoBuilder builder = AzureValidationInfo.builder();
            return builder.input(textName).type(AzureValidationInfo.Type.ERROR).message(e.getMessage()).build();
        }
        return AzureValidationInfo.OK;
    });
    if (Objects.nonNull(this.cluster)) {
        selectorSubscription.setValue(new ItemReference<>(this.cluster.subscriptionId(), Subscription::getId));
        selectorCluster.setValue(new ItemReference<>(this.cluster.name(), IAzureResource::name));
    }
}
Also used : SubscriptionComboBox(com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox) SpringCloudClusterComboBox(com.microsoft.azure.toolkit.intellij.springcloud.component.SpringCloudClusterComboBox) AzureValidationInfoBuilder(com.microsoft.azure.toolkit.lib.common.form.AzureValidationInfo.AzureValidationInfoBuilder) ValidationDebouncedTextInput(com.microsoft.azure.toolkit.intellij.common.ValidationDebouncedTextInput)

Aggregations

SubscriptionComboBox (com.microsoft.azure.toolkit.intellij.common.component.SubscriptionComboBox)6 RegionComboBox (com.microsoft.azure.toolkit.intellij.common.component.RegionComboBox)4 ValidationDebouncedTextInput (com.microsoft.azure.toolkit.intellij.common.ValidationDebouncedTextInput)3 AzurePasswordFieldInput (com.microsoft.azure.toolkit.intellij.common.component.AzurePasswordFieldInput)1 ResourceGroupComboBox (com.microsoft.azure.toolkit.intellij.common.component.resourcegroup.ResourceGroupComboBox)1 SpringCloudClusterComboBox (com.microsoft.azure.toolkit.intellij.springcloud.component.SpringCloudClusterComboBox)1 AzureStorageAccountComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.AzureStorageAccountComboBox)1 NetworkAvailabilityOptionsComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.NetworkAvailabilityOptionsComboBox)1 SecurityGroupComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.SecurityGroupComboBox)1 SubnetComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.SubnetComboBox)1 VirtualMachineImageComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.VirtualMachineImageComboBox)1 VirtualMachineSizeComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.VirtualMachineSizeComboBox)1 VirtualNetworkComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.VirtualNetworkComboBox)1 PublicIPAddressComboBox (com.microsoft.azure.toolkit.intellij.vm.creation.component.ip.PublicIPAddressComboBox)1 AzureValidationInfoBuilder (com.microsoft.azure.toolkit.lib.common.form.AzureValidationInfo.AzureValidationInfoBuilder)1 Region (com.microsoft.azure.toolkit.lib.common.model.Region)1 List (java.util.List)1