Agent: Updated Alerts dialog UI (#1874)

* finished alert dialog UI

* removed unused import
This commit is contained in:
Aditya Bist
2018-07-10 14:21:58 -07:00
committed by GitHub
parent 0b1e9c7c66
commit 4eea24997f
5 changed files with 329 additions and 132 deletions

View File

@@ -164,7 +164,17 @@ export class AlertsViewComponent extends JobManagementView implements OnInit {
public openCreateAlertDialog() {
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
this._commandService.executeCommand('agent.openAlertDialog', 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);
}
});
}
private refreshJobs() {