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:
@@ -117,13 +117,13 @@ export class AddControllerDialog {
|
||||
}
|
||||
|
||||
private createDialog(): void {
|
||||
this.dialog = azdata.window.createModelViewDialog(localize('textAddNewController', 'Add New Controller'));
|
||||
this.dialog = azdata.window.createModelViewDialog(localize('textAddNewController', "Add New Controller"));
|
||||
this.dialog.registerContent(async view => {
|
||||
this.uiModelBuilder = view.modelBuilder;
|
||||
|
||||
this.urlInputBox = this.uiModelBuilder.inputBox()
|
||||
.withProperties<azdata.InputBoxProperties>({
|
||||
placeHolder: localize('textUrlLower', 'url'),
|
||||
placeHolder: localize('textUrlLower', "url"),
|
||||
value: this.model.prefilledUrl
|
||||
}).component();
|
||||
this.authDropdown = this.uiModelBuilder.dropDown().withProperties({
|
||||
@@ -134,19 +134,19 @@ export class AddControllerDialog {
|
||||
this.authDropdown.onValueChanged(e => this.onAuthChanged());
|
||||
this.usernameInputBox = this.uiModelBuilder.inputBox()
|
||||
.withProperties<azdata.InputBoxProperties>({
|
||||
placeHolder: localize('textUsernameLower', 'username'),
|
||||
placeHolder: localize('textUsernameLower', "username"),
|
||||
value: this.model.prefilledUsername
|
||||
}).component();
|
||||
this.passwordInputBox = this.uiModelBuilder.inputBox()
|
||||
.withProperties<azdata.InputBoxProperties>({
|
||||
placeHolder: localize('textPasswordLower', 'password'),
|
||||
placeHolder: localize('textPasswordLower', "password"),
|
||||
inputType: 'password',
|
||||
value: this.model.prefilledPassword
|
||||
})
|
||||
.component();
|
||||
this.rememberPwCheckBox = this.uiModelBuilder.checkBox()
|
||||
.withProperties<azdata.CheckBoxProperties>({
|
||||
label: localize('textRememberPassword', 'Remember Password'),
|
||||
label: localize('textRememberPassword', "Remember Password"),
|
||||
checked: this.model.prefilledRememberPassword
|
||||
}).component();
|
||||
|
||||
@@ -155,19 +155,19 @@ export class AddControllerDialog {
|
||||
components: [
|
||||
{
|
||||
component: this.urlInputBox,
|
||||
title: localize('textUrlCapital', 'URL'),
|
||||
title: localize('textUrlCapital', "URL"),
|
||||
required: true
|
||||
}, {
|
||||
component: this.authDropdown,
|
||||
title: localize('textAuthCapital', 'Authentication type'),
|
||||
title: localize('textAuthCapital', "Authentication type"),
|
||||
required: true
|
||||
}, {
|
||||
component: this.usernameInputBox,
|
||||
title: localize('textUsernameCapital', 'Username'),
|
||||
title: localize('textUsernameCapital', "Username"),
|
||||
required: false
|
||||
}, {
|
||||
component: this.passwordInputBox,
|
||||
title: localize('textPasswordCapital', 'Password'),
|
||||
title: localize('textPasswordCapital', "Password"),
|
||||
required: false
|
||||
}, {
|
||||
component: this.rememberPwCheckBox,
|
||||
@@ -182,8 +182,8 @@ export class AddControllerDialog {
|
||||
|
||||
this.dialog.registerCloseValidator(async () => await this.validate());
|
||||
this.dialog.cancelButton.onClick(async () => await this.cancel());
|
||||
this.dialog.okButton.label = localize('textAdd', 'Add');
|
||||
this.dialog.cancelButton.label = localize('textCancel', 'Cancel');
|
||||
this.dialog.okButton.label = localize('textAdd', "Add");
|
||||
this.dialog.cancelButton.label = localize('textCancel', "Cancel");
|
||||
}
|
||||
|
||||
private get authValue(): AuthType {
|
||||
|
||||
@@ -125,7 +125,7 @@ export class BdcDashboard {
|
||||
|
||||
// Overview nav item - this will be the initial page
|
||||
const overviewNavItemDiv = modelView.modelBuilder.divContainer().withLayout({ width: navWidth, height: '30px' }).withProperties({ clickable: true }).component();
|
||||
const overviewNavItemText = modelView.modelBuilder.text().withProperties({ value: localize('bdc.dashboard.overviewNavTitle', 'Big data cluster overview') }).component();
|
||||
const overviewNavItemText = modelView.modelBuilder.text().withProperties({ value: localize('bdc.dashboard.overviewNavTitle', "Big data cluster overview") }).component();
|
||||
overviewNavItemText.updateCssStyles(selectedTabCss);
|
||||
overviewNavItemDiv.addItem(overviewNavItemText, { CSSStyles: { 'user-select': 'text' } });
|
||||
const overviewPage = new BdcDashboardOverviewPage(this, this.model).create(modelView);
|
||||
@@ -145,7 +145,7 @@ export class BdcDashboard {
|
||||
});
|
||||
this.navContainer.addItem(overviewNavItemDiv, { flex: '0 0 auto' });
|
||||
|
||||
const clusterDetailsHeader = modelView.modelBuilder.text().withProperties({ value: localize('bdc.dashboard.clusterDetails', 'Cluster Details'), CSSStyles: { 'margin-block-end': '0px' } }).component();
|
||||
const clusterDetailsHeader = modelView.modelBuilder.text().withProperties({ value: localize('bdc.dashboard.clusterDetails', "Cluster Details"), CSSStyles: { 'margin-block-end': '0px' } }).component();
|
||||
this.navContainer.addItem(clusterDetailsHeader, { CSSStyles: { 'user-select': 'none', 'font-weight': 'bold', 'border-bottom': 'solid 1px #ccc', 'margin-bottom': '10px' } });
|
||||
|
||||
await modelView.initializeModel(rootContainer);
|
||||
|
||||
@@ -28,7 +28,7 @@ export class AddControllerNode extends TreeNode {
|
||||
public getTreeItem(): vscode.TreeItem {
|
||||
let item = new vscode.TreeItem(this.label, vscode.TreeItemCollapsibleState.None);
|
||||
item.command = {
|
||||
title: localize('textConnectToController', 'Connect to Controller'),
|
||||
title: localize('textConnectToController', "Connect to Controller"),
|
||||
command: 'bigDataClusters.command.addController',
|
||||
arguments: [this]
|
||||
};
|
||||
|
||||
@@ -158,12 +158,12 @@ async function deleteBdcController(treeDataProvider: ControllerTreeDataProvider,
|
||||
let controllerNode = node as ControllerNode;
|
||||
|
||||
let choices: { [id: string]: boolean } = {};
|
||||
choices[localize('textYes', 'Yes')] = true;
|
||||
choices[localize('textNo', 'No')] = false;
|
||||
choices[localize('textYes', "Yes")] = true;
|
||||
choices[localize('textNo', "No")] = false;
|
||||
|
||||
let options = {
|
||||
ignoreFocusOut: false,
|
||||
placeHolder: localize('textConfirmDeleteController', 'Are you sure you want to delete \'{0}\'?', controllerNode.label)
|
||||
placeHolder: localize('textConfirmDeleteController', "Are you sure you want to delete \'{0}\'?", controllerNode.label)
|
||||
};
|
||||
|
||||
let result = await vscode.window.showQuickPick(Object.keys(choices), options);
|
||||
|
||||
Reference in New Issue
Block a user