mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
Switch withProperties to be withProps (#16380)
* Transition to withProps in arc * Transition to withProps inputbox * Transition to withProps in checkbox * Transition to withProps text * Transition to withProps in declarative table * Transition to withProps hyperlink * Transition to withProps in button * Transition to withProps radiobutton * Transition to withProps in input * Transition to withProps button * Transition to withProps in text * Transition to withProps image * Transition to withProps declare table * Transition to withProps in table * Transition to withProps radio button * Transition to withProps in image * Transition to withProps radio button * Transition to withProps in commit * Transition to withProps div cont * Transition to withProps in comp * Transition to withProps radio card * Transition to withProps in comp icon * Transition to withProps card * Transition to withProps list
This commit is contained in:
@@ -16,7 +16,7 @@ export class SqlAssessmentResult {
|
||||
}
|
||||
|
||||
private createTitleComponent(view: azdata.ModelView): azdata.TextComponent {
|
||||
const title = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
const title = view.modelBuilder.text().withProps({
|
||||
value: 'Azure SQL Managed Instance does not support multiple log files', // TODO: Get this string from the actual results
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@ export class SqlAssessmentResult {
|
||||
}
|
||||
|
||||
private createImpactComponent(view: azdata.ModelView): azdata.TextComponent {
|
||||
const impact = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
const impact = view.modelBuilder.text().withProps({
|
||||
title: 'Impact', // TODO localize
|
||||
value: 'SQL Server allows a database to log transactions across multiple files. This databases uses multiple log files' // TODO: Get this string from the actual results
|
||||
});
|
||||
@@ -33,7 +33,7 @@ export class SqlAssessmentResult {
|
||||
}
|
||||
|
||||
private createRecommendationComponent(view: azdata.ModelView): azdata.TextComponent {
|
||||
const recommendation = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
const recommendation = view.modelBuilder.text().withProps({
|
||||
title: 'Recommendation', // TODO localize
|
||||
value: 'Azure SQL Managed Instance allows a single log file per database only. Please delete all but one of the log files before migrating this database.' // TODO: Get this string from the actual results
|
||||
});
|
||||
@@ -42,7 +42,7 @@ export class SqlAssessmentResult {
|
||||
}
|
||||
|
||||
private createMoreInfoComponent(view: azdata.ModelView): azdata.TextComponent {
|
||||
const moreInfo = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
const moreInfo = view.modelBuilder.text().withProps({
|
||||
title: 'More info', // TODO localize
|
||||
value: '{0}',
|
||||
links: [
|
||||
@@ -57,7 +57,7 @@ export class SqlAssessmentResult {
|
||||
}
|
||||
|
||||
private createImpactedObjectsComponent(view: azdata.ModelView): azdata.TableComponent {
|
||||
const impactedObjects = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||
const impactedObjects = view.modelBuilder.table().withProps({
|
||||
title: 'Impacted Objects',
|
||||
columns: [
|
||||
'Type', // TODO localize
|
||||
|
||||
@@ -14,7 +14,7 @@ export class SqlAssessmentResultList {
|
||||
}
|
||||
|
||||
private createListComponent(view: azdata.ModelView): azdata.ListBoxComponent {
|
||||
const list = view.modelBuilder.listBox().withProperties<azdata.ListBoxProperties>({
|
||||
const list = view.modelBuilder.listBox().withProps({
|
||||
values: [
|
||||
'Filestream not supported in Azure SQL Managed Instance',
|
||||
'Number of Log files per database something something',
|
||||
|
||||
@@ -543,7 +543,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
const location = this._model._targetServerInstance.location;
|
||||
const keys = await getSqlMigrationServiceAuthKeys(this._model._azureAccount, subscription, resourceGroup, location, this._createdMigrationService!.name);
|
||||
|
||||
this._copyKey1Button = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._copyKey1Button = this._view.modelBuilder.button().withProps({
|
||||
title: constants.COPY_KEY1,
|
||||
iconPath: IconPathHelper.copy,
|
||||
ariaLabel: constants.COPY_KEY1,
|
||||
@@ -554,7 +554,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
vscode.window.showInformationMessage(constants.SERVICE_KEY1_COPIED_HELP);
|
||||
});
|
||||
|
||||
this._copyKey2Button = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._copyKey2Button = this._view.modelBuilder.button().withProps({
|
||||
title: constants.COPY_KEY2,
|
||||
iconPath: IconPathHelper.copy,
|
||||
ariaLabel: constants.COPY_KEY2,
|
||||
@@ -565,7 +565,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
vscode.window.showInformationMessage(constants.SERVICE_KEY2_COPIED_HELP);
|
||||
});
|
||||
|
||||
this._refreshKey1Button = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._refreshKey1Button = this._view.modelBuilder.button().withProps({
|
||||
title: constants.REFRESH_KEY1,
|
||||
iconPath: IconPathHelper.refresh,
|
||||
ariaLabel: constants.REFRESH_KEY1,
|
||||
@@ -574,7 +574,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
this._refreshKey1Button.onDidClick((e) => {//TODO: add refresh logic
|
||||
});
|
||||
|
||||
this._refreshKey2Button = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._refreshKey2Button = this._view.modelBuilder.button().withProps({
|
||||
title: constants.REFRESH_KEY2,
|
||||
iconPath: IconPathHelper.refresh,
|
||||
ariaLabel: constants.REFRESH_KEY2,
|
||||
|
||||
@@ -229,7 +229,7 @@ export class SqlMigrationServiceDetailsDialog {
|
||||
|
||||
const copyKey1Button = view.modelBuilder
|
||||
.button()
|
||||
.withProperties<azdata.ComponentWithIconProperties>({
|
||||
.withProps({
|
||||
title: constants.COPY_KEY1,
|
||||
iconPath: IconPathHelper.copy,
|
||||
height: IMAGE_SIZE,
|
||||
@@ -245,7 +245,7 @@ export class SqlMigrationServiceDetailsDialog {
|
||||
|
||||
const copyKey2Button = view.modelBuilder
|
||||
.button()
|
||||
.withProperties<azdata.ComponentWithIconProperties>({
|
||||
.withProps({
|
||||
title: constants.COPY_KEY2,
|
||||
iconPath: IconPathHelper.copy,
|
||||
height: IMAGE_SIZE,
|
||||
@@ -261,7 +261,7 @@ export class SqlMigrationServiceDetailsDialog {
|
||||
|
||||
const refreshKey1Button = view.modelBuilder
|
||||
.button()
|
||||
.withProperties<azdata.ComponentWithIconProperties>({
|
||||
.withProps({
|
||||
title: constants.REFRESH_KEY1,
|
||||
iconPath: IconPathHelper.refresh,
|
||||
height: IMAGE_SIZE,
|
||||
@@ -274,7 +274,7 @@ export class SqlMigrationServiceDetailsDialog {
|
||||
|
||||
const refreshKey2Button = view.modelBuilder
|
||||
.button()
|
||||
.withProperties<azdata.ComponentWithIconProperties>({
|
||||
.withProps({
|
||||
title: constants.REFRESH_KEY2,
|
||||
iconPath: IconPathHelper.refresh,
|
||||
height: IMAGE_SIZE,
|
||||
|
||||
@@ -312,7 +312,7 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
}
|
||||
}).component();
|
||||
|
||||
this._copy1 = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._copy1 = this._view.modelBuilder.button().withProps({
|
||||
title: constants.COPY_KEY1,
|
||||
iconPath: IconPathHelper.copy,
|
||||
ariaLabel: constants.COPY_KEY1,
|
||||
@@ -323,7 +323,7 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
vscode.window.showInformationMessage(constants.SERVICE_KEY1_COPIED_HELP);
|
||||
});
|
||||
|
||||
this._copy2 = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._copy2 = this._view.modelBuilder.button().withProps({
|
||||
title: constants.COPY_KEY2,
|
||||
iconPath: IconPathHelper.copy,
|
||||
ariaLabel: constants.COPY_KEY2,
|
||||
@@ -334,13 +334,13 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
vscode.window.showInformationMessage(constants.SERVICE_KEY2_COPIED_HELP);
|
||||
});
|
||||
|
||||
this._refresh1 = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._refresh1 = this._view.modelBuilder.button().withProps({
|
||||
title: constants.REFRESH_KEY1,
|
||||
iconPath: IconPathHelper.refresh,
|
||||
ariaLabel: constants.REFRESH_KEY1,
|
||||
}).component();
|
||||
|
||||
this._refresh2 = this._view.modelBuilder.button().withProperties<azdata.ComponentWithIconProperties>({
|
||||
this._refresh2 = this._view.modelBuilder.button().withProps({
|
||||
title: constants.REFRESH_KEY2,
|
||||
iconPath: IconPathHelper.refresh,
|
||||
ariaLabel: constants.REFRESH_KEY2,
|
||||
|
||||
@@ -52,7 +52,7 @@ export class SubscriptionSelectionPage extends MigrationWizardPage {
|
||||
}
|
||||
|
||||
private createAccountDropDown(view: azdata.ModelView): azdata.FormComponent<azdata.DropDownComponent> {
|
||||
const dropDown = view.modelBuilder.dropDown().withProperties<azdata.DropDownProperties>({
|
||||
const dropDown = view.modelBuilder.dropDown().withProps({
|
||||
ariaLabel: SUBSCRIPTION_SELECTION_AZURE_ACCOUNT_TITLE,
|
||||
values: [],
|
||||
editable: true,
|
||||
@@ -70,7 +70,7 @@ export class SubscriptionSelectionPage extends MigrationWizardPage {
|
||||
}
|
||||
|
||||
private createSubscriptionDropDown(view: azdata.ModelView): azdata.FormComponent<azdata.DropDownComponent> {
|
||||
const dropDown = view.modelBuilder.dropDown().withProperties<azdata.DropDownProperties>({
|
||||
const dropDown = view.modelBuilder.dropDown().withProps({
|
||||
ariaLabel: SUBSCRIPTION_SELECTION_AZURE_SUBSCRIPTION_TITLE,
|
||||
values: [],
|
||||
editable: true,
|
||||
@@ -88,7 +88,7 @@ export class SubscriptionSelectionPage extends MigrationWizardPage {
|
||||
}
|
||||
|
||||
private createProductDropDown(view: azdata.ModelView): azdata.FormComponent<azdata.DropDownComponent> {
|
||||
const dropDown = view.modelBuilder.dropDown().withProperties<azdata.DropDownProperties>({
|
||||
const dropDown = view.modelBuilder.dropDown().withProps({
|
||||
ariaLabel: SUBSCRIPTION_SELECTION_AZURE_PRODUCT_TITLE,
|
||||
values: [],
|
||||
editable: true,
|
||||
|
||||
Reference in New Issue
Block a user