group source and target components into formcomponentgroups (#5329)

This commit is contained in:
kisantia
2019-05-04 05:51:40 +12:00
committed by GitHub
parent ab22b93ce0
commit 6c7cb185a1

View File

@@ -11,15 +11,17 @@ import * as os from 'os';
import { SchemaCompareResult } from '../schemaCompareResult'; import { SchemaCompareResult } from '../schemaCompareResult';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
const CompareButtonText: string = localize('schemaCompareDialog.Compare', 'Compare'); const CompareButtonText: string = localize('schemaCompareDialog.compare', 'Compare');
const CancelButtonText: string = localize('schemaCompareDialog.Cancel', 'Cancel'); const CancelButtonText: string = localize('schemaCompareDialog.cancel', 'Cancel');
const SourceTextBoxLabel: string = localize('schemaCompareDialog.SourceLabel', 'Source File'); const SourceTitle: string = localize('schemaCompareDialog.SourceTitle', 'Source');
const TargetTextBoxLabel: string = localize('schemaCompareDialog.TargetLabel', 'Target File'); const TargetTitle: string = localize('schemaCompareDialog.TargetTitle', 'Target');
const FileTextBoxLabel: string = localize('schemaCompareDialog.fileTextBoxLabel', 'File');
const DacpacRadioButtonLabel: string = localize('schemaCompare.dacpacRadioButtonLabel', 'Data-tier Application File (.dacpac)'); const DacpacRadioButtonLabel: string = localize('schemaCompare.dacpacRadioButtonLabel', 'Data-tier Application File (.dacpac)');
const DatabaseRadioButtonLabel: string = localize('schemaCompare.databaseButtonLabel', 'Database'); const DatabaseRadioButtonLabel: string = localize('schemaCompare.databaseButtonLabel', 'Database');
const SourceRadioButtonsLabel: string = localize('schemaCompare.sourceButtonsLabel', 'Source Type'); const RadioButtonsLabel: string = localize('schemaCompare.radioButtonsLabel', 'Type');
const TargetRadioButtonsLabel: string = localize('schemaCompare.targetButtonsLabel', 'Target Type'); const ServerDropdownLabel: string = localize('schemaCompareDialog.serverDropdownTitle', 'Server');
const NoActiveConnectionsLabel: string = localize('schemaCompare.NoActiveConnectionsText', 'No active connections'); const DatabaseDropdownLabel: string = localize('schemaCompareDialog.databaseDropdownTitle', 'Database');
const NoActiveConnectionsLabel: string = localize('schemaCompare.noActiveConnectionsText', 'No active connections');
const SchemaCompareLabel: string = localize('schemaCompare.dialogTitle', 'Schema Compare'); const SchemaCompareLabel: string = localize('schemaCompare.dialogTitle', 'Schema Compare');
export class SchemaCompareDialog { export class SchemaCompareDialog {
@@ -169,21 +171,39 @@ export class SchemaCompareDialog {
if (this.database) { if (this.database) {
this.formBuilder = view.modelBuilder.formContainer() this.formBuilder = view.modelBuilder.formContainer()
.withFormItems([ .withFormItems([
{
title: SourceTitle,
components: [
sourceRadioButtons, sourceRadioButtons,
this.sourceServerComponent, this.sourceServerComponent,
this.sourceDatabaseComponent, this.sourceDatabaseComponent
]
}, {
title: TargetTitle,
components: [
targetRadioButtons, targetRadioButtons,
this.targetDacpacComponent this.targetDacpacComponent
]
}
], { ], {
horizontal: true horizontal: true
}); });
} else { } else {
this.formBuilder = view.modelBuilder.formContainer() this.formBuilder = view.modelBuilder.formContainer()
.withFormItems([ .withFormItems([
{
title: SourceTitle,
components: [
sourceRadioButtons, sourceRadioButtons,
this.sourceDacpacComponent, this.sourceDacpacComponent,
]
}, {
title: TargetTitle,
components: [
targetRadioButtons, targetRadioButtons,
this.targetDacpacComponent this.targetDacpacComponent
]
}
], { ], {
horizontal: true horizontal: true
}); });
@@ -232,7 +252,7 @@ export class SchemaCompareDialog {
return { return {
component: currentTextbox, component: currentTextbox,
title: isTarget ? TargetTextBoxLabel : SourceTextBoxLabel, title: FileTextBoxLabel,
actions: [currentButton] actions: [currentButton]
}; };
} }
@@ -285,7 +305,7 @@ export class SchemaCompareDialog {
return { return {
component: flexRadioButtonsModel, component: flexRadioButtonsModel,
title: SourceRadioButtonsLabel title: RadioButtonsLabel
}; };
} }
@@ -332,7 +352,7 @@ export class SchemaCompareDialog {
return { return {
component: flexRadioButtonsModel, component: flexRadioButtonsModel,
title: TargetRadioButtonsLabel title: RadioButtonsLabel
}; };
} }
@@ -344,7 +364,7 @@ export class SchemaCompareDialog {
return { return {
component: this.sourceServerDropdown, component: this.sourceServerDropdown,
title: localize('schemaCompare.sourceServerDropdownTitle', 'Source Server') title: ServerDropdownLabel
}; };
} }
@@ -356,7 +376,7 @@ export class SchemaCompareDialog {
return { return {
component: this.targetServerDropdown, component: this.targetServerDropdown,
title: localize('schemaCompare.targetServerDropdownTitle', 'Target Server') title: ServerDropdownLabel
}; };
} }
@@ -400,7 +420,7 @@ export class SchemaCompareDialog {
return { return {
component: this.sourceDatabaseDropdown, component: this.sourceDatabaseDropdown,
title: localize('schemaCompare.sourceDatabaseDropdownTitle', 'Source Database') title: DatabaseDropdownLabel
}; };
} }
@@ -409,7 +429,7 @@ export class SchemaCompareDialog {
return { return {
component: this.targetDatabaseDropdown, component: this.targetDatabaseDropdown,
title: localize('schemaCompare.targetDatabaseDropdownTitle', 'Target Database') title: DatabaseDropdownLabel
}; };
} }