mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
switch schema compare to use inputbox instead of table headers (#13715)
This commit is contained in:
@@ -50,8 +50,8 @@ export class SchemaCompareMainWindow {
|
|||||||
private SchemaCompareActionMap: Map<Number, string>;
|
private SchemaCompareActionMap: Map<Number, string>;
|
||||||
private operationId: string;
|
private operationId: string;
|
||||||
protected comparisonResult: mssql.SchemaCompareResult;
|
protected comparisonResult: mssql.SchemaCompareResult;
|
||||||
private sourceNameComponent: azdata.TableComponent;
|
private sourceNameComponent: azdata.InputBoxComponent;
|
||||||
private targetNameComponent: azdata.TableComponent;
|
private targetNameComponent: azdata.InputBoxComponent;
|
||||||
private deploymentOptions: mssql.DeploymentOptions;
|
private deploymentOptions: mssql.DeploymentOptions;
|
||||||
private schemaCompareOptionDialog: SchemaCompareOptionsDialog;
|
private schemaCompareOptionDialog: SchemaCompareOptionsDialog;
|
||||||
private tablelistenersToDispose: vscode.Disposable[] = [];
|
private tablelistenersToDispose: vscode.Disposable[] = [];
|
||||||
@@ -156,26 +156,16 @@ export class SchemaCompareMainWindow {
|
|||||||
|
|
||||||
this.sourceName = getEndpointName(this.sourceEndpointInfo);
|
this.sourceName = getEndpointName(this.sourceEndpointInfo);
|
||||||
this.targetName = ' ';
|
this.targetName = ' ';
|
||||||
this.sourceNameComponent = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
this.sourceNameComponent = view.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
data: [],
|
value: this.sourceName,
|
||||||
columns: [
|
title: this.sourceName,
|
||||||
{
|
enabled: false
|
||||||
value: this.sourceName,
|
|
||||||
headerCssClass: 'no-borders',
|
|
||||||
toolTip: this.sourceName
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.targetNameComponent = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
this.targetNameComponent = view.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
data: [],
|
value: this.targetName,
|
||||||
columns: [
|
title: this.targetName,
|
||||||
{
|
enabled: false
|
||||||
value: this.targetName,
|
|
||||||
headerCssClass: 'no-borders',
|
|
||||||
toolTip: this.targetName
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.resetButtons(ResetButtonState.noSourceTarget);
|
this.resetButtons(ResetButtonState.noSourceTarget);
|
||||||
@@ -217,10 +207,10 @@ export class SchemaCompareMainWindow {
|
|||||||
|
|
||||||
sourceTargetLabels.addItem(sourceLabel, { CSSStyles: { 'width': '55%', 'margin-left': '15px', 'font-size': 'larger', 'font-weight': 'bold' } });
|
sourceTargetLabels.addItem(sourceLabel, { CSSStyles: { 'width': '55%', 'margin-left': '15px', 'font-size': 'larger', 'font-weight': 'bold' } });
|
||||||
sourceTargetLabels.addItem(targetLabel, { CSSStyles: { 'width': '45%', 'font-size': 'larger', 'font-weight': 'bold' } });
|
sourceTargetLabels.addItem(targetLabel, { CSSStyles: { 'width': '45%', 'font-size': 'larger', 'font-weight': 'bold' } });
|
||||||
this.sourceTargetFlexLayout.addItem(this.sourceNameComponent, { CSSStyles: { 'width': '40%', 'height': '25px', 'margin-top': '10px', 'margin-left': '15px' } });
|
this.sourceTargetFlexLayout.addItem(this.sourceNameComponent, { CSSStyles: { 'width': '40%', 'height': '25px', 'margin-top': '10px', 'margin-left': '15px', 'margin-right': '10px' } });
|
||||||
this.sourceTargetFlexLayout.addItem(this.selectSourceButton, { CSSStyles: { 'margin-top': '10px' } });
|
this.sourceTargetFlexLayout.addItem(this.selectSourceButton, { CSSStyles: { 'margin-top': '10px' } });
|
||||||
this.sourceTargetFlexLayout.addItem(arrowLabel, { CSSStyles: { 'width': '10%', 'font-size': 'larger', 'text-align-last': 'center' } });
|
this.sourceTargetFlexLayout.addItem(arrowLabel, { CSSStyles: { 'width': '10%', 'font-size': 'larger', 'text-align-last': 'center' } });
|
||||||
this.sourceTargetFlexLayout.addItem(this.targetNameComponent, { CSSStyles: { 'width': '40%', 'height': '25px', 'margin-top': '10px', 'margin-left': '15px' } });
|
this.sourceTargetFlexLayout.addItem(this.targetNameComponent, { CSSStyles: { 'width': '40%', 'height': '25px', 'margin-top': '10px', 'margin-left': '15px', 'margin-right': '10px' } });
|
||||||
this.sourceTargetFlexLayout.addItem(this.selectTargetButton, { CSSStyles: { 'margin-top': '10px' } });
|
this.sourceTargetFlexLayout.addItem(this.selectTargetButton, { CSSStyles: { 'margin-top': '10px' } });
|
||||||
|
|
||||||
this.loader = view.modelBuilder.loadingComponent().component();
|
this.loader = view.modelBuilder.loadingComponent().component();
|
||||||
@@ -258,21 +248,14 @@ export class SchemaCompareMainWindow {
|
|||||||
this.sourceName = getEndpointName(this.sourceEndpointInfo);
|
this.sourceName = getEndpointName(this.sourceEndpointInfo);
|
||||||
this.targetName = getEndpointName(this.targetEndpointInfo);
|
this.targetName = getEndpointName(this.targetEndpointInfo);
|
||||||
|
|
||||||
this.sourceNameComponent.updateProperty('columns', [
|
this.sourceNameComponent.updateProperties({
|
||||||
{
|
value: this.sourceName,
|
||||||
value: this.sourceName,
|
title: this.sourceName
|
||||||
headerCssClass: 'no-borders',
|
});
|
||||||
toolTip: this.sourceName
|
this.targetNameComponent.updateProperties({
|
||||||
},
|
value: this.targetName,
|
||||||
]);
|
title: this.targetName
|
||||||
this.targetNameComponent.updateProperty('columns', [
|
});
|
||||||
{
|
|
||||||
value: this.targetName,
|
|
||||||
headerCssClass: 'no-borders',
|
|
||||||
toolTip: this.targetName
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
if (!this.sourceName || !this.targetName || this.sourceName === ' ' || this.targetName === ' ') {
|
if (!this.sourceName || !this.targetName || this.sourceName === ' ' || this.targetName === ' ') {
|
||||||
this.resetButtons(ResetButtonState.noSourceTarget);
|
this.resetButtons(ResetButtonState.noSourceTarget);
|
||||||
} else {
|
} else {
|
||||||
@@ -870,23 +853,13 @@ export class SchemaCompareMainWindow {
|
|||||||
[this.sourceName, this.targetName] = [this.targetName, this.sourceName];
|
[this.sourceName, this.targetName] = [this.targetName, this.sourceName];
|
||||||
|
|
||||||
this.sourceNameComponent.updateProperties({
|
this.sourceNameComponent.updateProperties({
|
||||||
columns: [
|
value: this.sourceName,
|
||||||
{
|
title: this.sourceName
|
||||||
value: this.sourceName,
|
|
||||||
headerCssClass: 'no-borders',
|
|
||||||
toolTip: this.sourceName
|
|
||||||
},
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.targetNameComponent.updateProperties({
|
this.targetNameComponent.updateProperties({
|
||||||
columns: [
|
value: this.targetName,
|
||||||
{
|
title: this.targetName
|
||||||
value: this.targetName,
|
|
||||||
headerCssClass: 'no-borders',
|
|
||||||
toolTip: this.targetName
|
|
||||||
},
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// remember that source target have been toggled
|
// remember that source target have been toggled
|
||||||
|
|||||||
Reference in New Issue
Block a user