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

@@ -100,7 +100,7 @@ export class AzureSettingsPage extends BasePage {
private async createAzureAccountsDropdown(view: azdata.ModelView) {
this._azureAccountsDropdown = view.modelBuilder.dropDown().withProperties({}).component();
this._azureAccountsDropdown = view.modelBuilder.dropDown().withProps({}).component();
this._azureAccountsDropdown.onValueChanged(async (value) => {
if (!this._azureAccountsDropdown.value) {
@@ -164,7 +164,7 @@ export class AzureSettingsPage extends BasePage {
}
private async createAzureSubscriptionsDropdown(view: azdata.ModelView) {
this._azureSubscriptionsDropdown = view.modelBuilder.dropDown().withProperties({}).component();
this._azureSubscriptionsDropdown = view.modelBuilder.dropDown().withProps({}).component();
this._azureSubscriptionsDropdown.onValueChanged(async value => {
if (!this._azureSubscriptionsDropdown.value) {
@@ -234,7 +234,7 @@ export class AzureSettingsPage extends BasePage {
}
private async createResourceDropdown(view: azdata.ModelView) {
this._resourceGroupDropdown = view.modelBuilder.dropDown().withProperties({
this._resourceGroupDropdown = view.modelBuilder.dropDown().withProps({
required: true
}).component();
this._resourceGroupDropdown.onValueChanged(async (value) => {
@@ -278,7 +278,7 @@ export class AzureSettingsPage extends BasePage {
}
private async createAzureRegionsDropdown(view: azdata.ModelView) {
this._azureRegionsDropdown = view.modelBuilder.dropDown().withProperties({
this._azureRegionsDropdown = view.modelBuilder.dropDown().withProps({
required: true
}).component();

View File

@@ -110,7 +110,7 @@ export class NetworkSettingsPage extends BasePage {
private async createVirtualNetworkDropdown(view: azdata.ModelView) {
this._newVirtualNetworkCheckbox = view.modelBuilder.checkBox().withProperties(<azdata.CheckBoxProperties>{
this._newVirtualNetworkCheckbox = view.modelBuilder.checkBox().withProps(<azdata.CheckBoxProperties>{
label: constants.NetworkSettingsNewVirtualNetwork,
checked: false
}).component();
@@ -119,7 +119,7 @@ export class NetworkSettingsPage extends BasePage {
this.toggleNewVirtualNetwork();
});
this._virtualNetworkDropdown = view.modelBuilder.dropDown().withProperties({
this._virtualNetworkDropdown = view.modelBuilder.dropDown().withProps({
width: constants.standardWidth,
required: true
}).component();
@@ -132,7 +132,7 @@ export class NetworkSettingsPage extends BasePage {
this.populateSubnetDropdown();
});
this._newVirtualNetworkText = view.modelBuilder.inputBox().withProperties(<azdata.InputBoxProperties>{
this._newVirtualNetworkText = view.modelBuilder.inputBox().withProps(<azdata.InputBoxProperties>{
width: constants.standardWidth,
required: true,
placeHolder: localize('deployAzureSQLVM.NewVnetPlaceholder', "Enter name for new virtual network")
@@ -222,7 +222,7 @@ export class NetworkSettingsPage extends BasePage {
});
this._subnetDropdown = view.modelBuilder.dropDown().withProperties(<azdata.DropDownProperties>{
this._subnetDropdown = view.modelBuilder.dropDown().withProps(<azdata.DropDownProperties>{
width: constants.standardWidth,
required: true
}).component();
@@ -234,7 +234,7 @@ export class NetworkSettingsPage extends BasePage {
this._model.subnetName = (this._subnetDropdown.value as azdata.CategoryValue).name;
});
this._newsubnetText = view.modelBuilder.inputBox().withProperties(<azdata.InputBoxProperties>{
this._newsubnetText = view.modelBuilder.inputBox().withProps(<azdata.InputBoxProperties>{
width: constants.standardWidth,
required: true,
placeHolder: localize('deployAzureSQLVM.NewSubnetPlaceholder', "Enter name for new subnet")
@@ -299,7 +299,7 @@ export class NetworkSettingsPage extends BasePage {
private async createPublicIPDropdown(view: azdata.ModelView) {
this._newPublicIpCheckbox = view.modelBuilder.checkBox().withProperties(<azdata.CheckBoxProperties>{
this._newPublicIpCheckbox = view.modelBuilder.checkBox().withProps(<azdata.CheckBoxProperties>{
label: constants.NetworkSettingsNewPublicIp,
checked: false
}).component();
@@ -308,7 +308,7 @@ export class NetworkSettingsPage extends BasePage {
this.toggleNewPublicIp();
});
this._publicIpDropdown = view.modelBuilder.dropDown().withProperties({
this._publicIpDropdown = view.modelBuilder.dropDown().withProps({
required: true,
width: constants.standardWidth,
}).component();
@@ -320,7 +320,7 @@ export class NetworkSettingsPage extends BasePage {
this._model.publicIpName = (this._publicIpDropdown.value as azdata.CategoryValue).name;
});
this._publicIpNetworkText = view.modelBuilder.inputBox().withProperties(<azdata.InputBoxProperties>{
this._publicIpNetworkText = view.modelBuilder.inputBox().withProps(<azdata.InputBoxProperties>{
placeHolder: localize('deployAzureSQLVM.NewPipPlaceholder', "Enter name for new public IP"),
width: constants.standardWidth
}).component();
@@ -385,7 +385,7 @@ export class NetworkSettingsPage extends BasePage {
}
private async createVmRDPAllowCheckbox(view: azdata.ModelView) {
this._vmRDPAllowCheckbox = view.modelBuilder.checkBox().withProperties({
this._vmRDPAllowCheckbox = view.modelBuilder.checkBox().withProps({
label: constants.RDPAllowCheckboxLabel,
}).component();
this._vmRDPAllowCheckbox.onChanged((value) => {

View File

@@ -109,7 +109,7 @@ export class SqlServerSettingsPage extends BasePage {
private createSqlConnectivityDropdown(view: azdata.ModelView) {
const privateOptionDisplayName = localize('deployAzureSQLVM.PrivateConnectivityDropdownOptionDefault', "Private (within Virtual Network)");
this._sqlConnectivityDropdown = view.modelBuilder.dropDown().withProperties(<azdata.DropDownProperties>
this._sqlConnectivityDropdown = view.modelBuilder.dropDown().withProps(<azdata.DropDownProperties>
{
values: [
{
@@ -148,7 +148,7 @@ export class SqlServerSettingsPage extends BasePage {
}
private createPortText(view: azdata.ModelView) {
this._portTextBox = view.modelBuilder.inputBox().withProperties(<azdata.InputBoxProperties>{
this._portTextBox = view.modelBuilder.inputBox().withProps(<azdata.InputBoxProperties>{
inputType: 'number',
max: 65535,
min: 1024,
@@ -165,7 +165,7 @@ export class SqlServerSettingsPage extends BasePage {
private createSqlAuthentication(view: azdata.ModelView) {
this._sqlAuthenticationDropdown = view.modelBuilder.dropDown().withProperties(<azdata.DropDownComponent>{
this._sqlAuthenticationDropdown = view.modelBuilder.dropDown().withProps(<azdata.DropDownComponent>{
values: [
{
displayName: localizedConstants.yes,
@@ -194,13 +194,13 @@ export class SqlServerSettingsPage extends BasePage {
this._sqlAuthenticationTextRow = this._model.createFormRowComponent(view, constants.SqlAuthenticationUsernameLabel, '', this._sqlAuthenticationTextbox, true);
this._sqlAuthenticationPasswordTextbox = view.modelBuilder.inputBox().withProperties(<azdata.InputBoxProperties>{
this._sqlAuthenticationPasswordTextbox = view.modelBuilder.inputBox().withProps(<azdata.InputBoxProperties>{
inputType: 'password'
}).component();
this._sqlAuthenticationPasswordTextRow = this._model.createFormRowComponent(view, constants.SqlAuthenticationPasswordLabel, '', this._sqlAuthenticationPasswordTextbox, true);
this._sqlAuthenticationPasswordConfirmationTextbox = view.modelBuilder.inputBox().withProperties(<azdata.InputBoxProperties>{
this._sqlAuthenticationPasswordConfirmationTextbox = view.modelBuilder.inputBox().withProps(<azdata.InputBoxProperties>{
inputType: 'password'
}).component();

View File

@@ -140,7 +140,7 @@ export class VmSettingsPage extends BasePage {
private async createVmNameTextBox(view: azdata.ModelView) {
this._vmNameTextBox = view.modelBuilder.inputBox().withProperties({
this._vmNameTextBox = view.modelBuilder.inputBox().withProps({
}).component();
this._vmNameTextBox.onTextChanged((value) => {
@@ -150,7 +150,7 @@ export class VmSettingsPage extends BasePage {
}
private async createAdminUsernameTextBox(view: azdata.ModelView) {
this._adminUsernameTextBox = view.modelBuilder.inputBox().withProperties({
this._adminUsernameTextBox = view.modelBuilder.inputBox().withProps({
}).component();
this._adminUsernameTextBox.onTextChanged((value) => {
@@ -160,7 +160,7 @@ export class VmSettingsPage extends BasePage {
}
private async createAdminPasswordTextBox(view: azdata.ModelView) {
this._adminPasswordTextBox = view.modelBuilder.inputBox().withProperties({
this._adminPasswordTextBox = view.modelBuilder.inputBox().withProps({
inputType: 'password',
}).component();
@@ -171,7 +171,7 @@ export class VmSettingsPage extends BasePage {
}
private async createAdminPasswordConfirmTextBox(view: azdata.ModelView) {
this._adminComfirmPasswordTextBox = view.modelBuilder.inputBox().withProperties({
this._adminComfirmPasswordTextBox = view.modelBuilder.inputBox().withProps({
inputType: 'password',
}).component();
@@ -181,7 +181,7 @@ export class VmSettingsPage extends BasePage {
}
private async createVmImageDropdown(view: azdata.ModelView) {
this._vmImageDropdown = view.modelBuilder.dropDown().withProperties({
this._vmImageDropdown = view.modelBuilder.dropDown().withProps({
}).component();
this._vmImageDropdown.onValueChanged(value => {
@@ -236,7 +236,7 @@ export class VmSettingsPage extends BasePage {
}
private async createVMImageSkuDropdown(view: azdata.ModelView) {
this._vmImageSkuDropdown = view.modelBuilder.dropDown().withProperties({
this._vmImageSkuDropdown = view.modelBuilder.dropDown().withProps({
}).component();
this._vmImageSkuDropdown.onValueChanged(value => {
@@ -277,7 +277,7 @@ export class VmSettingsPage extends BasePage {
}
private async createVMImageVersionDropdown(view: azdata.ModelView) {
this._vmImageVersionDropdown = view.modelBuilder.dropDown().withProperties({
this._vmImageVersionDropdown = view.modelBuilder.dropDown().withProps({
}).component();
this._vmImageVersionDropdown.onValueChanged(value => {
@@ -317,7 +317,7 @@ export class VmSettingsPage extends BasePage {
private async createVmSizeDropdown(view: azdata.ModelView) {
this._vmSizeDropdown = view.modelBuilder.dropDown().withProperties({
this._vmSizeDropdown = view.modelBuilder.dropDown().withProps({
editable: true
}).component();
@@ -325,7 +325,7 @@ export class VmSettingsPage extends BasePage {
this._model.vmSize = (this._vmSizeDropdown.value as azdata.CategoryValue).name;
});
this._vmSizeLearnMoreLink = view.modelBuilder.hyperlink().withProperties(<azdata.HyperlinkComponent>{
this._vmSizeLearnMoreLink = view.modelBuilder.hyperlink().withProps(<azdata.HyperlinkComponent>{
label: constants.VmSizeLearnMoreLabel,
url: 'https://go.microsoft.com/fwlink/?linkid=2143101'