mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user