withProperties -> withProps (#15876)

* withProperties -> withProps

* Fix errors

* remove ,

* fixes

* Update azdata-test

* Fix dacpac tests

* Add required and remove added layout
This commit is contained in:
Charles Gagnon
2021-06-23 14:26:14 -07:00
committed by GitHub
parent e21f56d719
commit 3a3d7f5271
73 changed files with 417 additions and 414 deletions

View File

@@ -185,7 +185,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
}
});
this.commandTextBox = view.modelBuilder.inputBox()
.withProperties({
.withProps({
height: 300,
width: 400,
multiline: true,
@@ -199,7 +199,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
private createGeneralTab(databases: string[], queryProvider: azdata.QueryProvider) {
this.generalTab.registerContent(async (view) => {
this.nameTextBox = view.modelBuilder.inputBox()
.withProperties({
.withProps({
ariaLabel: this.StepNameLabelString,
placeHolder: this.StepNameLabelString
}).component();
@@ -211,26 +211,26 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
});
this.typeDropdown = view.modelBuilder.dropDown()
.withProperties({
.withProps({
value: JobStepDialog.TSQLScript,
values: [JobStepDialog.TSQLScript, JobStepDialog.CmdExec, JobStepDialog.Powershell]
})
.component();
this.runAsDropdown = view.modelBuilder.dropDown()
.withProperties({
.withProps({
value: '',
values: ['']
})
.component();
this.runAsDropdown.enabled = false;
this.databaseDropdown = view.modelBuilder.dropDown()
.withProperties({
.withProps({
value: databases[0],
values: databases
}).component();
this.processExitCodeBox = view.modelBuilder.inputBox()
.withProperties({
.withProps({
ariaLabel: this.ProcessExitCodeText,
placeHolder: this.ProcessExitCodeText
}).component();
@@ -315,7 +315,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
private createAdvancedTab() {
this.advancedTab.registerContent(async (view) => {
this.successActionDropdown = view.modelBuilder.dropDown()
.withProperties({
.withProps({
width: '100%',
value: JobStepDialog.NextStep,
values: [JobStepDialog.NextStep, JobStepDialog.QuitJobReportingSuccess, JobStepDialog.QuitJobReportingFailure]
@@ -324,18 +324,18 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
let retryFlexContainer = this.createRetryCounters(view);
this.failureActionDropdown = view.modelBuilder.dropDown()
.withProperties({
.withProps({
value: JobStepDialog.QuitJobReportingFailure,
values: [JobStepDialog.QuitJobReportingFailure, JobStepDialog.NextStep, JobStepDialog.QuitJobReportingSuccess]
})
.component();
let optionsGroup = this.createTSQLOptions(view);
this.logToTableCheckbox = view.modelBuilder.checkBox()
.withProperties({
.withProps({
label: this.LogToTableLabel
}).component();
let appendToExistingEntryInTableCheckbox = view.modelBuilder.checkBox()
.withProperties({ label: this.AppendExistingTableEntryLabel }).component();
.withProps({ label: this.AppendExistingTableEntryLabel }).component();
appendToExistingEntryInTableCheckbox.enabled = false;
this.logToTableCheckbox.onChanged(e => {
appendToExistingEntryInTableCheckbox.enabled = e;
@@ -346,9 +346,9 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
.withLayout({ flexFlow: 'row', justifyContent: 'space-between', width: 300 })
.withItems([this.logToTableCheckbox]).component();
this.logStepOutputHistoryCheckbox = view.modelBuilder.checkBox()
.withProperties({ label: this.IncludeStepOutputHistoryLabel }).component();
.withProps({ label: this.IncludeStepOutputHistoryLabel }).component();
this.userInputBox = view.modelBuilder.inputBox()
.withProperties({ inputType: 'text', width: '100%' }).component();
.withProps({ inputType: 'text', width: '100%' }).component();
let formModel = view.modelBuilder.formContainer()
.withFormItems(
[{
@@ -400,7 +400,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
private createRetryCounters(view: azdata.ModelView) {
this.retryAttemptsBox = view.modelBuilder.inputBox()
.withValidation(component => Number(component.value) >= 0)
.withProperties({
.withProps({
inputType: 'number',
width: '100%',
placeHolder: '0'
@@ -408,7 +408,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
.component();
this.retryIntervalBox = view.modelBuilder.inputBox()
.withValidation(component => Number(component.value) >= 0)
.withProperties({
.withProps({
inputType: 'number',
width: '100%',
placeHolder: '0'
@@ -449,23 +449,23 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
this.fileBrowserDialog.content = [fileBrowserTab];
fileBrowserTab.registerContent(async (view) => {
this.fileBrowserTree = view.modelBuilder.fileBrowserTree()
.withProperties({ ownerUri: this.ownerUri, width: 420, height: 700 })
.withProps({ ownerUri: this.ownerUri, width: 420, height: 700 })
.component();
this.selectedPathTextBox = view.modelBuilder.inputBox()
.withProperties({ inputType: 'text' })
.withProps({ inputType: 'text' })
.component();
this.fileBrowserTree.onDidChange((args) => {
this.selectedPathTextBox.value = args.fullPath;
this.fileBrowserNameBox.value = args.isFile ? path.win32.basename(args.fullPath) : '';
});
this.fileTypeDropdown = view.modelBuilder.dropDown()
.withProperties({
.withProps({
value: this.AllFilesLabelString,
values: [this.AllFilesLabelString]
})
.component();
this.fileBrowserNameBox = view.modelBuilder.inputBox()
.withProperties({})
.withProps({})
.component();
let fileBrowserContainer = view.modelBuilder.formContainer()
.withFormItems([{
@@ -501,7 +501,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
}).component();
this.outputFileBrowserButton.onDidClick(() => this.openFileBrowserDialog());
this.outputFileNameBox = view.modelBuilder.inputBox()
.withProperties({
.withProps({
width: 250,
inputType: 'text'
}).component();
@@ -519,7 +519,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
flex: '1 1 50%'
}).component();
this.appendToExistingFileCheckbox = view.modelBuilder.checkBox()
.withProperties({
.withProps({
label: this.AppendOutputToFileLabel
}).component();
this.appendToExistingFileCheckbox.enabled = false;