mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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",
|
"defaultValue": "Indirect",
|
||||||
"optionsType": "radio"
|
"optionsType": "radio"
|
||||||
},
|
},
|
||||||
|
"enabled": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE"
|
"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.
|
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 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.fieldInfo.labelPosition = LabelPosition.Left;
|
||||||
context.onNewInputComponentCreated(context.fieldInfo.variableName!, { component: radioGroupLoadingComponentBuilder });
|
context.onNewInputComponentCreated(context.fieldInfo.variableName!, { component: radioGroupLoadingComponentBuilder });
|
||||||
addLabelInputPairToContainer(context.view, context.components, label, radioGroupLoadingComponentBuilder.component(), context.fieldInfo);
|
addLabelInputPairToContainer(context.view, context.components, label, radioGroupLoadingComponentBuilder.component(), context.fieldInfo);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { OptionsInfo } from '../interfaces';
|
import { OptionsInfo, FieldInfo } from '../interfaces';
|
||||||
import { getErrorMessage } from '../utils';
|
import { getErrorMessage } from '../utils';
|
||||||
|
|
||||||
export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilder<azdata.LoadingComponent> {
|
export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilder<azdata.LoadingComponent> {
|
||||||
@@ -12,7 +12,7 @@ export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilde
|
|||||||
private _optionsLoadingBuilder: azdata.LoadingComponentBuilder;
|
private _optionsLoadingBuilder: azdata.LoadingComponentBuilder;
|
||||||
private _onValueChangedEmitter: vscode.EventEmitter<void> = new vscode.EventEmitter();
|
private _onValueChangedEmitter: vscode.EventEmitter<void> = new vscode.EventEmitter();
|
||||||
private _currentRadioOption!: azdata.RadioButtonComponent;
|
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._optionsDivContainer = this._view!.modelBuilder.divContainer().withProperties<azdata.DivContainerProperties>({ clickable: false }).component();
|
||||||
this._optionsLoadingBuilder = this._view!.modelBuilder.loadingComponent().withItem(this._optionsDivContainer);
|
this._optionsLoadingBuilder = this._view!.modelBuilder.loadingComponent().withItem(this._optionsDivContainer);
|
||||||
}
|
}
|
||||||
@@ -47,6 +47,7 @@ export class RadioGroupLoadingComponentBuilder implements azdata.ComponentBuilde
|
|||||||
label: option.displayName,
|
label: option.displayName,
|
||||||
checked: option.displayName === defaultValue,
|
checked: option.displayName === defaultValue,
|
||||||
name: option.name,
|
name: option.name,
|
||||||
|
enabled: this._fieldInfo.enabled
|
||||||
}).component();
|
}).component();
|
||||||
if (radioOption.checked) {
|
if (radioOption.checked) {
|
||||||
this._currentRadioOption = radioOption;
|
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'
|
editableCategory = 'editableCategory'
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RadioButtonProperties {
|
export interface RadioButtonProperties extends ComponentProperties {
|
||||||
name?: string;
|
name?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user