mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Hygiene linting for extensions + new rule (#7843)
* linting for extensions + new rule * Remove unneeded array * Fix spelling mistake * Fix bad merge
This commit is contained in:
@@ -74,7 +74,7 @@ export abstract class BasePage {
|
||||
let srv = c.options.server;
|
||||
|
||||
if (!usr) {
|
||||
usr = localize('basePage.defaultUser', 'default');
|
||||
usr = localize('basePage.defaultUser', "default");
|
||||
}
|
||||
|
||||
let finalName = `${srv} (${usr})`;
|
||||
|
||||
@@ -110,13 +110,13 @@ export class DataTierApplicationWizard {
|
||||
this.model.serverId = this.connection.connectionId;
|
||||
|
||||
this.wizard = azdata.window.createWizard('Data-tier Application Wizard');
|
||||
let selectOperationWizardPage = azdata.window.createWizardPage(localize('dacFx.selectOperationPageName', 'Select an Operation'));
|
||||
let deployConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.deployConfigPageName', 'Select Deploy Dacpac Settings'));
|
||||
let deployPlanWizardPage = azdata.window.createWizardPage(localize('dacFx.deployPlanPage', 'Review the deploy plan'));
|
||||
let summaryWizardPage = azdata.window.createWizardPage(localize('dacFx.summaryPageName', 'Summary'));
|
||||
let extractConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.extractConfigPageName', 'Select Extract Dacpac Settings'));
|
||||
let importConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.importConfigPageName', 'Select Import Bacpac Settings'));
|
||||
let exportConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.exportConfigPageName', 'Select Export Bacpac Settings'));
|
||||
let selectOperationWizardPage = azdata.window.createWizardPage(localize('dacFx.selectOperationPageName', "Select an Operation"));
|
||||
let deployConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.deployConfigPageName', "Select Deploy Dacpac Settings"));
|
||||
let deployPlanWizardPage = azdata.window.createWizardPage(localize('dacFx.deployPlanPage', "Review the deploy plan"));
|
||||
let summaryWizardPage = azdata.window.createWizardPage(localize('dacFx.summaryPageName', "Summary"));
|
||||
let extractConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.extractConfigPageName', "Select Extract Dacpac Settings"));
|
||||
let importConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.importConfigPageName', "Select Import Bacpac Settings"));
|
||||
let exportConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.exportConfigPageName', "Select Export Bacpac Settings"));
|
||||
|
||||
this.pages.set(PageName.selectOperation, new Page(selectOperationWizardPage));
|
||||
this.pages.set(PageName.deployConfig, new Page(deployConfigWizardPage));
|
||||
@@ -201,27 +201,27 @@ export class DataTierApplicationWizard {
|
||||
public setDoneButton(operation: Operation): void {
|
||||
switch (operation) {
|
||||
case Operation.deploy: {
|
||||
this.wizard.doneButton.label = localize('dacFx.deployButton', 'Deploy');
|
||||
this.wizard.doneButton.label = localize('dacFx.deployButton', "Deploy");
|
||||
this.selectedOperation = Operation.deploy;
|
||||
break;
|
||||
}
|
||||
case Operation.extract: {
|
||||
this.wizard.doneButton.label = localize('dacFx.extractButton', 'Extract');
|
||||
this.wizard.doneButton.label = localize('dacFx.extractButton', "Extract");
|
||||
this.selectedOperation = Operation.extract;
|
||||
break;
|
||||
}
|
||||
case Operation.import: {
|
||||
this.wizard.doneButton.label = localize('dacFx.importButton', 'Import');
|
||||
this.wizard.doneButton.label = localize('dacFx.importButton', "Import");
|
||||
this.selectedOperation = Operation.import;
|
||||
break;
|
||||
}
|
||||
case Operation.export: {
|
||||
this.wizard.doneButton.label = localize('dacFx.exportButton', 'Export');
|
||||
this.wizard.doneButton.label = localize('dacFx.exportButton', "Export");
|
||||
this.selectedOperation = Operation.export;
|
||||
break;
|
||||
}
|
||||
case Operation.generateDeployScript: {
|
||||
this.wizard.doneButton.label = localize('dacFx.generateScriptButton', 'Generate Script');
|
||||
this.wizard.doneButton.label = localize('dacFx.generateScriptButton', "Generate Script");
|
||||
this.selectedOperation = Operation.generateDeployScript;
|
||||
break;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ export class DataTierApplicationWizard {
|
||||
const service = await DataTierApplicationWizard.getService(msSqlProvider);
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
this.wizard.message = {
|
||||
text: localize('dacfx.scriptGeneratingMessage', 'You can view the status of script generation in the Tasks View once the wizard is closed. The generated script will open when complete.'),
|
||||
text: localize('dacfx.scriptGeneratingMessage', "You can view the status of script generation in the Tasks View once the wizard is closed. The generated script will open when complete."),
|
||||
level: azdata.window.MessageLevel.Information,
|
||||
description: ''
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ export class DacFxSummaryPage extends BasePage {
|
||||
|
||||
async start(): Promise<boolean> {
|
||||
this.table = this.view.modelBuilder.table().withProperties({
|
||||
title: localize('dacfx.summaryTableTitle', 'Summary of settings')
|
||||
title: localize('dacfx.summaryTableTitle', "Summary of settings")
|
||||
}).component();
|
||||
this.loader = this.view.modelBuilder.loadingComponent().withItem(this.table).component();
|
||||
this.form = this.view.modelBuilder.formContainer().withFormItems(
|
||||
@@ -76,11 +76,11 @@ export class DacFxSummaryPage extends BasePage {
|
||||
|
||||
private populateTable() {
|
||||
let data = [];
|
||||
let targetServer = localize('dacfx.targetServerName', 'Target Server');
|
||||
let targetDatabase = localize('dacfx.targetDatabaseName', 'Target Database');
|
||||
let sourceServer = localize('dacfx.sourceServerName', 'Source Server');
|
||||
let sourceDatabase = localize('dacfx.sourceDatabaseName', 'Source Database');
|
||||
let fileLocation = localize('dacfx.fileLocation', 'File Location');
|
||||
let targetServer = localize('dacfx.targetServerName', "Target Server");
|
||||
let targetDatabase = localize('dacfx.targetDatabaseName', "Target Database");
|
||||
let sourceServer = localize('dacfx.sourceServerName', "Source Server");
|
||||
let sourceDatabase = localize('dacfx.sourceDatabaseName', "Source Database");
|
||||
let fileLocation = localize('dacfx.fileLocation', "File Location");
|
||||
|
||||
switch (this.instance.selectedOperation) {
|
||||
case Operation.deploy: {
|
||||
@@ -94,7 +94,7 @@ export class DacFxSummaryPage extends BasePage {
|
||||
data = [
|
||||
[sourceServer, this.model.serverName],
|
||||
[sourceDatabase, this.model.database],
|
||||
[localize('dacfxExtract.version', 'Version'), this.model.version],
|
||||
[localize('dacfxExtract.version', "Version"), this.model.version],
|
||||
[fileLocation, this.model.filePath]];
|
||||
break;
|
||||
}
|
||||
@@ -125,11 +125,11 @@ export class DacFxSummaryPage extends BasePage {
|
||||
data: data,
|
||||
columns: [
|
||||
{
|
||||
value: localize('dacfx.settingColumn', 'Setting'),
|
||||
value: localize('dacfx.settingColumn', "Setting"),
|
||||
cssClass: 'align-with-header'
|
||||
},
|
||||
{
|
||||
value: localize('dacfx.valueColumn', 'Value'),
|
||||
value: localize('dacfx.valueColumn', "Value"),
|
||||
cssClass: 'align-with-header'
|
||||
}],
|
||||
width: 700,
|
||||
|
||||
@@ -37,7 +37,7 @@ export class DeployConfigPage extends DacFxConfigPage {
|
||||
let fileBrowserComponent = await this.createFileBrowser();
|
||||
this.databaseComponent = await this.createDatabaseTextBox(localize('dacFx.databaseNameTextBox', "Database Name"));
|
||||
this.databaseDropdownComponent = await this.createDeployDatabaseDropdown();
|
||||
this.databaseDropdownComponent.title = localize('dacFx.databaseNameDropdown', 'Database Name');
|
||||
this.databaseDropdownComponent.title = localize('dacFx.databaseNameDropdown', "Database Name");
|
||||
let radioButtons = await this.createRadiobuttons();
|
||||
|
||||
this.formBuilder = this.view.modelBuilder.formContainer()
|
||||
@@ -73,7 +73,7 @@ export class DeployConfigPage extends DacFxConfigPage {
|
||||
canSelectFolders: false,
|
||||
canSelectMany: false,
|
||||
defaultUri: vscode.Uri.file(this.getRootPath()),
|
||||
openLabel: localize('dacFxDeploy.openFile', 'Open'),
|
||||
openLabel: localize('dacFxDeploy.openFile', "Open"),
|
||||
filters: {
|
||||
'dacpac Files': ['dacpac'],
|
||||
}
|
||||
@@ -99,7 +99,7 @@ export class DeployConfigPage extends DacFxConfigPage {
|
||||
|
||||
return {
|
||||
component: this.fileTextBox,
|
||||
title: localize('dacFxDeploy.fileTextboxTitle', 'File Location'),
|
||||
title: localize('dacFxDeploy.fileTextboxTitle', "File Location"),
|
||||
actions: [this.fileButton]
|
||||
};
|
||||
}
|
||||
@@ -108,13 +108,13 @@ export class DeployConfigPage extends DacFxConfigPage {
|
||||
let upgradeRadioButton = this.view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
name: 'updateExisting',
|
||||
label: localize('dacFx.upgradeRadioButtonLabel', 'Upgrade Existing Database'),
|
||||
label: localize('dacFx.upgradeRadioButtonLabel', "Upgrade Existing Database"),
|
||||
}).component();
|
||||
|
||||
let newRadioButton = this.view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
name: 'updateExisting',
|
||||
label: localize('dacFx.newRadioButtonLabel', 'New Database'),
|
||||
label: localize('dacFx.newRadioButtonLabel', "New Database"),
|
||||
}).component();
|
||||
|
||||
upgradeRadioButton.onDidClick(() => {
|
||||
@@ -158,7 +158,7 @@ export class DeployConfigPage extends DacFxConfigPage {
|
||||
|
||||
return {
|
||||
component: flexRadioButtonsModel,
|
||||
title: localize('dacFx.targetDatabaseRadioButtonsTitle', 'Target Database')
|
||||
title: localize('dacFx.targetDatabaseRadioButtonsTitle', "Target Database")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ export class DeployPlanPage extends DacFxConfigPage {
|
||||
if (result.dataLossAlerts.size > 0) {
|
||||
// update message to list how many operations could result in data loss
|
||||
this.dataLossText.updateProperties({
|
||||
value: localize('dacfx.dataLossTextWithCount', '{0} of the deploy actions listed may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.', result.dataLossAlerts.size)
|
||||
value: localize('dacfx.dataLossTextWithCount', "{0} of the deploy actions listed may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.", result.dataLossAlerts.size)
|
||||
});
|
||||
this.dataLossCheckbox.enabled = true;
|
||||
} else {
|
||||
@@ -121,7 +121,7 @@ export class DeployPlanPage extends DacFxConfigPage {
|
||||
this.dataLossCheckbox = this.view.modelBuilder.checkBox()
|
||||
.withValidation(component => component.checked === true)
|
||||
.withProperties({
|
||||
label: localize('dacFx.dataLossCheckbox', 'Proceed despite possible data loss'),
|
||||
label: localize('dacFx.dataLossCheckbox', "Proceed despite possible data loss"),
|
||||
}).component();
|
||||
|
||||
return {
|
||||
@@ -134,7 +134,7 @@ export class DeployPlanPage extends DacFxConfigPage {
|
||||
private async createNoDataLossText(): Promise<azdata.FormComponent> {
|
||||
let noDataLossText = this.view.modelBuilder.text()
|
||||
.withProperties({
|
||||
value: localize('dacfx.noDataLossText', 'No data loss will occur from the listed deploy actions.')
|
||||
value: localize('dacfx.noDataLossText', "No data loss will occur from the listed deploy actions.")
|
||||
}).component();
|
||||
|
||||
return {
|
||||
@@ -147,7 +147,7 @@ export class DeployPlanPage extends DacFxConfigPage {
|
||||
let dataLossComponent = await this.createDataLossCheckbox();
|
||||
this.dataLossText = this.view.modelBuilder.text()
|
||||
.withProperties({
|
||||
value: localize('dacfx.dataLossText', 'The deploy actions may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.')
|
||||
value: localize('dacfx.dataLossText', "The deploy actions may result in data loss. Please ensure you have a backup or snapshot available in the event of an issue with the deployment.")
|
||||
}).component();
|
||||
|
||||
return {
|
||||
@@ -180,31 +180,31 @@ export class DeployPlanPage extends DacFxConfigPage {
|
||||
private getTableColumns(dataloss: boolean): azdata.TableColumn[] {
|
||||
let columns: azdata.TableColumn[] = [
|
||||
{
|
||||
value: localize('dacfx.operationColumn', 'Operation'),
|
||||
value: localize('dacfx.operationColumn', "Operation"),
|
||||
width: 75,
|
||||
cssClass: 'align-with-header',
|
||||
toolTip: localize('dacfx.operationTooltip', 'Operation(Create, Alter, Delete) that will occur during deployment')
|
||||
toolTip: localize('dacfx.operationTooltip', "Operation(Create, Alter, Delete) that will occur during deployment")
|
||||
},
|
||||
{
|
||||
value: localize('dacfx.typeColumn', 'Type'),
|
||||
value: localize('dacfx.typeColumn', "Type"),
|
||||
width: 100,
|
||||
cssClass: 'align-with-header',
|
||||
toolTip: localize('dacfx.typeTooltip', 'Type of object that will be affected by deployment')
|
||||
toolTip: localize('dacfx.typeTooltip', "Type of object that will be affected by deployment")
|
||||
},
|
||||
{
|
||||
value: localize('dacfx.objectColumn', 'Object'),
|
||||
value: localize('dacfx.objectColumn', "Object"),
|
||||
width: 300,
|
||||
cssClass: 'align-with-header',
|
||||
toolTip: localize('dacfx.objecTooltip', 'Name of object that will be affected by deployment')
|
||||
toolTip: localize('dacfx.objecTooltip', "Name of object that will be affected by deployment")
|
||||
}];
|
||||
|
||||
if (dataloss) {
|
||||
columns.unshift(
|
||||
{
|
||||
value: localize('dacfx.dataLossColumn', 'Data Loss'),
|
||||
value: localize('dacfx.dataLossColumn', "Data Loss"),
|
||||
width: 50,
|
||||
cssClass: 'center-align',
|
||||
toolTip: localize('dacfx.dataLossTooltip', 'Operations that may result in data loss are marked with a warning sign')
|
||||
toolTip: localize('dacfx.dataLossTooltip', "Operations that may result in data loss are marked with a warning sign")
|
||||
});
|
||||
}
|
||||
return columns;
|
||||
|
||||
@@ -78,7 +78,7 @@ export class ExportConfigPage extends DacFxConfigPage {
|
||||
let fileUri = await vscode.window.showSaveDialog(
|
||||
{
|
||||
defaultUri: vscode.Uri.file(this.fileTextBox.value),
|
||||
saveLabel: localize('dacfxExport.saveFile', 'Save'),
|
||||
saveLabel: localize('dacfxExport.saveFile', "Save"),
|
||||
filters: {
|
||||
'bacpac Files': ['bacpac'],
|
||||
}
|
||||
@@ -99,7 +99,7 @@ export class ExportConfigPage extends DacFxConfigPage {
|
||||
|
||||
return {
|
||||
component: this.fileTextBox,
|
||||
title: localize('dacFxExport.fileTextboxTitle', 'File Location'),
|
||||
title: localize('dacFxExport.fileTextboxTitle', "File Location"),
|
||||
actions: [this.fileButton]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
|
||||
let fileUri = await vscode.window.showSaveDialog(
|
||||
{
|
||||
defaultUri: vscode.Uri.file(this.fileTextBox.value),
|
||||
saveLabel: localize('dacfxExtract.saveFile', 'Save'),
|
||||
saveLabel: localize('dacfxExtract.saveFile', "Save"),
|
||||
filters: {
|
||||
'dacpac Files': ['dacpac'],
|
||||
}
|
||||
@@ -101,7 +101,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
|
||||
|
||||
return {
|
||||
component: this.fileTextBox,
|
||||
title: localize('dacFxExtract.fileTextboxTitle', 'File Location'),
|
||||
title: localize('dacFxExtract.fileTextboxTitle', "File Location"),
|
||||
actions: [this.fileButton]
|
||||
};
|
||||
}
|
||||
@@ -109,7 +109,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
|
||||
private async createVersionTextBox(): Promise<azdata.FormComponent> {
|
||||
this.versionTextBox = this.view.modelBuilder.inputBox().withProperties({
|
||||
required: true,
|
||||
ariaLabel: localize('dacFxExtract.versionTextBoxAriaLabel', 'Version')
|
||||
ariaLabel: localize('dacFxExtract.versionTextBoxAriaLabel', "Version")
|
||||
}).component();
|
||||
|
||||
// default version
|
||||
@@ -122,7 +122,7 @@ export class ExtractConfigPage extends DacFxConfigPage {
|
||||
|
||||
return {
|
||||
component: this.versionTextBox,
|
||||
title: localize('dacFxExtract.versionTextboxTitle', 'Version (use x.x.x.x where x is a number)'),
|
||||
title: localize('dacFxExtract.versionTextboxTitle', "Version (use x.x.x.x where x is a number)"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export class ImportConfigPage extends DacFxConfigPage {
|
||||
canSelectFolders: false,
|
||||
canSelectMany: false,
|
||||
defaultUri: vscode.Uri.file(this.getRootPath()),
|
||||
openLabel: localize('dacFxImport.openFile', 'Open'),
|
||||
openLabel: localize('dacFxImport.openFile', "Open"),
|
||||
filters: {
|
||||
'bacpac Files': ['bacpac'],
|
||||
}
|
||||
@@ -89,7 +89,7 @@ export class ImportConfigPage extends DacFxConfigPage {
|
||||
|
||||
return {
|
||||
component: this.fileTextBox,
|
||||
title: localize('dacFxImport.fileTextboxTitle', 'File Location'),
|
||||
title: localize('dacFxImport.fileTextboxTitle', "File Location"),
|
||||
actions: [this.fileButton]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export class SelectOperationPage extends BasePage {
|
||||
this.deployRadioButton = this.view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
name: 'selectedOperation',
|
||||
label: localize('dacFx.deployRadioButtonLabel', 'Deploy a data-tier application .dacpac file to an instance of SQL Server [Deploy Dacpac]'),
|
||||
label: localize('dacFx.deployRadioButtonLabel', "Deploy a data-tier application .dacpac file to an instance of SQL Server [Deploy Dacpac]"),
|
||||
}).component();
|
||||
|
||||
this.deployRadioButton.onDidClick(() => {
|
||||
@@ -94,7 +94,7 @@ export class SelectOperationPage extends BasePage {
|
||||
this.extractRadioButton = this.view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
name: 'selectedOperation',
|
||||
label: localize('dacFx.extractRadioButtonLabel', 'Extract a data-tier application from an instance of SQL Server to a .dacpac file [Extract Dacpac]'),
|
||||
label: localize('dacFx.extractRadioButtonLabel', "Extract a data-tier application from an instance of SQL Server to a .dacpac file [Extract Dacpac]"),
|
||||
}).component();
|
||||
|
||||
this.extractRadioButton.onDidClick(() => {
|
||||
@@ -119,7 +119,7 @@ export class SelectOperationPage extends BasePage {
|
||||
this.importRadioButton = this.view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
name: 'selectedOperation',
|
||||
label: localize('dacFx.importRadioButtonLabel', 'Create a database from a .bacpac file [Import Bacpac]'),
|
||||
label: localize('dacFx.importRadioButtonLabel', "Create a database from a .bacpac file [Import Bacpac]"),
|
||||
}).component();
|
||||
|
||||
this.importRadioButton.onDidClick(() => {
|
||||
@@ -144,7 +144,7 @@ export class SelectOperationPage extends BasePage {
|
||||
this.exportRadioButton = this.view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
name: 'selectedOperation',
|
||||
label: localize('dacFx.exportRadioButtonLabel', 'Export the schema and data from a database to the logical .bacpac file format [Export Bacpac]'),
|
||||
label: localize('dacFx.exportRadioButtonLabel', "Export the schema and data from a database to the logical .bacpac file format [Export Bacpac]"),
|
||||
}).component();
|
||||
|
||||
this.exportRadioButton.onDidClick(() => {
|
||||
|
||||
Reference in New Issue
Block a user