mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
Disable connectivity mode selection (#11911)
* Disable connectivity mode selection until Direct mode is fully completed * add azdata change
This commit is contained in:
@@ -306,6 +306,7 @@
|
||||
"defaultValue": "Indirect",
|
||||
"optionsType": "radio"
|
||||
},
|
||||
"enabled": false,
|
||||
"required": true,
|
||||
"variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE"
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ async function createRadioOptions(context: FieldContext, getRadioButtonInfo?: ((
|
||||
context.fieldInfo.fieldAlignItems = 'flex-start'; // by default align the items to the top.
|
||||
}
|
||||
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);
|
||||
const radioGroupLoadingComponentBuilder = new RadioGroupLoadingComponentBuilder(context.view, context.onNewDisposableCreated, context.fieldInfo);
|
||||
context.fieldInfo.labelPosition = LabelPosition.Left;
|
||||
context.onNewInputComponentCreated(context.fieldInfo.variableName!, { component: radioGroupLoadingComponentBuilder });
|
||||
addLabelInputPairToContainer(context.view, context.components, label, radioGroupLoadingComponentBuilder.component(), context.fieldInfo);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { OptionsInfo } from '../interfaces';
|
||||
import { OptionsInfo, FieldInfo } from '../interfaces';
|
||||
import { getErrorMessage } from '../utils';
|
||||
|
||||
export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilder<azdata.LoadingComponent> {
|
||||
@@ -12,7 +12,7 @@ export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilde
|
||||
private _optionsLoadingBuilder: azdata.LoadingComponentBuilder;
|
||||
private _onValueChangedEmitter: vscode.EventEmitter<void> = new vscode.EventEmitter();
|
||||
private _currentRadioOption!: azdata.RadioButtonComponent;
|
||||
constructor(private _view: azdata.ModelView, private _onNewDisposableCreated: (disposable: vscode.Disposable) => void) {
|
||||
constructor(private _view: azdata.ModelView, private _onNewDisposableCreated: (disposable: vscode.Disposable) => void, private _fieldInfo: FieldInfo) {
|
||||
this._optionsDivContainer = this._view!.modelBuilder.divContainer().withProperties<azdata.DivContainerProperties>({ clickable: false }).component();
|
||||
this._optionsLoadingBuilder = this._view!.modelBuilder.loadingComponent().withItem(this._optionsDivContainer);
|
||||
}
|
||||
@@ -47,6 +47,7 @@ export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilde
|
||||
label: option.displayName,
|
||||
checked: option.displayName === defaultValue,
|
||||
name: option.name,
|
||||
enabled: this._fieldInfo.enabled
|
||||
}).component();
|
||||
if (radioOption.checked) {
|
||||
this._currentRadioOption = radioOption;
|
||||
|
||||
2
src/sql/azdata.d.ts
vendored
2
src/sql/azdata.d.ts
vendored
@@ -3255,7 +3255,7 @@ declare module 'azdata' {
|
||||
editableCategory = 'editableCategory'
|
||||
}
|
||||
|
||||
export interface RadioButtonProperties {
|
||||
export interface RadioButtonProperties extends ComponentProperties {
|
||||
name?: string;
|
||||
label?: string;
|
||||
value?: string;
|
||||
|
||||
Reference in New Issue
Block a user