mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 02:02:35 -05:00
Update product references from 'sqlops' to 'azdata' (#4259)
* Update extensions to use azdata * Switch core code to use azdata
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
|
||||
|
||||
@@ -18,7 +18,7 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
|
||||
protected _onSuccess: vscode.EventEmitter<T> = new vscode.EventEmitter<T>();
|
||||
public readonly onSuccess: vscode.Event<T> = this._onSuccess.event;
|
||||
public dialog: sqlops.window.Dialog;
|
||||
public dialog: azdata.window.Dialog;
|
||||
|
||||
// Dialog Name for Telemetry
|
||||
public dialogName: string;
|
||||
@@ -32,11 +32,11 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
|
||||
protected abstract async updateModel();
|
||||
|
||||
protected abstract async initializeDialog(dialog: sqlops.window.Dialog);
|
||||
protected abstract async initializeDialog(dialog: azdata.window.Dialog);
|
||||
|
||||
public async openDialog(dialogName?: string) {
|
||||
let event = dialogName ? dialogName : null;
|
||||
this.dialog = sqlops.window.createModelViewDialog(this.title, event);
|
||||
this.dialog = azdata.window.createModelViewDialog(this.title, event);
|
||||
|
||||
await this.model.initialize();
|
||||
|
||||
@@ -48,7 +48,7 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
this.dialog.cancelButton.label = AgentDialog.CancelButtonText;
|
||||
this.dialog.cancelButton.onClick(async () => await this.cancel());
|
||||
|
||||
sqlops.window.openDialog(this.dialog);
|
||||
azdata.window.openDialog(this.dialog);
|
||||
}
|
||||
|
||||
protected async execute() {
|
||||
@@ -60,18 +60,18 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
protected async cancel() {
|
||||
}
|
||||
|
||||
protected getActualConditionValue(checkbox: sqlops.CheckBoxComponent, dropdown: sqlops.DropDownComponent): sqlops.JobCompletionActionCondition {
|
||||
return checkbox.checked ? Number(this.getDropdownValue(dropdown)) : sqlops.JobCompletionActionCondition.Never;
|
||||
protected getActualConditionValue(checkbox: azdata.CheckBoxComponent, dropdown: azdata.DropDownComponent): azdata.JobCompletionActionCondition {
|
||||
return checkbox.checked ? Number(this.getDropdownValue(dropdown)) : azdata.JobCompletionActionCondition.Never;
|
||||
}
|
||||
|
||||
protected getDropdownValue(dropdown: sqlops.DropDownComponent): string {
|
||||
protected getDropdownValue(dropdown: azdata.DropDownComponent): string {
|
||||
return (typeof dropdown.value === 'string') ? dropdown.value : dropdown.value.name;
|
||||
}
|
||||
|
||||
protected setConditionDropdownSelectedValue(dropdown: sqlops.DropDownComponent, selectedValue: number) {
|
||||
protected setConditionDropdownSelectedValue(dropdown: azdata.DropDownComponent, selectedValue: number) {
|
||||
let idx: number = 0;
|
||||
for (idx = 0; idx < dropdown.values.length; idx++) {
|
||||
if (Number((<sqlops.CategoryValue>dropdown.values[idx]).name) === selectedValue) {
|
||||
if (Number((<azdata.CategoryValue>dropdown.values[idx]).name) === selectedValue) {
|
||||
dropdown.value = dropdown.values[idx];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { AgentDialog } from './agentDialog';
|
||||
import { AgentUtils } from '../agentUtils';
|
||||
import { AlertData } from '../data/alertData';
|
||||
@@ -121,37 +121,37 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
||||
private readonly EditAlertDialog = 'EditAlertDialogOpened';
|
||||
|
||||
// UI Components
|
||||
private generalTab: sqlops.window.DialogTab;
|
||||
private responseTab: sqlops.window.DialogTab;
|
||||
private optionsTab: sqlops.window.DialogTab;
|
||||
private generalTab: azdata.window.DialogTab;
|
||||
private responseTab: azdata.window.DialogTab;
|
||||
private optionsTab: azdata.window.DialogTab;
|
||||
|
||||
// General tab controls
|
||||
private nameTextBox: sqlops.InputBoxComponent;
|
||||
private typeDropDown: sqlops.DropDownComponent;
|
||||
private severityDropDown: sqlops.DropDownComponent;
|
||||
private databaseDropDown: sqlops.DropDownComponent;
|
||||
private enabledCheckBox: sqlops.CheckBoxComponent;
|
||||
private errorNumberRadioButton: sqlops.RadioButtonComponent;
|
||||
private severityRadioButton: sqlops.RadioButtonComponent;
|
||||
private errorNumberTextBox: sqlops.InputBoxComponent;
|
||||
private nameTextBox: azdata.InputBoxComponent;
|
||||
private typeDropDown: azdata.DropDownComponent;
|
||||
private severityDropDown: azdata.DropDownComponent;
|
||||
private databaseDropDown: azdata.DropDownComponent;
|
||||
private enabledCheckBox: azdata.CheckBoxComponent;
|
||||
private errorNumberRadioButton: azdata.RadioButtonComponent;
|
||||
private severityRadioButton: azdata.RadioButtonComponent;
|
||||
private errorNumberTextBox: azdata.InputBoxComponent;
|
||||
|
||||
private raiseAlertMessageCheckBox: sqlops.CheckBoxComponent;
|
||||
private raiseAlertMessageTextBox: sqlops.InputBoxComponent;
|
||||
private raiseAlertMessageCheckBox: azdata.CheckBoxComponent;
|
||||
private raiseAlertMessageTextBox: azdata.InputBoxComponent;
|
||||
|
||||
// Response tab controls
|
||||
private executeJobTextBox: sqlops.InputBoxComponent;
|
||||
private executeJobCheckBox: sqlops.CheckBoxComponent;
|
||||
private newJobButton: sqlops.ButtonComponent;
|
||||
private notifyOperatorsCheckBox: sqlops.CheckBoxComponent;
|
||||
private operatorsTable: sqlops.TableComponent;
|
||||
private newOperatorButton: sqlops.ButtonComponent;
|
||||
private executeJobTextBox: azdata.InputBoxComponent;
|
||||
private executeJobCheckBox: azdata.CheckBoxComponent;
|
||||
private newJobButton: azdata.ButtonComponent;
|
||||
private notifyOperatorsCheckBox: azdata.CheckBoxComponent;
|
||||
private operatorsTable: azdata.TableComponent;
|
||||
private newOperatorButton: azdata.ButtonComponent;
|
||||
|
||||
// Options tab controls
|
||||
private additionalMessageTextBox: sqlops.InputBoxComponent;
|
||||
private includeErrorInEmailTextBox: sqlops.CheckBoxComponent;
|
||||
private includeErrorInPagerTextBox: sqlops.CheckBoxComponent;
|
||||
private delayMinutesTextBox: sqlops.InputBoxComponent;
|
||||
private delaySecondsTextBox: sqlops.InputBoxComponent;
|
||||
private additionalMessageTextBox: azdata.InputBoxComponent;
|
||||
private includeErrorInEmailTextBox: azdata.CheckBoxComponent;
|
||||
private includeErrorInPagerTextBox: azdata.CheckBoxComponent;
|
||||
private delayMinutesTextBox: azdata.InputBoxComponent;
|
||||
private delaySecondsTextBox: azdata.InputBoxComponent;
|
||||
|
||||
private isEdit: boolean = false;
|
||||
private databases: string[];
|
||||
@@ -162,7 +162,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
||||
constructor(
|
||||
ownerUri: string,
|
||||
jobModel: JobData,
|
||||
alertInfo: sqlops.AgentAlertInfo = undefined,
|
||||
alertInfo: azdata.AgentAlertInfo = undefined,
|
||||
viaJobDialog: boolean = false
|
||||
) {
|
||||
super(ownerUri,
|
||||
@@ -175,13 +175,13 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
||||
this.dialogName = this.isEdit ? this.EditAlertDialog : this.NewAlertDialog;
|
||||
}
|
||||
|
||||
protected async initializeDialog(dialog: sqlops.window.Dialog) {
|
||||
protected async initializeDialog(dialog: azdata.window.Dialog) {
|
||||
this.databases = await AgentUtils.getDatabases(this.ownerUri);
|
||||
this.databases.unshift(AlertDialog.AllDatabases);
|
||||
|
||||
this.generalTab = sqlops.window.createTab(AlertDialog.GeneralTabText);
|
||||
this.responseTab = sqlops.window.createTab(AlertDialog.ResponseTabText);
|
||||
this.optionsTab = sqlops.window.createTab(AlertDialog.OptionsTabText);
|
||||
this.generalTab = azdata.window.createTab(AlertDialog.GeneralTabText);
|
||||
this.responseTab = azdata.window.createTab(AlertDialog.ResponseTabText);
|
||||
this.optionsTab = azdata.window.createTab(AlertDialog.OptionsTabText);
|
||||
|
||||
this.initializeGeneralTab(this.databases, dialog);
|
||||
this.initializeResponseTab();
|
||||
@@ -190,7 +190,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
||||
dialog.content = [this.generalTab, this.responseTab, this.optionsTab];
|
||||
}
|
||||
|
||||
private initializeGeneralTab(databases: string[], dialog: sqlops.window.Dialog) {
|
||||
private initializeGeneralTab(databases: string[], dialog: azdata.window.Dialog) {
|
||||
this.generalTab.registerContent(async view => {
|
||||
// create controls
|
||||
this.nameTextBox = view.modelBuilder.inputBox().component();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { JobData } from '../data/jobData';
|
||||
import { JobStepDialog } from './jobStepDialog';
|
||||
import { PickScheduleDialog } from './pickScheduleDialog';
|
||||
@@ -73,60 +73,60 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
private readonly EditJobDialogEvent: string = 'EditJobDialogOpened';
|
||||
|
||||
// UI Components
|
||||
private generalTab: sqlops.window.DialogTab;
|
||||
private stepsTab: sqlops.window.DialogTab;
|
||||
private alertsTab: sqlops.window.DialogTab;
|
||||
private schedulesTab: sqlops.window.DialogTab;
|
||||
private notificationsTab: sqlops.window.DialogTab;
|
||||
private generalTab: azdata.window.DialogTab;
|
||||
private stepsTab: azdata.window.DialogTab;
|
||||
private alertsTab: azdata.window.DialogTab;
|
||||
private schedulesTab: azdata.window.DialogTab;
|
||||
private notificationsTab: azdata.window.DialogTab;
|
||||
|
||||
// General tab controls
|
||||
private nameTextBox: sqlops.InputBoxComponent;
|
||||
private ownerTextBox: sqlops.InputBoxComponent;
|
||||
private categoryDropdown: sqlops.DropDownComponent;
|
||||
private descriptionTextBox: sqlops.InputBoxComponent;
|
||||
private enabledCheckBox: sqlops.CheckBoxComponent;
|
||||
private nameTextBox: azdata.InputBoxComponent;
|
||||
private ownerTextBox: azdata.InputBoxComponent;
|
||||
private categoryDropdown: azdata.DropDownComponent;
|
||||
private descriptionTextBox: azdata.InputBoxComponent;
|
||||
private enabledCheckBox: azdata.CheckBoxComponent;
|
||||
|
||||
// Steps tab controls
|
||||
private stepsTable: sqlops.TableComponent;
|
||||
private newStepButton: sqlops.ButtonComponent;
|
||||
private moveStepUpButton: sqlops.ButtonComponent;
|
||||
private moveStepDownButton: sqlops.ButtonComponent;
|
||||
private editStepButton: sqlops.ButtonComponent;
|
||||
private deleteStepButton: sqlops.ButtonComponent;
|
||||
private stepsTable: azdata.TableComponent;
|
||||
private newStepButton: azdata.ButtonComponent;
|
||||
private moveStepUpButton: azdata.ButtonComponent;
|
||||
private moveStepDownButton: azdata.ButtonComponent;
|
||||
private editStepButton: azdata.ButtonComponent;
|
||||
private deleteStepButton: azdata.ButtonComponent;
|
||||
|
||||
// Schedule tab controls
|
||||
private removeScheduleButton: sqlops.ButtonComponent;
|
||||
private removeScheduleButton: azdata.ButtonComponent;
|
||||
|
||||
// Notifications tab controls
|
||||
private notificationsTabTopLabel: sqlops.TextComponent;
|
||||
private emailCheckBox: sqlops.CheckBoxComponent;
|
||||
private emailOperatorDropdown: sqlops.DropDownComponent;
|
||||
private emailConditionDropdown: sqlops.DropDownComponent;
|
||||
private pagerCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerOperatorDropdown: sqlops.DropDownComponent;
|
||||
private pagerConditionDropdown: sqlops.DropDownComponent;
|
||||
private eventLogCheckBox: sqlops.CheckBoxComponent;
|
||||
private eventLogConditionDropdown: sqlops.DropDownComponent;
|
||||
private deleteJobCheckBox: sqlops.CheckBoxComponent;
|
||||
private deleteJobConditionDropdown: sqlops.DropDownComponent;
|
||||
private startStepDropdown: sqlops.DropDownComponent;
|
||||
private notificationsTabTopLabel: azdata.TextComponent;
|
||||
private emailCheckBox: azdata.CheckBoxComponent;
|
||||
private emailOperatorDropdown: azdata.DropDownComponent;
|
||||
private emailConditionDropdown: azdata.DropDownComponent;
|
||||
private pagerCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerOperatorDropdown: azdata.DropDownComponent;
|
||||
private pagerConditionDropdown: azdata.DropDownComponent;
|
||||
private eventLogCheckBox: azdata.CheckBoxComponent;
|
||||
private eventLogConditionDropdown: azdata.DropDownComponent;
|
||||
private deleteJobCheckBox: azdata.CheckBoxComponent;
|
||||
private deleteJobConditionDropdown: azdata.DropDownComponent;
|
||||
private startStepDropdown: azdata.DropDownComponent;
|
||||
|
||||
// Schedule tab controls
|
||||
private schedulesTable: sqlops.TableComponent;
|
||||
private pickScheduleButton: sqlops.ButtonComponent;
|
||||
private schedulesTable: azdata.TableComponent;
|
||||
private pickScheduleButton: azdata.ButtonComponent;
|
||||
|
||||
// Alert tab controls
|
||||
private alertsTable: sqlops.TableComponent;
|
||||
private newAlertButton: sqlops.ButtonComponent;
|
||||
private alertsTable: azdata.TableComponent;
|
||||
private newAlertButton: azdata.ButtonComponent;
|
||||
private isEdit: boolean = false;
|
||||
|
||||
// Job objects
|
||||
private steps: sqlops.AgentJobStepInfo[];
|
||||
private schedules: sqlops.AgentJobScheduleInfo[];
|
||||
private alerts: sqlops.AgentAlertInfo[] = [];
|
||||
private startStepDropdownValues: sqlops.CategoryValue[] = [];
|
||||
private steps: azdata.AgentJobStepInfo[];
|
||||
private schedules: azdata.AgentJobScheduleInfo[];
|
||||
private alerts: azdata.AgentAlertInfo[] = [];
|
||||
private startStepDropdownValues: azdata.CategoryValue[] = [];
|
||||
|
||||
constructor(ownerUri: string, jobInfo: sqlops.AgentJobInfo = undefined) {
|
||||
constructor(ownerUri: string, jobInfo: azdata.AgentJobInfo = undefined) {
|
||||
super(
|
||||
ownerUri,
|
||||
new JobData(ownerUri, jobInfo),
|
||||
@@ -139,11 +139,11 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
}
|
||||
|
||||
protected async initializeDialog() {
|
||||
this.generalTab = sqlops.window.createTab(this.GeneralTabText);
|
||||
this.stepsTab = sqlops.window.createTab(this.StepsTabText);
|
||||
this.alertsTab = sqlops.window.createTab(this.AlertsTabText);
|
||||
this.schedulesTab = sqlops.window.createTab(this.SchedulesTabText);
|
||||
this.notificationsTab = sqlops.window.createTab(this.NotificationsTabText);
|
||||
this.generalTab = azdata.window.createTab(this.GeneralTabText);
|
||||
this.stepsTab = azdata.window.createTab(this.StepsTabText);
|
||||
this.alertsTab = azdata.window.createTab(this.AlertsTabText);
|
||||
this.schedulesTab = azdata.window.createTab(this.SchedulesTabText);
|
||||
this.notificationsTab = azdata.window.createTab(this.NotificationsTabText);
|
||||
this.initializeGeneralTab();
|
||||
this.initializeStepsTab();
|
||||
this.initializeAlertsTab();
|
||||
@@ -636,7 +636,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
});
|
||||
}
|
||||
|
||||
private createRowContainer(view: sqlops.ModelView): sqlops.FlexBuilder {
|
||||
private createRowContainer(view: azdata.ModelView): azdata.FlexBuilder {
|
||||
return view.modelBuilder.flexContainer().withLayout({
|
||||
flexFlow: 'row',
|
||||
alignItems: 'left',
|
||||
@@ -644,7 +644,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
});
|
||||
}
|
||||
|
||||
private convertStepsToData(jobSteps: sqlops.AgentJobStepInfo[]): any[][] {
|
||||
private convertStepsToData(jobSteps: azdata.AgentJobStepInfo[]): any[][] {
|
||||
let result = [];
|
||||
jobSteps.forEach(jobStep => {
|
||||
let cols = [];
|
||||
@@ -658,7 +658,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
return result;
|
||||
}
|
||||
|
||||
private convertSchedulesToData(jobSchedules: sqlops.AgentJobScheduleInfo[]): any[][] {
|
||||
private convertSchedulesToData(jobSchedules: azdata.AgentJobScheduleInfo[]): any[][] {
|
||||
let result = [];
|
||||
jobSchedules.forEach(schedule => {
|
||||
let cols = [];
|
||||
@@ -670,7 +670,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
return result;
|
||||
}
|
||||
|
||||
private convertAlertsToData(alerts: sqlops.AgentAlertInfo[]): any[][] {
|
||||
private convertAlertsToData(alerts: azdata.AgentAlertInfo[]): any[][] {
|
||||
let result = [];
|
||||
alerts.forEach(alert => {
|
||||
let cols = [];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { JobStepData } from '../data/jobStepData';
|
||||
import { AgentUtils } from '../agentUtils';
|
||||
@@ -74,42 +74,42 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
// UI Components
|
||||
|
||||
// Dialogs
|
||||
private fileBrowserDialog: sqlops.window.Dialog;
|
||||
private fileBrowserDialog: azdata.window.Dialog;
|
||||
|
||||
// Dialog tabs
|
||||
private generalTab: sqlops.window.DialogTab;
|
||||
private advancedTab: sqlops.window.DialogTab;
|
||||
private generalTab: azdata.window.DialogTab;
|
||||
private advancedTab: azdata.window.DialogTab;
|
||||
|
||||
//Input boxes
|
||||
private nameTextBox: sqlops.InputBoxComponent;
|
||||
private commandTextBox: sqlops.InputBoxComponent;
|
||||
private selectedPathTextBox: sqlops.InputBoxComponent;
|
||||
private retryAttemptsBox: sqlops.InputBoxComponent;
|
||||
private retryIntervalBox: sqlops.InputBoxComponent;
|
||||
private outputFileNameBox: sqlops.InputBoxComponent;
|
||||
private fileBrowserNameBox: sqlops.InputBoxComponent;
|
||||
private userInputBox: sqlops.InputBoxComponent;
|
||||
private processExitCodeBox: sqlops.InputBoxComponent;
|
||||
private nameTextBox: azdata.InputBoxComponent;
|
||||
private commandTextBox: azdata.InputBoxComponent;
|
||||
private selectedPathTextBox: azdata.InputBoxComponent;
|
||||
private retryAttemptsBox: azdata.InputBoxComponent;
|
||||
private retryIntervalBox: azdata.InputBoxComponent;
|
||||
private outputFileNameBox: azdata.InputBoxComponent;
|
||||
private fileBrowserNameBox: azdata.InputBoxComponent;
|
||||
private userInputBox: azdata.InputBoxComponent;
|
||||
private processExitCodeBox: azdata.InputBoxComponent;
|
||||
|
||||
// Dropdowns
|
||||
private typeDropdown: sqlops.DropDownComponent;
|
||||
private runAsDropdown: sqlops.DropDownComponent;
|
||||
private databaseDropdown: sqlops.DropDownComponent;
|
||||
private successActionDropdown: sqlops.DropDownComponent;
|
||||
private failureActionDropdown: sqlops.DropDownComponent;
|
||||
private fileTypeDropdown: sqlops.DropDownComponent;
|
||||
private typeDropdown: azdata.DropDownComponent;
|
||||
private runAsDropdown: azdata.DropDownComponent;
|
||||
private databaseDropdown: azdata.DropDownComponent;
|
||||
private successActionDropdown: azdata.DropDownComponent;
|
||||
private failureActionDropdown: azdata.DropDownComponent;
|
||||
private fileTypeDropdown: azdata.DropDownComponent;
|
||||
|
||||
// Buttons
|
||||
private openButton: sqlops.ButtonComponent;
|
||||
private parseButton: sqlops.ButtonComponent;
|
||||
private outputFileBrowserButton: sqlops.ButtonComponent;
|
||||
private openButton: azdata.ButtonComponent;
|
||||
private parseButton: azdata.ButtonComponent;
|
||||
private outputFileBrowserButton: azdata.ButtonComponent;
|
||||
|
||||
// Checkbox
|
||||
private appendToExistingFileCheckbox: sqlops.CheckBoxComponent;
|
||||
private logToTableCheckbox: sqlops.CheckBoxComponent;
|
||||
private logStepOutputHistoryCheckbox: sqlops.CheckBoxComponent;
|
||||
private appendToExistingFileCheckbox: azdata.CheckBoxComponent;
|
||||
private logToTableCheckbox: azdata.CheckBoxComponent;
|
||||
private logStepOutputHistoryCheckbox: azdata.CheckBoxComponent;
|
||||
|
||||
private fileBrowserTree: sqlops.FileBrowserTreeComponent;
|
||||
private fileBrowserTree: azdata.FileBrowserTreeComponent;
|
||||
private jobModel: JobData;
|
||||
public jobName: string;
|
||||
private server: string;
|
||||
@@ -120,7 +120,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
ownerUri: string,
|
||||
server: string,
|
||||
jobModel: JobData,
|
||||
jobStepInfo?: sqlops.AgentJobStepInfo,
|
||||
jobStepInfo?: azdata.AgentJobStepInfo,
|
||||
viaJobDialog: boolean = false
|
||||
) {
|
||||
super(ownerUri,
|
||||
@@ -138,12 +138,12 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
}
|
||||
|
||||
private initializeUIComponents() {
|
||||
this.generalTab = sqlops.window.createTab(this.GeneralTabText);
|
||||
this.advancedTab = sqlops.window.createTab(this.AdvancedTabText);
|
||||
this.generalTab = azdata.window.createTab(this.GeneralTabText);
|
||||
this.advancedTab = azdata.window.createTab(this.AdvancedTabText);
|
||||
this.dialog.content = [this.generalTab, this.advancedTab];
|
||||
}
|
||||
|
||||
private createCommands(view, queryProvider: sqlops.QueryProvider) {
|
||||
private createCommands(view, queryProvider: azdata.QueryProvider) {
|
||||
this.openButton = view.modelBuilder.button()
|
||||
.withProperties({
|
||||
label: this.OpenCommandText,
|
||||
@@ -181,7 +181,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
.component();
|
||||
}
|
||||
|
||||
private createGeneralTab(databases: string[], queryProvider: sqlops.QueryProvider) {
|
||||
private createGeneralTab(databases: string[], queryProvider: azdata.QueryProvider) {
|
||||
this.generalTab.registerContent(async (view) => {
|
||||
this.nameTextBox = view.modelBuilder.inputBox()
|
||||
.withProperties({
|
||||
@@ -425,8 +425,8 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
|
||||
private openFileBrowserDialog() {
|
||||
let fileBrowserTitle = this.FileBrowserDialogTitle + `${this.server}`;
|
||||
this.fileBrowserDialog = sqlops.window.createModelViewDialog(fileBrowserTitle);
|
||||
let fileBrowserTab = sqlops.window.createTab('File Browser');
|
||||
this.fileBrowserDialog = azdata.window.createModelViewDialog(fileBrowserTitle);
|
||||
let fileBrowserTab = azdata.window.createTab('File Browser');
|
||||
this.fileBrowserDialog.content = [fileBrowserTab];
|
||||
fileBrowserTab.registerContent(async (view) => {
|
||||
this.fileBrowserTree = view.modelBuilder.fileBrowserTree()
|
||||
@@ -470,7 +470,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
||||
});
|
||||
this.fileBrowserDialog.okButton.label = this.OkButtonText;
|
||||
this.fileBrowserDialog.cancelButton.label = this.CancelButtonText;
|
||||
sqlops.window.openDialog(this.fileBrowserDialog);
|
||||
azdata.window.openDialog(this.fileBrowserDialog);
|
||||
}
|
||||
|
||||
private createTSQLOptions(view) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { OperatorData } from '../data/operatorData';
|
||||
import * as nls from 'vscode-nls';
|
||||
@@ -48,33 +48,33 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
||||
private readonly EditOperatorDialog = 'EditOperatorDialogOpened';
|
||||
|
||||
// UI Components
|
||||
private generalTab: sqlops.window.DialogTab;
|
||||
private notificationsTab: sqlops.window.DialogTab;
|
||||
private generalTab: azdata.window.DialogTab;
|
||||
private notificationsTab: azdata.window.DialogTab;
|
||||
|
||||
// General tab controls
|
||||
private nameTextBox: sqlops.InputBoxComponent;
|
||||
private enabledCheckBox: sqlops.CheckBoxComponent;
|
||||
private emailNameTextBox: sqlops.InputBoxComponent;
|
||||
private pagerEmailNameTextBox: sqlops.InputBoxComponent;
|
||||
private pagerMondayCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerTuesdayCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerWednesdayCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerThursdayCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerFridayCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerSaturdayCheckBox: sqlops.CheckBoxComponent;
|
||||
private pagerSundayCheckBox: sqlops.CheckBoxComponent;
|
||||
private weekdayPagerStartTimeInput: sqlops.InputBoxComponent;
|
||||
private weekdayPagerEndTimeInput: sqlops.InputBoxComponent;
|
||||
private saturdayPagerStartTimeInput: sqlops.InputBoxComponent;
|
||||
private saturdayPagerEndTimeInput: sqlops.InputBoxComponent;
|
||||
private sundayPagerStartTimeInput: sqlops.InputBoxComponent;
|
||||
private sundayPagerEndTimeInput: sqlops.InputBoxComponent;
|
||||
private nameTextBox: azdata.InputBoxComponent;
|
||||
private enabledCheckBox: azdata.CheckBoxComponent;
|
||||
private emailNameTextBox: azdata.InputBoxComponent;
|
||||
private pagerEmailNameTextBox: azdata.InputBoxComponent;
|
||||
private pagerMondayCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerTuesdayCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerWednesdayCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerThursdayCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerFridayCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerSaturdayCheckBox: azdata.CheckBoxComponent;
|
||||
private pagerSundayCheckBox: azdata.CheckBoxComponent;
|
||||
private weekdayPagerStartTimeInput: azdata.InputBoxComponent;
|
||||
private weekdayPagerEndTimeInput: azdata.InputBoxComponent;
|
||||
private saturdayPagerStartTimeInput: azdata.InputBoxComponent;
|
||||
private saturdayPagerEndTimeInput: azdata.InputBoxComponent;
|
||||
private sundayPagerStartTimeInput: azdata.InputBoxComponent;
|
||||
private sundayPagerEndTimeInput: azdata.InputBoxComponent;
|
||||
|
||||
// Notification tab controls
|
||||
private alertsTable: sqlops.TableComponent;
|
||||
private alertsTable: azdata.TableComponent;
|
||||
private isEdit: boolean = false;
|
||||
|
||||
constructor(ownerUri: string, operatorInfo: sqlops.AgentOperatorInfo = undefined) {
|
||||
constructor(ownerUri: string, operatorInfo: azdata.AgentOperatorInfo = undefined) {
|
||||
super(
|
||||
ownerUri,
|
||||
new OperatorData(ownerUri, operatorInfo),
|
||||
@@ -83,9 +83,9 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
||||
this.dialogName = this.isEdit ? this.EditOperatorDialog : this.NewOperatorDialog;
|
||||
}
|
||||
|
||||
protected async initializeDialog(dialog: sqlops.window.Dialog) {
|
||||
this.generalTab = sqlops.window.createTab(OperatorDialog.GeneralTabText);
|
||||
this.notificationsTab = sqlops.window.createTab(OperatorDialog.NotificationsTabText);
|
||||
protected async initializeDialog(dialog: azdata.window.Dialog) {
|
||||
this.generalTab = azdata.window.createTab(OperatorDialog.GeneralTabText);
|
||||
this.notificationsTab = azdata.window.createTab(OperatorDialog.NotificationsTabText);
|
||||
|
||||
this.initializeGeneralTab();
|
||||
this.initializeNotificationTab();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { PickScheduleData } from '../data/pickScheduleData';
|
||||
|
||||
@@ -25,8 +25,8 @@ export class PickScheduleDialog {
|
||||
|
||||
|
||||
// UI Components
|
||||
private dialog: sqlops.window.Dialog;
|
||||
private schedulesTable: sqlops.TableComponent;
|
||||
private dialog: azdata.window.Dialog;
|
||||
private schedulesTable: azdata.TableComponent;
|
||||
|
||||
private model: PickScheduleData;
|
||||
|
||||
@@ -39,13 +39,13 @@ export class PickScheduleDialog {
|
||||
|
||||
public async showDialog() {
|
||||
await this.model.initialize();
|
||||
this.dialog = sqlops.window.createModelViewDialog(this.DialogTitle);
|
||||
this.dialog = azdata.window.createModelViewDialog(this.DialogTitle);
|
||||
this.initializeContent();
|
||||
this.dialog.okButton.onClick(async () => await this.execute());
|
||||
this.dialog.cancelButton.onClick(async () => await this.cancel());
|
||||
this.dialog.okButton.label = this.OkButtonText;
|
||||
this.dialog.cancelButton.label = this.CancelButtonText;
|
||||
sqlops.window.openDialog(this.dialog);
|
||||
azdata.window.openDialog(this.dialog);
|
||||
}
|
||||
|
||||
private initializeContent() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { AgentDialog } from './agentDialog';
|
||||
import { ProxyData } from '../data/proxyData';
|
||||
|
||||
@@ -40,28 +40,28 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
||||
private readonly EditProxyDialog = 'EditProxyDialogOpened';
|
||||
|
||||
// UI Components
|
||||
private generalTab: sqlops.window.DialogTab;
|
||||
private generalTab: azdata.window.DialogTab;
|
||||
|
||||
// General tab controls
|
||||
private proxyNameTextBox: sqlops.InputBoxComponent;
|
||||
private credentialNameDropDown: sqlops.DropDownComponent;
|
||||
private descriptionTextBox: sqlops.InputBoxComponent;
|
||||
private subsystemCheckBox: sqlops.CheckBoxComponent;
|
||||
private operatingSystemCheckBox: sqlops.CheckBoxComponent;
|
||||
private replicationSnapshotCheckBox: sqlops.CheckBoxComponent;
|
||||
private replicationTransactionLogCheckBox: sqlops.CheckBoxComponent;
|
||||
private replicationDistributorCheckBox: sqlops.CheckBoxComponent;
|
||||
private replicationMergeCheckbox: sqlops.CheckBoxComponent;
|
||||
private replicationQueueReaderCheckbox: sqlops.CheckBoxComponent;
|
||||
private sqlQueryCheckBox: sqlops.CheckBoxComponent;
|
||||
private sqlCommandCheckBox: sqlops.CheckBoxComponent;
|
||||
private sqlIntegrationServicesPackageCheckbox: sqlops.CheckBoxComponent;
|
||||
private powershellCheckBox: sqlops.CheckBoxComponent;
|
||||
private proxyNameTextBox: azdata.InputBoxComponent;
|
||||
private credentialNameDropDown: azdata.DropDownComponent;
|
||||
private descriptionTextBox: azdata.InputBoxComponent;
|
||||
private subsystemCheckBox: azdata.CheckBoxComponent;
|
||||
private operatingSystemCheckBox: azdata.CheckBoxComponent;
|
||||
private replicationSnapshotCheckBox: azdata.CheckBoxComponent;
|
||||
private replicationTransactionLogCheckBox: azdata.CheckBoxComponent;
|
||||
private replicationDistributorCheckBox: azdata.CheckBoxComponent;
|
||||
private replicationMergeCheckbox: azdata.CheckBoxComponent;
|
||||
private replicationQueueReaderCheckbox: azdata.CheckBoxComponent;
|
||||
private sqlQueryCheckBox: azdata.CheckBoxComponent;
|
||||
private sqlCommandCheckBox: azdata.CheckBoxComponent;
|
||||
private sqlIntegrationServicesPackageCheckbox: azdata.CheckBoxComponent;
|
||||
private powershellCheckBox: azdata.CheckBoxComponent;
|
||||
|
||||
private credentials: sqlops.CredentialInfo[];
|
||||
private credentials: azdata.CredentialInfo[];
|
||||
private isEdit: boolean = false;
|
||||
|
||||
constructor(ownerUri: string, proxyInfo: sqlops.AgentProxyInfo = undefined, credentials: sqlops.CredentialInfo[]) {
|
||||
constructor(ownerUri: string, proxyInfo: azdata.AgentProxyInfo = undefined, credentials: azdata.CredentialInfo[]) {
|
||||
super(
|
||||
ownerUri,
|
||||
new ProxyData(ownerUri, proxyInfo),
|
||||
@@ -71,8 +71,8 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
||||
this.dialogName = this.isEdit ? this.EditProxyDialog : this.NewProxyDialog;
|
||||
}
|
||||
|
||||
protected async initializeDialog(dialog: sqlops.window.Dialog) {
|
||||
this.generalTab = sqlops.window.createTab(ProxyDialog.GeneralTabText);
|
||||
protected async initializeDialog(dialog: azdata.window.Dialog) {
|
||||
this.generalTab = azdata.window.createTab(ProxyDialog.GeneralTabText);
|
||||
|
||||
|
||||
this.initializeGeneralTab();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { ScheduleData } from '../data/scheduleData';
|
||||
|
||||
@@ -21,8 +21,8 @@ export class ScheduleDialog {
|
||||
private readonly SchedulesLabelText: string = localize('scheduleDialog.schedules', 'Schedules');
|
||||
|
||||
// UI Components
|
||||
private dialog: sqlops.window.Dialog;
|
||||
private schedulesTable: sqlops.TableComponent;
|
||||
private dialog: azdata.window.Dialog;
|
||||
private schedulesTable: azdata.TableComponent;
|
||||
|
||||
private model: ScheduleData;
|
||||
|
||||
@@ -35,14 +35,14 @@ export class ScheduleDialog {
|
||||
|
||||
public async showDialog() {
|
||||
await this.model.initialize();
|
||||
this.dialog = sqlops.window.createModelViewDialog(this.DialogTitle);
|
||||
this.dialog = azdata.window.createModelViewDialog(this.DialogTitle);
|
||||
this.initializeContent();
|
||||
this.dialog.okButton.onClick(async () => await this.execute());
|
||||
this.dialog.cancelButton.onClick(async () => await this.cancel());
|
||||
this.dialog.okButton.label = this.OkButtonText;
|
||||
this.dialog.cancelButton.label = this.CancelButtonText;
|
||||
|
||||
sqlops.window.openDialog(this.dialog);
|
||||
azdata.window.openDialog(this.dialog);
|
||||
}
|
||||
|
||||
private initializeContent() {
|
||||
|
||||
Reference in New Issue
Block a user