mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix blank MIAA/PG deployment wizard pages (#14714)
This commit is contained in:
@@ -640,14 +640,31 @@ async function processOptionsTypeField(context: FieldContext): Promise<void> {
|
|||||||
// If the options are provided for us then set up the callback to load those options async'ly
|
// If the options are provided for us then set up the callback to load those options async'ly
|
||||||
if (optionsSource?.provider) {
|
if (optionsSource?.provider) {
|
||||||
getRadioOptions = async () => {
|
getRadioOptions = async () => {
|
||||||
|
try {
|
||||||
return { defaultValue: options.defaultValue, values: await optionsSource.provider!.getOptions() };
|
return { defaultValue: options.defaultValue, values: await optionsSource.provider!.getOptions() };
|
||||||
|
} catch (err) {
|
||||||
|
context.container.message = {
|
||||||
|
text: getErrorMessage(err),
|
||||||
|
description: '',
|
||||||
|
level: azdata.window.MessageLevel.Error
|
||||||
|
};
|
||||||
|
return { defaultValue: '', values: [] };
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
optionsComponent = await processRadioOptionsTypeField(context, getRadioOptions);
|
optionsComponent = await processRadioOptionsTypeField(context, getRadioOptions);
|
||||||
} else {
|
} else {
|
||||||
throwUnless(context.fieldInfo.options.optionsType === OptionsType.Dropdown, loc.optionsTypeRadioOrDropdown);
|
throwUnless(context.fieldInfo.options.optionsType === OptionsType.Dropdown, loc.optionsTypeRadioOrDropdown);
|
||||||
if (optionsSource?.provider) {
|
if (optionsSource?.provider) {
|
||||||
|
try {
|
||||||
context.fieldInfo.options.values = await optionsSource.provider.getOptions();
|
context.fieldInfo.options.values = await optionsSource.provider.getOptions();
|
||||||
|
} catch (err) {
|
||||||
|
context.container.message = {
|
||||||
|
text: getErrorMessage(err),
|
||||||
|
description: '',
|
||||||
|
level: azdata.window.MessageLevel.Error
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
optionsComponent = processDropdownOptionsTypeField(context);
|
optionsComponent = processDropdownOptionsTypeField(context);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user