mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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:
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IJobManagementService } from 'sql/platform/jobManagement/common/interfaces';
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
@@ -18,7 +18,7 @@ export class JobManagementService implements IJobManagementService {
|
||||
private _onDidChange = new Emitter<void>();
|
||||
public readonly onDidChange: Event<void> = this._onDidChange.event;
|
||||
|
||||
private _providers: { [handle: string]: sqlops.AgentServicesProvider; } = Object.create(null);
|
||||
private _providers: { [handle: string]: azdata.AgentServicesProvider; } = Object.create(null);
|
||||
private _jobCacheObjectMap: { [server: string]: JobCacheObject; } = {};
|
||||
private _operatorsCacheObjectMap: { [server: string]: OperatorsCacheObject; } = {};
|
||||
private _alertsCacheObject: { [server: string]: AlertsCacheObject; } = {};
|
||||
@@ -34,32 +34,32 @@ export class JobManagementService implements IJobManagementService {
|
||||
}
|
||||
|
||||
// Jobs
|
||||
public getJobs(connectionUri: string): Thenable<sqlops.AgentJobsResult> {
|
||||
public getJobs(connectionUri: string): Thenable<azdata.AgentJobsResult> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.getJobs(connectionUri);
|
||||
});
|
||||
}
|
||||
|
||||
public deleteJob(connectionUri: string, job: sqlops.AgentJobInfo): Thenable<sqlops.ResultStatus> {
|
||||
public deleteJob(connectionUri: string, job: azdata.AgentJobInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.deleteJob(connectionUri, job);
|
||||
});
|
||||
}
|
||||
|
||||
public getJobHistory(connectionUri: string, jobID: string, jobName: string): Thenable<sqlops.AgentJobHistoryResult> {
|
||||
public getJobHistory(connectionUri: string, jobID: string, jobName: string): Thenable<azdata.AgentJobHistoryResult> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.getJobHistory(connectionUri, jobID, jobName);
|
||||
});
|
||||
}
|
||||
|
||||
public jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.ResultStatus> {
|
||||
public jobAction(connectionUri: string, jobName: string, action: string): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.jobAction(connectionUri, jobName, action);
|
||||
});
|
||||
}
|
||||
|
||||
// Steps
|
||||
public deleteJobStep(connectionUri: string, stepInfo: sqlops.AgentJobStepInfo): Thenable<sqlops.ResultStatus> {
|
||||
public deleteJobStep(connectionUri: string, stepInfo: azdata.AgentJobStepInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.deleteJobStep(connectionUri, stepInfo);
|
||||
});
|
||||
@@ -67,51 +67,51 @@ export class JobManagementService implements IJobManagementService {
|
||||
|
||||
|
||||
// Alerts
|
||||
public getAlerts(connectionUri: string): Thenable<sqlops.AgentAlertsResult> {
|
||||
public getAlerts(connectionUri: string): Thenable<azdata.AgentAlertsResult> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.getAlerts(connectionUri);
|
||||
});
|
||||
}
|
||||
|
||||
public deleteAlert(connectionUri: string, alert: sqlops.AgentAlertInfo): Thenable<sqlops.ResultStatus> {
|
||||
public deleteAlert(connectionUri: string, alert: azdata.AgentAlertInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.deleteAlert(connectionUri, alert);
|
||||
});
|
||||
}
|
||||
|
||||
// Operators
|
||||
public getOperators(connectionUri: string): Thenable<sqlops.AgentOperatorsResult> {
|
||||
public getOperators(connectionUri: string): Thenable<azdata.AgentOperatorsResult> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.getOperators(connectionUri);
|
||||
});
|
||||
}
|
||||
|
||||
public deleteOperator(connectionUri: string, operator: sqlops.AgentOperatorInfo): Thenable<sqlops.ResultStatus> {
|
||||
public deleteOperator(connectionUri: string, operator: azdata.AgentOperatorInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.deleteOperator(connectionUri, operator);
|
||||
});
|
||||
}
|
||||
|
||||
// Proxies
|
||||
public getProxies(connectionUri: string): Thenable<sqlops.AgentProxiesResult> {
|
||||
public getProxies(connectionUri: string): Thenable<azdata.AgentProxiesResult> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.getProxies(connectionUri);
|
||||
});
|
||||
}
|
||||
|
||||
public deleteProxy(connectionUri: string, proxy: sqlops.AgentProxyInfo): Thenable<sqlops.ResultStatus> {
|
||||
public deleteProxy(connectionUri: string, proxy: azdata.AgentProxyInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.deleteProxy(connectionUri, proxy);
|
||||
});
|
||||
}
|
||||
|
||||
public getCredentials(connectionUri: string): Thenable<sqlops.GetCredentialsResult> {
|
||||
public getCredentials(connectionUri: string): Thenable<azdata.GetCredentialsResult> {
|
||||
return this._runAction(connectionUri, (runner) => {
|
||||
return runner.getCredentials(connectionUri);
|
||||
});
|
||||
}
|
||||
|
||||
private _runAction<T>(uri: string, action: (handler: sqlops.AgentServicesProvider) => Thenable<T>): Thenable<T> {
|
||||
private _runAction<T>(uri: string, action: (handler: azdata.AgentServicesProvider) => Thenable<T>): Thenable<T> {
|
||||
let providerId: string = this._connectionService.getProviderIdFromUri(uri);
|
||||
|
||||
if (!providerId) {
|
||||
@@ -125,7 +125,7 @@ export class JobManagementService implements IJobManagementService {
|
||||
}
|
||||
}
|
||||
|
||||
public registerProvider(providerId: string, provider: sqlops.AgentServicesProvider): void {
|
||||
public registerProvider(providerId: string, provider: azdata.AgentServicesProvider): void {
|
||||
this._providers[providerId] = provider;
|
||||
}
|
||||
|
||||
@@ -163,22 +163,22 @@ export class JobManagementService implements IJobManagementService {
|
||||
*/
|
||||
export class JobCacheObject {
|
||||
_serviceBrand: any;
|
||||
private _jobs: sqlops.AgentJobInfo[] = [];
|
||||
private _jobHistories: { [jobID: string]: sqlops.AgentJobHistoryInfo[]; } = {};
|
||||
private _jobSteps: { [jobID: string]: sqlops.AgentJobStepInfo[]; } = {};
|
||||
private _jobAlerts: { [jobID: string]: sqlops.AgentAlertInfo[]; } = {};
|
||||
private _jobSchedules: { [jobID: string]: sqlops.AgentJobScheduleInfo[]; } = {};
|
||||
private _jobs: azdata.AgentJobInfo[] = [];
|
||||
private _jobHistories: { [jobID: string]: azdata.AgentJobHistoryInfo[]; } = {};
|
||||
private _jobSteps: { [jobID: string]: azdata.AgentJobStepInfo[]; } = {};
|
||||
private _jobAlerts: { [jobID: string]: azdata.AgentAlertInfo[]; } = {};
|
||||
private _jobSchedules: { [jobID: string]: azdata.AgentJobScheduleInfo[]; } = {};
|
||||
private _runCharts: { [jobID: string]: string[]; } = {};
|
||||
private _prevJobID: string;
|
||||
private _serverName: string;
|
||||
private _dataView: Slick.Data.DataView<any>;
|
||||
|
||||
/* Getters */
|
||||
public get jobs(): sqlops.AgentJobInfo[] {
|
||||
public get jobs(): azdata.AgentJobInfo[] {
|
||||
return this._jobs;
|
||||
}
|
||||
|
||||
public get jobHistories(): { [jobID: string]: sqlops.AgentJobHistoryInfo[] } {
|
||||
public get jobHistories(): { [jobID: string]: azdata.AgentJobHistoryInfo[] } {
|
||||
return this._jobHistories;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ export class JobCacheObject {
|
||||
return this._prevJobID;
|
||||
}
|
||||
|
||||
public getJobHistory(jobID: string): sqlops.AgentJobHistoryInfo[] {
|
||||
public getJobHistory(jobID: string): azdata.AgentJobHistoryInfo[] {
|
||||
return this._jobHistories[jobID];
|
||||
}
|
||||
|
||||
@@ -202,24 +202,24 @@ export class JobCacheObject {
|
||||
return this._runCharts[jobID];
|
||||
}
|
||||
|
||||
public getJobSteps(jobID: string): sqlops.AgentJobStepInfo[] {
|
||||
public getJobSteps(jobID: string): azdata.AgentJobStepInfo[] {
|
||||
return this._jobSteps[jobID];
|
||||
}
|
||||
|
||||
public getJobAlerts(jobID: string): sqlops.AgentAlertInfo[] {
|
||||
public getJobAlerts(jobID: string): azdata.AgentAlertInfo[] {
|
||||
return this._jobAlerts[jobID];
|
||||
}
|
||||
|
||||
public getJobSchedules(jobID: string): sqlops.AgentJobScheduleInfo[] {
|
||||
public getJobSchedules(jobID: string): azdata.AgentJobScheduleInfo[] {
|
||||
return this._jobSchedules[jobID];
|
||||
}
|
||||
|
||||
/* Setters */
|
||||
public set jobs(value: sqlops.AgentJobInfo[]) {
|
||||
public set jobs(value: azdata.AgentJobInfo[]) {
|
||||
this._jobs = value;
|
||||
}
|
||||
|
||||
public set jobHistories(value: { [jobID: string]: sqlops.AgentJobHistoryInfo[]; }) {
|
||||
public set jobHistories(value: { [jobID: string]: azdata.AgentJobHistoryInfo[]; }) {
|
||||
this._jobHistories = value;
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ export class JobCacheObject {
|
||||
this._prevJobID = value;
|
||||
}
|
||||
|
||||
public setJobHistory(jobID: string, value: sqlops.AgentJobHistoryInfo[]) {
|
||||
public setJobHistory(jobID: string, value: azdata.AgentJobHistoryInfo[]) {
|
||||
this._jobHistories[jobID] = value;
|
||||
}
|
||||
|
||||
@@ -243,15 +243,15 @@ export class JobCacheObject {
|
||||
this._dataView = value;
|
||||
}
|
||||
|
||||
public setJobSteps(jobID: string, value: sqlops.AgentJobStepInfo[]) {
|
||||
public setJobSteps(jobID: string, value: azdata.AgentJobStepInfo[]) {
|
||||
this._jobSteps[jobID] = value;
|
||||
}
|
||||
|
||||
public setJobAlerts(jobID: string, value: sqlops.AgentAlertInfo[]) {
|
||||
public setJobAlerts(jobID: string, value: azdata.AgentAlertInfo[]) {
|
||||
this._jobAlerts[jobID] = value;
|
||||
}
|
||||
|
||||
public setJobSchedules(jobID: string, value: sqlops.AgentJobScheduleInfo[]) {
|
||||
public setJobSchedules(jobID: string, value: azdata.AgentJobScheduleInfo[]) {
|
||||
this._jobSchedules[jobID] = value;
|
||||
}
|
||||
}
|
||||
@@ -261,12 +261,12 @@ export class JobCacheObject {
|
||||
*/
|
||||
export class OperatorsCacheObject {
|
||||
_serviceBrand: any;
|
||||
private _operators: sqlops.AgentOperatorInfo[];
|
||||
private _operators: azdata.AgentOperatorInfo[];
|
||||
private _dataView: Slick.Data.DataView<any>;
|
||||
private _serverName: string;
|
||||
|
||||
/** Getters */
|
||||
public get operators(): sqlops.AgentOperatorInfo[] {
|
||||
public get operators(): azdata.AgentOperatorInfo[] {
|
||||
return this._operators;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ export class OperatorsCacheObject {
|
||||
}
|
||||
|
||||
/** Setters */
|
||||
public set operators(value: sqlops.AgentOperatorInfo[]) {
|
||||
public set operators(value: azdata.AgentOperatorInfo[]) {
|
||||
this._operators = value;
|
||||
}
|
||||
|
||||
@@ -298,12 +298,12 @@ export class OperatorsCacheObject {
|
||||
*/
|
||||
export class AlertsCacheObject {
|
||||
_serviceBrand: any;
|
||||
private _alerts: sqlops.AgentAlertInfo[];
|
||||
private _alerts: azdata.AgentAlertInfo[];
|
||||
private _dataView: Slick.Data.DataView<any>;
|
||||
private _serverName: string;
|
||||
|
||||
/** Getters */
|
||||
public get alerts(): sqlops.AgentAlertInfo[] {
|
||||
public get alerts(): azdata.AgentAlertInfo[] {
|
||||
return this._alerts;
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ export class AlertsCacheObject {
|
||||
}
|
||||
|
||||
/** Setters */
|
||||
public set alerts(value: sqlops.AgentAlertInfo[]) {
|
||||
public set alerts(value: azdata.AgentAlertInfo[]) {
|
||||
this._alerts = value;
|
||||
}
|
||||
|
||||
@@ -335,14 +335,14 @@ export class AlertsCacheObject {
|
||||
*/
|
||||
export class ProxiesCacheObject {
|
||||
_serviceBrand: any;
|
||||
private _proxies: sqlops.AgentProxyInfo[];
|
||||
private _proxies: azdata.AgentProxyInfo[];
|
||||
private _dataView: Slick.Data.DataView<any>;
|
||||
private _serverName: string;
|
||||
|
||||
/**
|
||||
* Getters
|
||||
*/
|
||||
public get proxies(): sqlops.AgentProxyInfo[] {
|
||||
public get proxies(): azdata.AgentProxyInfo[] {
|
||||
return this._proxies;
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ export class ProxiesCacheObject {
|
||||
|
||||
/** Setters */
|
||||
|
||||
public set proxies(value: sqlops.AgentProxyInfo[]) {
|
||||
public set proxies(value: azdata.AgentProxyInfo[]) {
|
||||
this._proxies = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user