mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Add compile options to a few extensions (#8252)
* add compile options to a few extensions * move dep to dev dep * fix return types
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
@@ -31,9 +30,9 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
return this.model.dialogMode;
|
||||
}
|
||||
|
||||
protected abstract async updateModel();
|
||||
protected abstract async updateModel(): Promise<void>;
|
||||
|
||||
protected abstract async initializeDialog(dialog: azdata.window.Dialog);
|
||||
protected abstract async initializeDialog(dialog: azdata.window.Dialog): Promise<void>;
|
||||
|
||||
public async openDialog(dialogName?: string) {
|
||||
if (!this._isOpen) {
|
||||
@@ -87,4 +86,4 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
public get isOpen(): boolean {
|
||||
return this._isOpen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import { AgentDialog } from './agentDialog';
|
||||
@@ -112,7 +110,6 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
||||
private static readonly IncludeErrorInEmailCheckBoxLabel: string = localize('alertDialog.IncludeErrorInEmail', "Include alert error text in e-mail");
|
||||
private static readonly IncludeErrorInPagerCheckBoxLabel: string = localize('alertDialog.IncludeErrorInPager', "Include alert error text in pager");
|
||||
private static readonly AdditionalMessageTextBoxLabel: string = localize('alertDialog.AdditionalNotification', "Additional notification message to send");
|
||||
private static readonly DelayBetweenResponsesTextBoxLabel: string = localize('alertDialog.DelayBetweenResponse', "Delay between responses");
|
||||
private static readonly DelayMinutesTextBoxLabel: string = localize('alertDialog.DelayMinutes', "Delay Minutes");
|
||||
private static readonly DelaySecondsTextBoxLabel: string = localize('alertDialog.DelaySeconds', "Delay Seconds");
|
||||
|
||||
@@ -526,7 +523,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
||||
return severityNumber;
|
||||
}
|
||||
|
||||
protected updateModel() {
|
||||
protected async updateModel(): Promise<void> {
|
||||
this.model.name = this.nameTextBox.value;
|
||||
this.model.isEnabled = this.enabledCheckBox.checked;
|
||||
this.model.jobId = this.jobId;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import { JobData } from '../data/jobData';
|
||||
@@ -59,7 +59,6 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
// Schedules tab strings
|
||||
private readonly SchedulesTopLabelString: string = localize('jobDialog.schedulesaLabel', "Schedules list");
|
||||
private readonly PickScheduleButtonString: string = localize('jobDialog.pickSchedule', "Pick Schedule");
|
||||
private readonly ScheduleNameLabelString: string = localize('jobDialog.scheduleNameLabel', "Schedule Name");
|
||||
|
||||
// Alerts tab strings
|
||||
private readonly AlertsTopLabelString: string = localize('jobDialog.alertsList', "Alerts list");
|
||||
@@ -98,7 +97,6 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
private removeScheduleButton: azdata.ButtonComponent;
|
||||
|
||||
// Notifications tab controls
|
||||
private notificationsTabTopLabel: azdata.TextComponent;
|
||||
private emailCheckBox: azdata.CheckBoxComponent;
|
||||
private emailOperatorDropdown: azdata.DropDownComponent;
|
||||
private emailConditionDropdown: azdata.DropDownComponent;
|
||||
@@ -549,7 +547,6 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
private initializeNotificationsTab() {
|
||||
this.notificationsTab.registerContent(async view => {
|
||||
|
||||
this.notificationsTabTopLabel = view.modelBuilder.text().withProperties({ value: this.NotificationsTabTopLabelString }).component();
|
||||
this.emailCheckBox = view.modelBuilder.checkBox().withProperties({
|
||||
label: this.EmailCheckBoxString,
|
||||
width: 80
|
||||
@@ -652,10 +649,10 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
});
|
||||
}
|
||||
|
||||
private convertStepsToData(jobSteps: azdata.AgentJobStepInfo[]): any[][] {
|
||||
let result = [];
|
||||
private convertStepsToData(jobSteps: azdata.AgentJobStepInfo[]): Array<string | number>[] {
|
||||
let result: Array<string | number>[] = [];
|
||||
jobSteps.forEach(jobStep => {
|
||||
let cols = [];
|
||||
let cols: Array<string | number> = [];
|
||||
cols.push(jobStep.id);
|
||||
cols.push(jobStep.stepName);
|
||||
cols.push(JobStepData.convertToSubSystemDisplayName(jobStep.subSystem));
|
||||
@@ -666,8 +663,8 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
return result;
|
||||
}
|
||||
|
||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): any[][] {
|
||||
let result = [];
|
||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): Array<string | number>[] {
|
||||
let result: Array<string | number>[] = [];
|
||||
jobSchedules.forEach(schedule => {
|
||||
let cols = [];
|
||||
cols.push(schedule.id);
|
||||
@@ -678,8 +675,8 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
return result;
|
||||
}
|
||||
|
||||
private convertAlertsToData(alerts: azdata.AgentAlertInfo[]): any[][] {
|
||||
let result = [];
|
||||
private convertAlertsToData(alerts: azdata.AgentAlertInfo[]): Array<string | boolean>[] {
|
||||
let result: Array<string | boolean>[] = [];
|
||||
alerts.forEach(alert => {
|
||||
let cols = [];
|
||||
cols.push(alert.name);
|
||||
@@ -690,7 +687,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
return result;
|
||||
}
|
||||
|
||||
protected updateModel() {
|
||||
protected async updateModel(): Promise<void> {
|
||||
this.model.name = this.nameTextBox.value;
|
||||
this.model.owner = this.ownerTextBox.value;
|
||||
this.model.enabled = this.enabledCheckBox.checked;
|
||||
|
||||
@@ -2,16 +2,15 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { JobStepData } from '../data/jobStepData';
|
||||
import { AgentUtils } from '../agentUtils';
|
||||
import { JobData } from '../data/jobData';
|
||||
import { AgentDialog } from './agentDialog';
|
||||
import { AgentDialogMode } from '../interfaces';
|
||||
const path = require('path');
|
||||
import * as path from 'path';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -153,7 +152,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
this.dialog.content = [this.generalTab, this.advancedTab];
|
||||
}
|
||||
|
||||
private createCommands(view, queryProvider: azdata.QueryProvider) {
|
||||
private createCommands(view: azdata.ModelView, queryProvider: azdata.QueryProvider) {
|
||||
this.openButton = view.modelBuilder.button()
|
||||
.withProperties({
|
||||
label: this.OpenCommandText,
|
||||
@@ -396,9 +395,9 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
});
|
||||
}
|
||||
|
||||
private createRetryCounters(view) {
|
||||
private createRetryCounters(view: azdata.ModelView) {
|
||||
this.retryAttemptsBox = view.modelBuilder.inputBox()
|
||||
.withValidation(component => component.value >= 0)
|
||||
.withValidation(component => Number(component.value) >= 0)
|
||||
.withProperties({
|
||||
inputType: 'number',
|
||||
width: '100%',
|
||||
@@ -406,7 +405,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
})
|
||||
.component();
|
||||
this.retryIntervalBox = view.modelBuilder.inputBox()
|
||||
.withValidation(component => component.value >= 0)
|
||||
.withValidation(component => Number(component.value) >= 0)
|
||||
.withProperties({
|
||||
inputType: 'number',
|
||||
width: '100%',
|
||||
@@ -491,7 +490,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
azdata.window.openDialog(this.fileBrowserDialog);
|
||||
}
|
||||
|
||||
private createTSQLOptions(view) {
|
||||
private createTSQLOptions(view: azdata.ModelView) {
|
||||
this.outputFileBrowserButton = view.modelBuilder.button()
|
||||
.withProperties({ width: '20px', label: '...' }).component();
|
||||
this.outputFileBrowserButton.onDidClick(() => this.openFileBrowserDialog());
|
||||
@@ -536,7 +535,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
return outputFileForm;
|
||||
}
|
||||
|
||||
protected updateModel() {
|
||||
protected async updateModel(): Promise<void> {
|
||||
this.model.stepName = this.nameTextBox.value;
|
||||
if (!this.model.stepName || this.model.stepName.length === 0) {
|
||||
this.dialog.message = this.dialog.message = { text: this.BlankStepNameErrorText };
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as path from 'path';
|
||||
import * as azdata from 'azdata';
|
||||
@@ -17,7 +17,6 @@ const localize = nls.loadMessageBundle();
|
||||
const CreateDialogTitle: string = localize('notebookDialog.newJob', "New Notebook Job");
|
||||
const EditDialogTitle: string = localize('notebookDialog.editJob', "Edit Notebook Job");
|
||||
const GeneralTabText: string = localize('notebookDialog.general', "General");
|
||||
const BlankJobNameErrorText: string = localize('notebookDialog.blankJobNameError', "The name of the job cannot be blank.");
|
||||
|
||||
// Notebook details strings
|
||||
const NotebookDetailsSeparatorTitle: string = localize('notebookDialog.notebookSection', "Notebook Details");
|
||||
@@ -33,7 +32,6 @@ const OwnerTextBoxLabel: string = localize('notebookDialog.owner', "Owner");
|
||||
const SchedulesTopLabelString: string = localize('notebookDialog.schedulesaLabel', "Schedules list");
|
||||
const PickScheduleButtonString: string = localize('notebookDialog.pickSchedule', "Pick Schedule");
|
||||
const RemoveScheduleButtonString: string = localize('notebookDialog.removeSchedule', "Remove Schedule");
|
||||
const ScheduleNameLabelString: string = localize('notebookDialog.scheduleNameLabel', "Schedule Name");
|
||||
const DescriptionTextBoxLabel: string = localize('notebookDialog.description', "Description");
|
||||
|
||||
// Event Name strings
|
||||
@@ -69,7 +67,6 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
||||
private isEdit: boolean = false;
|
||||
|
||||
// Job objects
|
||||
private steps: azdata.AgentJobStepInfo[];
|
||||
private schedules: azdata.AgentJobScheduleInfo[];
|
||||
|
||||
constructor(ownerUri: string, options: NotebookDialogOptions = undefined) {
|
||||
@@ -77,7 +74,6 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
||||
ownerUri,
|
||||
new NotebookData(ownerUri, options),
|
||||
options.notebookInfo ? EditDialogTitle : CreateDialogTitle);
|
||||
this.steps = this.model.jobSteps ? this.model.jobSteps : [];
|
||||
this.schedules = this.model.jobSchedules ? this.model.jobSchedules : [];
|
||||
this.isEdit = options.notebookInfo ? true : false;
|
||||
this.dialogName = this.isEdit ? EditJobDialogEvent : NewJobDialogEvent;
|
||||
@@ -280,10 +276,6 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
||||
else {
|
||||
this.templateFilePathBox.required = true;
|
||||
}
|
||||
let idx: number = undefined;
|
||||
if (this.model.category && this.model.category !== '') {
|
||||
idx = this.model.jobCategories.indexOf(this.model.category);
|
||||
}
|
||||
this.descriptionTextBox.value = this.model.description;
|
||||
this.openTemplateFileButton.onDidClick(e => {
|
||||
});
|
||||
@@ -298,14 +290,8 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
||||
|
||||
}
|
||||
|
||||
private createRowContainer(view: azdata.ModelView): azdata.FlexBuilder {
|
||||
return view.modelBuilder.flexContainer().withLayout({
|
||||
flexFlow: 'row',
|
||||
justifyContent: 'space-between'
|
||||
});
|
||||
}
|
||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): any[][] {
|
||||
let result = [];
|
||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): Array<string | number>[] {
|
||||
let result: Array<string | number>[] = [];
|
||||
jobSchedules.forEach(schedule => {
|
||||
let cols = [];
|
||||
cols.push(schedule.id);
|
||||
@@ -316,7 +302,7 @@ export class NotebookDialog extends AgentDialog<NotebookData> {
|
||||
return result;
|
||||
}
|
||||
|
||||
protected updateModel() {
|
||||
protected async updateModel(): Promise<void> {
|
||||
this.model.name = this.nameTextBox.value;
|
||||
this.model.owner = this.ownerTextBox.value;
|
||||
this.model.description = this.descriptionTextBox.value;
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { OperatorData } from '../data/operatorData';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { AgentDialog } from './agentDialog';
|
||||
@@ -409,7 +406,7 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
||||
});
|
||||
}
|
||||
|
||||
protected updateModel() {
|
||||
protected async updateModel(): Promise<void> {
|
||||
this.model.name = this.nameTextBox.value;
|
||||
this.model.enabled = this.enabledCheckBox.checked;
|
||||
this.model.emailAddress = this.emailNameTextBox.value;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import { AgentDialog } from './agentDialog';
|
||||
@@ -34,7 +32,6 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
||||
private static readonly SSASCommandLabel: string = localize('createProxy.SSASCommandLabel', "SQL Server Analysis Services Command");
|
||||
private static readonly SSISPackageLabel: string = localize('createProxy.SSISPackage', "SQL Server Integration Services Package");
|
||||
private static readonly PowerShellLabel: string = localize('createProxy.PowerShell', "PowerShell");
|
||||
private static readonly SubSystemHeadingLabel: string = localize('createProxy.subSystemHeading', "Active to the following subsytems");
|
||||
|
||||
private readonly NewProxyDialog = 'NewProxyDialogOpened';
|
||||
private readonly EditProxyDialog = 'EditProxyDialogOpened';
|
||||
@@ -189,7 +186,7 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
||||
label: ProxyDialog.PowerShellLabel
|
||||
}).component();
|
||||
|
||||
let checkBoxContainer = view.modelBuilder.groupContainer()
|
||||
view.modelBuilder.groupContainer()
|
||||
.withItems([this.operatingSystemCheckBox, this.replicationSnapshotCheckBox,
|
||||
this.replicationTransactionLogCheckBox, this.replicationDistributorCheckBox, this.replicationMergeCheckbox,
|
||||
this.replicationQueueReaderCheckbox, this.sqlQueryCheckBox, this.sqlCommandCheckBox, this.sqlIntegrationServicesPackageCheckbox,
|
||||
@@ -217,7 +214,7 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
||||
}
|
||||
|
||||
|
||||
protected updateModel() {
|
||||
protected async updateModel(): Promise<void> {
|
||||
this.model.accountName = this.proxyNameTextBox.value;
|
||||
this.model.credentialName = this.credentialNameDropDown.value as string;
|
||||
this.model.credentialId = this.credentials.find(
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
@@ -92,4 +91,4 @@ export class ScheduleDialog {
|
||||
this.model.selectedSchedule = this.model.schedules[selectedRow];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user