schedules now get added in edit job (#2915)

This commit is contained in:
Aditya Bist
2018-10-16 22:51:54 -07:00
committed by GitHub
parent 67514ccc5f
commit 7ba14a3925
6 changed files with 23 additions and 17 deletions

View File

@@ -13,9 +13,11 @@ export class PickScheduleData implements IAgentDialogData {
public ownerUri: string;
public schedules: sqlops.AgentJobScheduleInfo[];
public selectedSchedule: sqlops.AgentJobScheduleInfo;
private jobName: string;
constructor(ownerUri:string) {
constructor(ownerUri:string, jobName: string) {
this.ownerUri = ownerUri;
this.jobName = jobName;
}
public async initialize() {
@@ -27,5 +29,8 @@ export class PickScheduleData implements IAgentDialogData {
}
public async save() {
let agentService = await AgentUtils.getAgentService();
this.selectedSchedule.jobName = this.jobName;
let result = await agentService.createJobSchedule(this.ownerUri, this.selectedSchedule);
}
}