Agent: Added loading component to schedule list (#5992)

* added loading component to schedule list

* changed thenable to await

* throw error
This commit is contained in:
Aditya Bist
2019-06-19 12:32:14 -07:00
committed by GitHub
parent 1c706fdfca
commit 639efbcfad
2 changed files with 24 additions and 15 deletions

View File

@@ -20,11 +20,16 @@ export class PickScheduleData implements IAgentDialogData {
this.jobName = jobName;
}
public async initialize() {
public async initialize(): Promise<azdata.AgentJobScheduleInfo[]> {
let agentService = await AgentUtils.getAgentService();
let result = await agentService.getJobSchedules(this.ownerUri);
if (result && result.success) {
this.schedules = result.schedules;
try {
let result = await agentService.getJobSchedules(this.ownerUri);
if (result && result.success) {
this.schedules = result.schedules;
return this.schedules;
}
} catch (error) {
throw error;
}
}