Add Agent Service configuration request methods (#1608)

* WIP 1

* WIP 2

* Add Agent Service configuration request methods

* Fix typo

* Tabify sqlops.d.ts.
This commit is contained in:
Karl Burtram
2018-06-11 16:32:18 -07:00
committed by GitHub
parent 4609694141
commit 733bb69d25
11 changed files with 718 additions and 67 deletions

View File

@@ -23,7 +23,7 @@ export interface IJobManagementService {
getJobHistory(connectionUri: string, jobID: string): Thenable<sqlops.AgentJobHistoryResult>;
jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.AgentJobActionResult>;
jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.ResultStatus>;
addToCache(server: string, cache: JobCacheObject);

View File

@@ -39,7 +39,7 @@ export class JobManagementService implements IJobManagementService {
});
}
public jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.AgentJobActionResult> {
public jobAction(connectionUri: string, jobName: string, action: string): Thenable<sqlops.ResultStatus> {
return this._runAction(connectionUri, (runner) => {
return runner.jobAction(connectionUri, jobName, action);
});

View File

@@ -33,7 +33,7 @@ export class RunJobAction extends Action {
let ownerUri = context.ownerUri;
return new TPromise<boolean>((resolve, reject) => {
this.jobManagementService.jobAction(ownerUri, jobName, JobHistoryActions.Run).then(result => {
if (result.succeeded) {
if (result.success) {
var startMsg = nls.localize('jobSuccessfullyStarted', ': The job was successfully started.');
this.notificationService.notify({
severity: Severity.Info,
@@ -68,7 +68,7 @@ export class StopJobAction extends Action {
let ownerUri = context.ownerUri;
return new TPromise<boolean>((resolve, reject) => {
this.jobManagementService.jobAction(ownerUri, jobName, JobHistoryActions.Stop).then(result => {
if (result.succeeded) {
if (result.success) {
var stopMsg = nls.localize('jobSuccessfullyStopped', ': The job was successfully stopped.');
this.notificationService.notify({
severity: Severity.Info,