mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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:
@@ -23,7 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
const resourceTypes = resourceTypeService.getResourceTypes();
|
||||
const validationFailures = resourceTypeService.validateResourceTypes(resourceTypes);
|
||||
if (validationFailures.length !== 0) {
|
||||
const errorMessage = localize('resourceDeployment.FailedToLoadExtension', 'Failed to load extension: {0}, Error detected in the resource type definition in package.json, check debug console for details.', context.extensionPath);
|
||||
const errorMessage = localize('resourceDeployment.FailedToLoadExtension', "Failed to load extension: {0}, Error detected in the resource type definition in package.json, check debug console for details.", context.extensionPath);
|
||||
vscode.window.showErrorMessage(errorMessage);
|
||||
validationFailures.forEach(message => console.error(message));
|
||||
return;
|
||||
@@ -31,7 +31,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
const openDialog = (resourceTypeName: string) => {
|
||||
const filtered = resourceTypes.filter(resourceType => resourceType.name === resourceTypeName);
|
||||
if (filtered.length !== 1) {
|
||||
vscode.window.showErrorMessage(localize('resourceDeployment.UnknownResourceType', 'The resource type: {0} is not defined', resourceTypeName));
|
||||
vscode.window.showErrorMessage(localize('resourceDeployment.UnknownResourceType', "The resource type: {0} is not defined", resourceTypeName));
|
||||
} else {
|
||||
const dialog = new ResourceTypePickerDialog(toolsService, resourceTypeService, filtered[0]);
|
||||
dialog.open();
|
||||
|
||||
@@ -54,7 +54,7 @@ export class DeployClusterWizard extends WizardBase<DeployClusterWizard, DeployC
|
||||
super(DeployClusterWizard.getTitle(wizardInfo.type), new DeployClusterWizardModel(wizardInfo.type));
|
||||
this._saveConfigButton = azdata.window.createButton(localize('deployCluster.SaveConfigFiles', "Save config files"), 'left');
|
||||
this._saveConfigButton.hidden = true;
|
||||
this._scriptToNotebookButton = azdata.window.createButton(localize('deployCluster.ScriptToNotebook', 'Script to Notebook'), 'left');
|
||||
this._scriptToNotebookButton = azdata.window.createButton(localize('deployCluster.ScriptToNotebook', "Script to Notebook"), 'left');
|
||||
this._scriptToNotebookButton.hidden = true;
|
||||
this.addButton(this._saveConfigButton);
|
||||
this.addButton(this._scriptToNotebookButton);
|
||||
|
||||
@@ -66,7 +66,7 @@ export class TargetClusterContextPage extends WizardPageBase<DeployClusterWizard
|
||||
let clusterSelected = this.wizard.model.getStringValue(ClusterContext_VariableName) !== undefined;
|
||||
if (!clusterSelected) {
|
||||
this.wizard.wizardObject.message = {
|
||||
text: localize('deployCluster.ClusterContextNotSelectedMessage', 'Please select a cluster context.'),
|
||||
text: localize('deployCluster.ClusterContextNotSelectedMessage', "Please select a cluster context."),
|
||||
level: azdata.window.MessageLevel.Error
|
||||
};
|
||||
}
|
||||
@@ -83,17 +83,17 @@ export class TargetClusterContextPage extends WizardPageBase<DeployClusterWizard
|
||||
private initExistingClusterControl(): void {
|
||||
let self = this;
|
||||
const labelWidth = '150px';
|
||||
let configFileLabel = this.view!.modelBuilder.text().withProperties({ value: localize('deployCluster.kubeConfigFileLabelText', 'Kube config file path') }).component();
|
||||
let configFileLabel = this.view!.modelBuilder.text().withProperties({ value: localize('deployCluster.kubeConfigFileLabelText', "Kube config file path") }).component();
|
||||
configFileLabel.width = labelWidth;
|
||||
this.configFileInput = this.view!.modelBuilder.inputBox().withProperties({ width: '300px' }).component();
|
||||
this.configFileInput.enabled = false;
|
||||
this.browseFileButton = this.view!.modelBuilder.button().withProperties({ label: localize('deployCluster.browseText', 'Browse'), width: '100px' }).component();
|
||||
this.browseFileButton = this.view!.modelBuilder.button().withProperties({ label: localize('deployCluster.browseText', "Browse"), width: '100px' }).component();
|
||||
let configFileContainer = this.view!.modelBuilder.flexContainer()
|
||||
.withLayout({ flexFlow: 'row', alignItems: 'baseline' })
|
||||
.withItems([configFileLabel, this.configFileInput, this.browseFileButton], { CSSStyles: { 'margin-right': '10px' } }).component();
|
||||
this.clusterContextsLabel = this.view!.modelBuilder.text().withProperties({ value: localize('deployCluster.clusterContextsLabelText', 'Cluster Contexts') }).component();
|
||||
this.clusterContextsLabel = this.view!.modelBuilder.text().withProperties({ value: localize('deployCluster.clusterContextsLabelText', "Cluster Contexts") }).component();
|
||||
this.clusterContextsLabel.width = labelWidth;
|
||||
this.errorLoadingClustersLabel = this.view!.modelBuilder.text().withProperties({ value: localize('deployCluster.errorLoadingClustersText', 'No cluster information is found in the config file or an error ocurred while loading the config file') }).component();
|
||||
this.errorLoadingClustersLabel = this.view!.modelBuilder.text().withProperties({ value: localize('deployCluster.errorLoadingClustersText', "No cluster information is found in the config file or an error ocurred while loading the config file") }).component();
|
||||
this.clusterContextList = this.view!.modelBuilder.divContainer().component();
|
||||
this.clusterContextLoadingComponent = this.view!.modelBuilder.loadingComponent().withItem(this.clusterContextList).component();
|
||||
this.existingClusterControl = this.view!.modelBuilder.divContainer().withProperties<azdata.DivContainerProperties>({ clickable: false }).component();
|
||||
@@ -113,7 +113,7 @@ export class TargetClusterContextPage extends WizardPageBase<DeployClusterWizard
|
||||
canSelectFolders: false,
|
||||
canSelectMany: false,
|
||||
defaultUri: vscode.Uri.file(os.homedir()),
|
||||
openLabel: localize('deployCluster.selectKubeConfigFileText', 'Select'),
|
||||
openLabel: localize('deployCluster.selectKubeConfigFileText', "Select"),
|
||||
filters: {
|
||||
'Config Files': ['*'],
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class DeploymentInputDialog extends DialogBase {
|
||||
constructor(private notebookService: INotebookService,
|
||||
private dialogInfo: DialogInfo) {
|
||||
super(dialogInfo.title, dialogInfo.name, false);
|
||||
this._dialogObject.okButton.label = localize('deploymentDialog.OKButtonText', 'Open Notebook');
|
||||
this._dialogObject.okButton.label = localize('deploymentDialog.OKButtonText', "Open Notebook");
|
||||
}
|
||||
|
||||
protected initialize() {
|
||||
|
||||
Reference in New Issue
Block a user