mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
emit error for kube file not found (#11524)
* error for kube file not found * code cleanup * pr feedback. * make 'kube config' localized
This commit is contained in:
@@ -30,14 +30,15 @@ export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilde
|
||||
}
|
||||
|
||||
async loadOptions(optionsInfo: OptionsInfo | (() => Promise<OptionsInfo>)): Promise<void> {
|
||||
if (typeof optionsInfo !== 'object') {
|
||||
optionsInfo = await optionsInfo();
|
||||
}
|
||||
this.component().loading = true;
|
||||
this._optionsDivContainer.clearItems();
|
||||
let options: (string[] | azdata.CategoryValue[]) = optionsInfo.values!;
|
||||
let defaultValue: string = optionsInfo.defaultValue!;
|
||||
try {
|
||||
if (typeof optionsInfo !== 'object') {
|
||||
optionsInfo = await optionsInfo();
|
||||
}
|
||||
|
||||
let options: (string[] | azdata.CategoryValue[]) = optionsInfo.values!;
|
||||
let defaultValue: string = optionsInfo.defaultValue!;
|
||||
options.forEach((op: string | azdata.CategoryValue) => {
|
||||
const option: azdata.CategoryValue = (typeof op === 'string')
|
||||
? { name: op, displayName: op }
|
||||
|
||||
Reference in New Issue
Block a user