Update product references from 'sqlops' to 'azdata' (#4259)

* Update extensions to use azdata

* Switch core code to use azdata
This commit is contained in:
Karl Burtram
2019-03-01 13:59:37 -08:00
committed by GitHub
parent 220685a522
commit 84890eb1b4
371 changed files with 3208 additions and 3184 deletions

View File

@@ -6,7 +6,7 @@
import * as nls from 'vscode-nls';
import * as vscode from 'vscode';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import { AgentUtils } from '../agentUtils';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
import { JobData } from './jobData';
@@ -51,7 +51,7 @@ export class AlertData implements IAgentDialogData {
constructor(
ownerUri:string,
alertInfo: sqlops.AgentAlertInfo,
alertInfo: azdata.AgentAlertInfo,
jobModel?: JobData,
viaJobDialog: boolean = false
) {
@@ -111,7 +111,7 @@ export class AlertData implements IAgentDialogData {
}
}
public toAgentAlertInfo(): sqlops.AgentAlertInfo {
public toAgentAlertInfo(): azdata.AgentAlertInfo {
return {
id: this.id,
name: this.name,
@@ -119,7 +119,7 @@ export class AlertData implements IAgentDialogData {
eventDescriptionKeyword: this.eventDescriptionKeyword,
eventSource: this.eventSource,
hasNotification: this.hasNotification,
includeEventDescription: sqlops.NotifyMethods.none, // this.includeEventDescription,
includeEventDescription: azdata.NotifyMethods.none, // this.includeEventDescription,
isEnabled: this.isEnabled,
jobId: this.jobId,
jobName: this.jobName,
@@ -139,13 +139,13 @@ export class AlertData implements IAgentDialogData {
};
}
private static getAlertTypeFromString(alertTypeString: string): sqlops.AlertType {
private static getAlertTypeFromString(alertTypeString: string): azdata.AlertType {
if (alertTypeString === AlertData.AlertTypePerformanceConditionString) {
return sqlops.AlertType.sqlServerPerformanceCondition;
return azdata.AlertType.sqlServerPerformanceCondition;
} else if (alertTypeString === AlertData.AlertTypeWmiEventString) {
return sqlops.AlertType.wmiEvent;
return azdata.AlertType.wmiEvent;
} else {
return sqlops.AlertType.sqlServerEvent;
return azdata.AlertType.sqlServerEvent;
}
}
}

View File

@@ -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 { AgentUtils } from '../agentUtils';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
@@ -25,8 +25,8 @@ export class JobData implements IAgentDialogData {
private _jobCategories: string[];
private _operators: string[];
private _defaultOwner: string;
private _jobCompletionActionConditions: sqlops.CategoryValue[];
private _jobCategoryIdsMap: sqlops.AgentJobCategory[];
private _jobCompletionActionConditions: azdata.CategoryValue[];
private _jobCategoryIdsMap: azdata.AgentJobCategory[];
public dialogMode: AgentDialogMode = AgentDialogMode.CREATE;
public name: string;
@@ -36,23 +36,23 @@ export class JobData implements IAgentDialogData {
public category: string;
public categoryId: number;
public owner: string;
public emailLevel: sqlops.JobCompletionActionCondition = sqlops.JobCompletionActionCondition.OnFailure;
public pageLevel: sqlops.JobCompletionActionCondition = sqlops.JobCompletionActionCondition.OnFailure;
public eventLogLevel: sqlops.JobCompletionActionCondition = sqlops.JobCompletionActionCondition.OnFailure;
public deleteLevel: sqlops.JobCompletionActionCondition = sqlops.JobCompletionActionCondition.OnSuccess;
public emailLevel: azdata.JobCompletionActionCondition = azdata.JobCompletionActionCondition.OnFailure;
public pageLevel: azdata.JobCompletionActionCondition = azdata.JobCompletionActionCondition.OnFailure;
public eventLogLevel: azdata.JobCompletionActionCondition = azdata.JobCompletionActionCondition.OnFailure;
public deleteLevel: azdata.JobCompletionActionCondition = azdata.JobCompletionActionCondition.OnSuccess;
public operatorToEmail: string;
public operatorToPage: string;
public jobSteps: sqlops.AgentJobStepInfo[];
public jobSchedules: sqlops.AgentJobScheduleInfo[];
public alerts: sqlops.AgentAlertInfo[];
public jobSteps: azdata.AgentJobStepInfo[];
public jobSchedules: azdata.AgentJobScheduleInfo[];
public alerts: azdata.AgentAlertInfo[];
public jobId: string;
public startStepId: number;
public categoryType: number;
constructor(
ownerUri: string,
jobInfo: sqlops.AgentJobInfo = undefined,
private _agentService: sqlops.AgentServicesProvider = undefined) {
jobInfo: azdata.AgentJobInfo = undefined,
private _agentService: azdata.AgentServicesProvider = undefined) {
this._ownerUri = ownerUri;
if (jobInfo) {
@@ -77,7 +77,7 @@ export class JobData implements IAgentDialogData {
return this._jobCategories;
}
public get jobCategoryIdsMap(): sqlops.AgentJobCategory[] {
public get jobCategoryIdsMap(): azdata.AgentJobCategory[] {
return this._jobCategoryIdsMap;
}
@@ -93,7 +93,7 @@ export class JobData implements IAgentDialogData {
return this._defaultOwner;
}
public get JobCompletionActionConditions(): sqlops.CategoryValue[] {
public get JobCompletionActionConditions(): azdata.CategoryValue[] {
return this._jobCompletionActionConditions;
}
@@ -112,18 +112,18 @@ export class JobData implements IAgentDialogData {
this._jobCompletionActionConditions = [{
displayName: this.JobCompletionActionCondition_OnSuccess,
name: sqlops.JobCompletionActionCondition.OnSuccess.toString()
name: azdata.JobCompletionActionCondition.OnSuccess.toString()
}, {
displayName: this.JobCompletionActionCondition_OnFailure,
name: sqlops.JobCompletionActionCondition.OnFailure.toString()
name: azdata.JobCompletionActionCondition.OnFailure.toString()
}, {
displayName: this.JobCompletionActionCondition_Always,
name: sqlops.JobCompletionActionCondition.Always.toString()
name: azdata.JobCompletionActionCondition.Always.toString()
}];
}
public async save() {
let jobInfo: sqlops.AgentJobInfo = this.toAgentJobInfo();
let jobInfo: azdata.AgentJobInfo = this.toAgentJobInfo();
let result = this.dialogMode === AgentDialogMode.CREATE
? await this._agentService.createJob(this.ownerUri, jobInfo)
: await this._agentService.updateJob(this.ownerUri, this.originalName, jobInfo);
@@ -146,7 +146,7 @@ export class JobData implements IAgentDialogData {
};
}
public toAgentJobInfo(): sqlops.AgentJobInfo {
public toAgentJobInfo(): azdata.AgentJobInfo {
return {
name: this.name,
owner: this.owner,

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import * as nls from 'vscode-nls';
import * as vscode from 'vscode';
import { AgentUtils } from '../agentUtils';
@@ -95,7 +95,7 @@ export class JobStepData implements IAgentDialogData {
};
}
public static convertToJobStepData(jobStepInfo: sqlops.AgentJobStepInfo, jobData: JobData) {
public static convertToJobStepData(jobStepInfo: azdata.AgentJobStepInfo, jobData: JobData) {
let stepData = new JobStepData(jobData.ownerUri, jobData);
stepData.ownerUri = jobData.ownerUri;
stepData.jobId = jobStepInfo.jobId;
@@ -127,8 +127,8 @@ export class JobStepData implements IAgentDialogData {
return stepData;
}
public static convertToAgentJobStepInfo(jobStepData: JobStepData): sqlops.AgentJobStepInfo {
let result: sqlops.AgentJobStepInfo = {
public static convertToAgentJobStepInfo(jobStepData: JobStepData): azdata.AgentJobStepInfo {
let result: azdata.AgentJobStepInfo = {
jobId: jobStepData.jobId,
jobName: jobStepData.jobName,
script: jobStepData.script,

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import { AgentUtils } from '../agentUtils';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
@@ -29,7 +29,7 @@ export class OperatorData implements IAgentDialogData {
weekdayPagerStartTime: string;
weekdayPagerEndTime: string;
constructor(ownerUri:string, operatorInfo: sqlops.AgentOperatorInfo) {
constructor(ownerUri:string, operatorInfo: azdata.AgentOperatorInfo) {
this.ownerUri = ownerUri;
if (operatorInfo) {
@@ -50,7 +50,7 @@ export class OperatorData implements IAgentDialogData {
}
}
public toAgentOperatorInfo(): sqlops.AgentOperatorInfo {
public toAgentOperatorInfo(): azdata.AgentOperatorInfo {
return {
name: this.name,
id: this.id,
@@ -61,7 +61,7 @@ export class OperatorData implements IAgentDialogData {
lastPagerDate: this.lastPagerDate,
pagerAddress: this.pagerAddress,
categoryName: this.categoryName,
pagerDays: sqlops.WeekDays.weekDays, //this.pagerDays,
pagerDays: azdata.WeekDays.weekDays, //this.pagerDays,
saturdayPagerEndTime: this.saturdayPagerEndTime,
saturdayPagerStartTime: this.saturdayPagerStartTime,
sundayPagerEndTime: this.sundayPagerEndTime,

View File

@@ -4,15 +4,15 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import { AgentUtils } from '../agentUtils';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
export class PickScheduleData implements IAgentDialogData {
public dialogMode: AgentDialogMode = AgentDialogMode.VIEW;
public ownerUri: string;
public schedules: sqlops.AgentJobScheduleInfo[];
public selectedSchedule: sqlops.AgentJobScheduleInfo;
public schedules: azdata.AgentJobScheduleInfo[];
public selectedSchedule: azdata.AgentJobScheduleInfo;
private jobName: string;
constructor(ownerUri:string, jobName: string) {

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import { AgentUtils } from '../agentUtils';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
@@ -19,7 +19,7 @@ export class ProxyData implements IAgentDialogData {
credentialId: number;
isEnabled: boolean;
constructor(ownerUri:string, proxyInfo: sqlops.AgentProxyInfo) {
constructor(ownerUri:string, proxyInfo: azdata.AgentProxyInfo) {
this.ownerUri = ownerUri;
if (proxyInfo) {
@@ -40,7 +40,7 @@ export class ProxyData implements IAgentDialogData {
}
}
public toAgentProxyInfo(): sqlops.AgentProxyInfo {
public toAgentProxyInfo(): azdata.AgentProxyInfo {
return {
id: this.id,
accountName: this.accountName,

View File

@@ -4,15 +4,15 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import { AgentUtils } from '../agentUtils';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
export class ScheduleData implements IAgentDialogData {
public dialogMode: AgentDialogMode = AgentDialogMode.CREATE;
public ownerUri: string;
public schedules: sqlops.AgentJobScheduleInfo[];
public selectedSchedule: sqlops.AgentJobScheduleInfo;
public schedules: azdata.AgentJobScheduleInfo[];
public selectedSchedule: azdata.AgentJobScheduleInfo;
constructor(ownerUri:string) {
this.ownerUri = ownerUri;