Agent - committer work (#4758)

* fix delete job

* added the ability to change and retrieve jobowner

* fixed UX for delete step

* improved operator actions

* fixed operators and proxies

* added errors for failures
This commit is contained in:
Aditya Bist
2019-03-29 13:46:52 -07:00
committed by GitHub
parent e70d5838a8
commit d4f287298f
9 changed files with 99 additions and 59 deletions

View File

@@ -201,7 +201,7 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
this._table.resizeCanvas();
}
protected getTableActions(): IAction[] {
protected getTableActions(targetObject: any): IAction[] {
let actions: IAction[] = [];
actions.push(this._instantiationService.createInstance(EditAlertAction));
actions.push(this._instantiationService.createInstance(DeleteAlertAction));
@@ -209,9 +209,10 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
}
protected getCurrentTableObject(rowIndex: number): any {
return (this.alerts && this.alerts.length >= rowIndex)
? this.alerts[rowIndex]
: undefined;
let targetObject = {
alertInfo: this.alerts && this.alerts.length >= rowIndex ? this.alerts[rowIndex] : undefined
};
return targetObject;
}
@@ -227,16 +228,6 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
public openCreateAlertDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._jobManagementService.getJobs(ownerUri).then((result) => {
if (result && result.jobs.length > 0) {
let jobs = [];
result.jobs.forEach(job => {
jobs.push(job.name);
});
this._commandService.executeCommand('agent.openAlertDialog', ownerUri, null, jobs);
} else {
this._commandService.executeCommand('agent.openAlertDialog', ownerUri, null, null);
}
});
this._commandService.executeCommand('agent.openAlertDialog', ownerUri, null, null);
}
}

View File

@@ -948,8 +948,8 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
return undefined;
}
public openCreateJobDialog() {
public async openCreateJobDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._commandService.executeCommand('agent.openJobDialog', ownerUri);
await this._commandService.executeCommand('agent.openJobDialog', ownerUri);
}
}