Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

.interaction-input-dialog .interaction-input ::deep fluent-text-field,
.interaction-input-dialog .interaction-input ::deep fluent-select,
.interaction-input-dialog .interaction-input ::deep fluent-combobox {
.interaction-input-dialog .interaction-input ::deep fluent-combobox,
.interaction-input-dialog .interaction-input ::deep label {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated. Label width not being the same as input has bugged me

width: 75%;
/* Prevent long select/combox controls from extending outside the dialog. This can happen when there is very long placeholder text */
max-width: 500px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,13 @@ private async Task RetrieveAzureProvisioningOptions(CancellationToken cancellati
// show the value as from the configuration and disable the input
// there should be no option to change it

inputs.Add(new InteractionInput
InputLoadOptions? subscriptionLoadOptions = null;
if (string.IsNullOrEmpty(_options.SubscriptionId))
{
Name = SubscriptionIdName,
InputType = string.IsNullOrEmpty(_options.SubscriptionId) ? InputType.Choice : InputType.Text,
Label = AzureProvisioningStrings.SubscriptionIdLabel,
Required = true,
AllowCustomChoice = true,
Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder,
Disabled = !string.IsNullOrEmpty(_options.SubscriptionId),
Value = _options.SubscriptionId,
DynamicLoading = new InputLoadOptions
subscriptionLoadOptions = new InputLoadOptions
{
LoadCallback = async (context) =>
{
if (!string.IsNullOrEmpty(_options.SubscriptionId))
{
// If subscription ID is not set, we don't need to load options
return;
}

// Get tenant ID from input if tenant selection is enabled, otherwise use configured value
var tenantId = context.AllInputs[TenantName].Value ?? string.Empty;

Expand All @@ -186,8 +173,21 @@ private async Task RetrieveAzureProvisioningOptions(CancellationToken cancellati
: [];
context.Input.Disabled = false;
},
DependsOnInputs = string.IsNullOrEmpty(_options.SubscriptionId) ? [TenantName] : []
}
DependsOnInputs = [TenantName]
};
}

inputs.Add(new InteractionInput
{
Name = SubscriptionIdName,
InputType = string.IsNullOrEmpty(_options.SubscriptionId) ? InputType.Choice : InputType.Text,
Label = AzureProvisioningStrings.SubscriptionIdLabel,
Required = true,
AllowCustomChoice = true,
Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder,
Disabled = true,
Value = _options.SubscriptionId,
DynamicLoading = subscriptionLoadOptions
});

inputs.Add(new InteractionInput
Expand All @@ -197,7 +197,7 @@ private async Task RetrieveAzureProvisioningOptions(CancellationToken cancellati
Label = AzureProvisioningStrings.LocationLabel,
Placeholder = AzureProvisioningStrings.LocationPlaceholder,
Required = true,
Disabled = true,
Disabled = string.IsNullOrEmpty(_options.SubscriptionId),
DynamicLoading = new InputLoadOptions
{
LoadCallback = async (context) =>
Expand All @@ -209,7 +209,7 @@ private async Task RetrieveAzureProvisioningOptions(CancellationToken cancellati
context.Input.Options = locationOptions;
context.Input.Disabled = false;
},
DependsOnInputs = [SubscriptionIdName]
DependsOnInputs = string.IsNullOrEmpty(_options.SubscriptionId) ? [SubscriptionIdName] : []
}
});

Expand Down