mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -05:00
Default to current controller when deploying from Arc dashboard (#14409)
This commit is contained in:
@@ -692,9 +692,14 @@ async function configureOptionsSourceSubfields(context: FieldContext, optionsSou
|
||||
function processDropdownOptionsTypeField(context: FieldContext): azdata.DropDownComponent {
|
||||
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 options = context.fieldInfo.options as OptionsInfo;
|
||||
// If we have an initial value then set it now - otherwise just default to the original default value.
|
||||
// Note we don't currently check that the value actually exists in the list - if it doesn't then it'll
|
||||
// just default to the first one anyways
|
||||
const initialValue = context.fieldInfo.variableName && context.initialVariableValues?.[context.fieldInfo.variableName]?.toString();
|
||||
const defaultValue = initialValue || options.defaultValue;
|
||||
const dropdown = createDropdownInputInfo(context.view, {
|
||||
values: options.values,
|
||||
defaultValue: options.defaultValue,
|
||||
defaultValue: defaultValue,
|
||||
width: context.fieldInfo.inputWidth,
|
||||
editable: context.fieldInfo.editable,
|
||||
required: context.fieldInfo.required,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { ResourceType } from '../interfaces';
|
||||
import { InitialVariableValues, ResourceType } from '../interfaces';
|
||||
import { IResourceTypeService, OptionValuesFilter } from '../services/resourceTypeService';
|
||||
import * as loc from './../localizedConstants';
|
||||
import { DialogBase } from './dialogBase';
|
||||
@@ -28,7 +28,8 @@ export class ResourceTypePickerDialog extends DialogBase {
|
||||
private resourceTypeService: IResourceTypeService,
|
||||
defaultResourceType: ResourceType,
|
||||
private _resourceTypeNameFilters?: string[],
|
||||
private _optionValuesFilter?: OptionValuesFilter) {
|
||||
private _optionValuesFilter?: OptionValuesFilter,
|
||||
private _initialVariableValues?: InitialVariableValues) {
|
||||
super(loc.resourceTypePickerDialogTitle, 'ResourceTypePickerDialog', true);
|
||||
this._selectedResourceType = defaultResourceType;
|
||||
this._dialogObject.okButton.label = loc.select;
|
||||
@@ -189,7 +190,7 @@ export class ResourceTypePickerDialog extends DialogBase {
|
||||
}
|
||||
|
||||
protected async onComplete(): Promise<void> {
|
||||
this.resourceTypeService.startDeployment(this._selectedResourceType, this._optionValuesFilter);
|
||||
this.resourceTypeService.startDeployment(this._selectedResourceType, this._optionValuesFilter, this._initialVariableValues);
|
||||
}
|
||||
|
||||
private getAllResourceTags(): string[] {
|
||||
|
||||
Reference in New Issue
Block a user