diff --git a/extensions/arc/package.json b/extensions/arc/package.json index 61ec5f1fec..4e8bbf0dde 100644 --- a/extensions/arc/package.json +++ b/extensions/arc/package.json @@ -189,7 +189,9 @@ "editable": false, "options": { "source": { - "providerId": "arc.controller.config.profiles" + "providerId": "arc.controller.config.profiles", + "loadingText": "%arc.data.controller.cluster.config.profile.loading%", + "loadingCompletedText": "%arc.data.controller.cluster.config.profile.loadingcompleted%" }, "defaultValue": "azure-arc-aks-default-storage", "optionsType": "radio" diff --git a/extensions/arc/package.nls.json b/extensions/arc/package.nls.json index 62ddb51095..1489af88b6 100644 --- a/extensions/arc/package.nls.json +++ b/extensions/arc/package.nls.json @@ -20,6 +20,8 @@ "arc.data.controller.kube.cluster.context": "Cluster context", "arc.data.controller.cluster.config.profile.title": "Choose the config profile", "arc.data.controller.cluster.config.profile": "Config profile", + "arc.data.controller.cluster.config.profile.loading": "Loading config profiles", + "arc.data.controller.cluster.config.profile.loadingcompleted": "Loading config profiles complete", "arc.data.controller.create.azureconfig.title": "Azure and Connectivity Configuration", "arc.data.controller.connectivitymode.description": "Select the connectivity mode for the controller.", "arc.data.controller.create.controllerconfig.title": "Controller Configuration", diff --git a/extensions/resource-deployment/src/interfaces.ts b/extensions/resource-deployment/src/interfaces.ts index 0befd281e4..c68c02bceb 100644 --- a/extensions/resource-deployment/src/interfaces.ts +++ b/extensions/resource-deployment/src/interfaces.ts @@ -244,6 +244,8 @@ export type ComponentCSSStyles = { export interface IOptionsSource { provider?: IOptionsSourceProvider + loadingText?: string, + loadingCompletedText?: string, readonly variableNames?: { [index: string]: string; }; readonly providerId: string; } diff --git a/extensions/resource-deployment/src/ui/modelViewUtils.ts b/extensions/resource-deployment/src/ui/modelViewUtils.ts index 5e548f1148..509f40c67c 100644 --- a/extensions/resource-deployment/src/ui/modelViewUtils.ts +++ b/extensions/resource-deployment/src/ui/modelViewUtils.ts @@ -986,6 +986,7 @@ async function createRadioOptions(context: FieldContext, getRadioButtonInfo?: (( } const label = createLabel(context.view, { text: context.fieldInfo.label, description: context.fieldInfo.description, required: context.fieldInfo.required, width: context.fieldInfo.labelWidth, cssStyles: context.fieldInfo.labelCSSStyles }); const radioGroupLoadingComponentBuilder = new RadioGroupLoadingComponentBuilder(context.view, context.onNewDisposableCreated, context.fieldInfo); + context.fieldInfo.labelPosition = LabelPosition.Left; context.onNewInputComponentCreated(context.fieldInfo.variableName || context.fieldInfo.label, { component: radioGroupLoadingComponentBuilder, @@ -995,8 +996,17 @@ async function createRadioOptions(context: FieldContext, getRadioButtonInfo?: (( getDisplayValue: async (): Promise => radioGroupLoadingComponentBuilder.displayValue, onValueChanged: radioGroupLoadingComponentBuilder.onValueChanged, }); - addLabelInputPairToContainer(context.view, context.components, label, radioGroupLoadingComponentBuilder.component(), context.fieldInfo); const options = context.fieldInfo.options as OptionsInfo; + let loadingText = options?.source?.loadingText; + let loadingCompletedText = options?.source?.loadingCompletedText; + if (loadingText || loadingCompletedText) { + radioGroupLoadingComponentBuilder.withProps({ + showText: true, + loadingText: loadingText, + loadingCompletedText: loadingCompletedText + }); + } + addLabelInputPairToContainer(context.view, context.components, label, radioGroupLoadingComponentBuilder.component(), context.fieldInfo); // Start loading the options but continue on so that we can continue setting up the rest of the components - the group // will show a loading spinner while the options are loaded radioGroupLoadingComponentBuilder.loadOptions( diff --git a/src/sql/workbench/api/common/extHostModelView.ts b/src/sql/workbench/api/common/extHostModelView.ts index 9d286727c4..c417ec2b35 100644 --- a/src/sql/workbench/api/common/extHostModelView.ts +++ b/src/sql/workbench/api/common/extHostModelView.ts @@ -1660,8 +1660,9 @@ class ButtonWrapper extends ComponentWithIconWrapper implements azdata.ButtonCom class LoadingComponentWrapper extends ComponentWrapper implements azdata.LoadingComponent { constructor(proxy: MainThreadModelViewShape, handle: number, id: string) { super(proxy, handle, ModelComponentTypes.LoadingComponent, id); - this.properties = {}; - this.loading = true; + this.properties = { + loading: true + }; } public get loading(): boolean {