mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
deploy BDC wizard improvement for CU1 (#7756)
* unified admin user account (#7485) * azdata changes * spaces * error message * comments * support AD authentication for bdc deployment (#7518) * enable ad authentication * remove export for internal interface * add comments * more changes after testing * update notebooks * escape slash * more comments * Update deploy-bdc-aks.ipynb * Update deploy-bdc-existing-aks.ipynb * Update deploy-bdc-existing-kubeadm.ipynb * AD changes and review feedback (#7618) * enable ad authentication * remove export for internal interface * add comments * more changes after testing * update notebooks * escape slash * more comments * Update deploy-bdc-aks.ipynb * Update deploy-bdc-existing-aks.ipynb * Update deploy-bdc-existing-kubeadm.ipynb * address comments from scenario review (#7546) * support AD authentication for bdc deployment (#7518) * enable ad authentication * remove export for internal interface * add comments * more changes after testing * update notebooks * escape slash * more comments * Update deploy-bdc-aks.ipynb * Update deploy-bdc-existing-aks.ipynb * Update deploy-bdc-existing-kubeadm.ipynb * scenario review feedbacks * more fixes * adjust the display order of resource types * different way to implement left side buttons * revert unwanted changes * rename variable * more fixes for the scenario review feedback (#7589) * fix more issues * add help links * model view readonly text with links * fix size string * address comments * update notebooks * text update * address the feedback of 2nd round of deploy BDC wizard review (#7646) * 2nd review meeting comments * fix the unit test failure * recent changes in azdata * notebook background execution with azdata (#7741) * notebook background execution with azdata * prompt to open notebook in case of failure * fix path quote issue * better temp file handling * expose docker settings (#7751) * add docker settings * new icon for container image
This commit is contained in:
@@ -126,6 +126,7 @@ export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape
|
||||
let button = this._buttons.get(handle);
|
||||
if (!button) {
|
||||
button = new DialogButton(details.label, details.enabled);
|
||||
button.position = details.position;
|
||||
button.hidden = details.hidden;
|
||||
button.onClick(() => this.onButtonClick(handle));
|
||||
this._buttons.set(handle, button);
|
||||
@@ -134,6 +135,7 @@ export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape
|
||||
button.enabled = details.enabled;
|
||||
button.hidden = details.hidden;
|
||||
button.focused = details.focused;
|
||||
button.position = details.position;
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
|
||||
@@ -74,7 +74,7 @@ class ModelBuilderImpl implements azdata.ModelBuilder {
|
||||
|
||||
groupContainer(): azdata.GroupBuilder {
|
||||
let id = this.getNextComponentId();
|
||||
let container: GenericContainerBuilder<azdata.GroupContainer, any, any> = new GenericContainerBuilder<azdata.GroupContainer, azdata.GroupLayout, azdata.GroupItemLayout>(this._proxy, this._handle, ModelComponentTypes.Group, id);
|
||||
let container = new GroupContainerBuilder(this._proxy, this._handle, ModelComponentTypes.Group, id);
|
||||
this._componentBuilders.set(id, container);
|
||||
return container;
|
||||
}
|
||||
@@ -422,6 +422,12 @@ class FormContainerBuilder extends GenericContainerBuilder<azdata.FormContainer,
|
||||
}
|
||||
}
|
||||
|
||||
class GroupContainerBuilder extends ContainerBuilderImpl<azdata.GroupContainer, azdata.GroupLayout, azdata.GroupItemLayout> {
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, type: ModelComponentTypes, id: string) {
|
||||
super(new GroupContainerComponentWrapper(proxy, handle, type, id));
|
||||
}
|
||||
}
|
||||
|
||||
class ToolbarContainerBuilder extends GenericContainerBuilder<azdata.ToolbarContainer, azdata.ToolbarLayout, any> implements azdata.ToolbarBuilder {
|
||||
withToolbarItems(components: azdata.ToolbarComponent[]): azdata.ContainerBuilder<azdata.ToolbarContainer, any, any> {
|
||||
this._component.itemConfigs = components.map(item => {
|
||||
@@ -1291,7 +1297,7 @@ class DropDownWrapper extends ComponentWrapper implements azdata.DropDownCompone
|
||||
|
||||
public get value(): string | azdata.CategoryValue {
|
||||
let val = this.properties['value'];
|
||||
if (!val && this.values && this.values.length > 0) {
|
||||
if (!this.editable && !val && this.values && this.values.length > 0) {
|
||||
val = this.values[0];
|
||||
}
|
||||
return val;
|
||||
@@ -1545,6 +1551,19 @@ class HyperlinkComponentWrapper extends ComponentWrapper implements azdata.Hyper
|
||||
}
|
||||
}
|
||||
|
||||
class GroupContainerComponentWrapper extends ComponentWrapper implements azdata.GroupContainer {
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, type: ModelComponentTypes, id: string) {
|
||||
super(proxy, handle, type, id);
|
||||
this.properties = {};
|
||||
}
|
||||
public get collapsed(): boolean {
|
||||
return this.properties['collapsed'];
|
||||
}
|
||||
public set collapsed(v: boolean) {
|
||||
this.setProperty('collapsed', v);
|
||||
}
|
||||
}
|
||||
|
||||
class ModelViewImpl implements azdata.ModelView {
|
||||
|
||||
public onClosedEmitter = new Emitter<any>();
|
||||
|
||||
@@ -208,6 +208,7 @@ class ButtonImpl implements azdata.window.Button {
|
||||
private _enabled: boolean;
|
||||
private _hidden: boolean;
|
||||
private _focused: boolean;
|
||||
private _position: azdata.window.DialogButtonPosition;
|
||||
|
||||
private _onClick = new Emitter<void>();
|
||||
public onClick = this._onClick.event;
|
||||
@@ -215,6 +216,7 @@ class ButtonImpl implements azdata.window.Button {
|
||||
constructor(private _extHostModelViewDialog: ExtHostModelViewDialog) {
|
||||
this._enabled = true;
|
||||
this._hidden = false;
|
||||
this._position = 'right';
|
||||
}
|
||||
|
||||
public get label(): string {
|
||||
@@ -244,6 +246,15 @@ class ButtonImpl implements azdata.window.Button {
|
||||
this._extHostModelViewDialog.updateButton(this);
|
||||
}
|
||||
|
||||
public get position(): azdata.window.DialogButtonPosition {
|
||||
return this._position;
|
||||
}
|
||||
|
||||
public set position(value: azdata.window.DialogButtonPosition) {
|
||||
this._position = value;
|
||||
this._extHostModelViewDialog.updateButton(this);
|
||||
}
|
||||
|
||||
public get focused(): boolean {
|
||||
return this._focused;
|
||||
}
|
||||
@@ -471,10 +482,10 @@ export class ExtHostModelViewDialog implements ExtHostModelViewDialogShape {
|
||||
return handle;
|
||||
}
|
||||
|
||||
private getHandle(item: azdata.window.Button | azdata.window.Dialog | azdata.window.DialogTab
|
||||
| azdata.window.ModelViewPanel | azdata.window.Wizard | azdata.window.WizardPage | azdata.workspace.ModelViewEditor) {
|
||||
public getHandle(item: azdata.window.Button | azdata.window.Dialog | azdata.window.DialogTab
|
||||
| azdata.window.ModelViewPanel | azdata.window.Wizard | azdata.window.WizardPage | azdata.workspace.ModelViewEditor, createIfNotFound: boolean = true) {
|
||||
let handle = this._objectHandles.get(item);
|
||||
if (handle === undefined) {
|
||||
if (createIfNotFound && handle === undefined) {
|
||||
handle = ExtHostModelViewDialog.getNewHandle();
|
||||
this._objectHandles.set(item, handle);
|
||||
this._objectsByHandle.set(handle, item);
|
||||
@@ -587,7 +598,8 @@ export class ExtHostModelViewDialog implements ExtHostModelViewDialogShape {
|
||||
label: button.label,
|
||||
enabled: button.enabled,
|
||||
hidden: button.hidden,
|
||||
focused: button.focused
|
||||
focused: button.focused,
|
||||
position: button.position
|
||||
});
|
||||
}
|
||||
|
||||
@@ -614,11 +626,12 @@ export class ExtHostModelViewDialog implements ExtHostModelViewDialogShape {
|
||||
return tab;
|
||||
}
|
||||
|
||||
public createButton(label: string): azdata.window.Button {
|
||||
public createButton(label: string, position: azdata.window.DialogButtonPosition = 'right'): azdata.window.Button {
|
||||
let button = new ButtonImpl(this);
|
||||
this.getHandle(button);
|
||||
this.registerOnClickCallback(button, button.getOnClickCallback());
|
||||
button.label = label;
|
||||
button.position = position;
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
@@ -413,8 +413,8 @@ export function createAdsApiFactory(accessor: ServicesAccessor): IAdsExtensionAp
|
||||
createTab(title: string): azdata.window.DialogTab {
|
||||
return extHostModelViewDialog.createTab(title, extension);
|
||||
},
|
||||
createButton(label: string): azdata.window.Button {
|
||||
return extHostModelViewDialog.createButton(label);
|
||||
createButton(label: string, position: azdata.window.DialogButtonPosition = 'right'): azdata.window.Button {
|
||||
return extHostModelViewDialog.createButton(label, position);
|
||||
},
|
||||
openDialog(dialog: azdata.window.Dialog) {
|
||||
return extHostModelViewDialog.openDialog(dialog);
|
||||
|
||||
@@ -253,6 +253,7 @@ export interface IModelViewButtonDetails {
|
||||
enabled: boolean;
|
||||
hidden: boolean;
|
||||
focused?: boolean;
|
||||
position?: 'left' | 'right';
|
||||
}
|
||||
|
||||
export interface IModelViewWizardPageDetails {
|
||||
|
||||
Reference in New Issue
Block a user