Edit Agent Alert updates (#1872)

* Set database name and severity when editing alert

* Add Operator and Proxy edit

* Add edit job hookup

* Edit WIP

* Additional edit alert updates

* Remove unused method
This commit is contained in:
Karl Burtram
2018-07-09 10:47:50 -07:00
committed by GitHub
parent bdc391d376
commit fbd5e819a2
14 changed files with 201 additions and 48 deletions

View File

@@ -145,11 +145,17 @@ export class EditJobAction extends Action {
public static ID = 'jobaction.editJob';
public static LABEL = nls.localize('jobaction.editJob', "Edit Job");
constructor() {
constructor(
@ICommandService private _commandService: ICommandService
) {
super(EditJobAction.ID, EditJobAction.LABEL);
}
public run(actionInfo: IJobActionInfo): TPromise<boolean> {
this._commandService.executeCommand(
'agent.openJobDialog',
actionInfo.ownerUri,
actionInfo.targetObject);
return TPromise.as(true);
}
}
@@ -324,11 +330,17 @@ export class EditOperatorAction extends Action {
public static ID = 'jobaction.editAlert';
public static LABEL = nls.localize('jobaction.editOperator', "Edit Operator");
constructor() {
constructor(
@ICommandService private _commandService: ICommandService
) {
super(EditOperatorAction.ID, EditOperatorAction.LABEL);
}
public run(info: any): TPromise<boolean> {
public run(actionInfo: IJobActionInfo): TPromise<boolean> {
this._commandService.executeCommand(
'agent.openOperatorDialog',
actionInfo.ownerUri,
actionInfo.targetObject);
return TPromise.as(true);
}
}
@@ -398,11 +410,17 @@ export class EditProxyAction extends Action {
public static ID = 'jobaction.editProxy';
public static LABEL = nls.localize('jobaction.editProxy', "Edit Proxy");
constructor() {
constructor(
@ICommandService private _commandService: ICommandService
) {
super(EditProxyAction.ID, EditProxyAction.LABEL);
}
public run(info: any): TPromise<boolean> {
public run(actionInfo: IJobActionInfo): TPromise<boolean> {
this._commandService.executeCommand(
'agent.openProxyDialog',
actionInfo.ownerUri,
actionInfo.targetObject);
return TPromise.as(true);
}
}

View File

@@ -844,7 +844,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit {
public openCreateJobDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._commandService.executeCommand('agent.openCreateJobDialog', ownerUri);
this._commandService.executeCommand('agent.openJobDialog', ownerUri);
}
public refreshJobs() {

View File

@@ -163,7 +163,7 @@ export class OperatorsViewComponent extends JobManagementView implements OnInit
public openCreateOperatorDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._commandService.executeCommand('agent.openCreateOperatorDialog', ownerUri);
this._commandService.executeCommand('agent.openOperatorDialog', ownerUri);
}
private refreshJobs() {

View File

@@ -164,7 +164,7 @@ export class ProxiesViewComponent extends JobManagementView implements OnInit {
public openCreateProxyDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._commandService.executeCommand('agent.openCreateProxyDialog', ownerUri);
this._commandService.executeCommand('agent.openProxyDialog', ownerUri);
}
private refreshJobs() {