Add Cron, CronType and Update Time for schedule (#17844)

Remove create time because update time is added

Signed-off-by: stonezdj <daojunz@vmware.com>
This commit is contained in:
stonezdj(Daojun Zhang) 2022-11-24 10:38:52 +08:00 committed by GitHub
parent fcf0e2014f
commit f8628258bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View File

@ -9500,12 +9500,19 @@ definitions:
vendor_id: vendor_id:
type: integer type: integer
description: the vendor id of the current task description: the vendor id of the current task
cron:
type: string
description: the cron of the current schedule task
cron_type:
type: string
description: the cron type of the current schedule task
extra_attrs: extra_attrs:
type: string type: string
description: the extra attributes description: the extra attributes
creation_time: update_time:
type: string type: string
format: date-time format: date-time
description: the update time of the schedule task
SchedulerStatus: SchedulerStatus:
type: object type: object
description: the scheduler status description: the scheduler status

View File

@ -142,7 +142,9 @@ func toScheduleResponse(schs []*scheduler.Schedule) []*models.ScheduleTask {
VendorType: s.VendorType, VendorType: s.VendorType,
VendorID: s.VendorID, VendorID: s.VendorID,
ExtraAttrs: string(extraAttr), ExtraAttrs: string(extraAttr),
CreationTime: strfmt.DateTime(s.CreationTime), Cron: s.CRON,
CronType: s.CRONType,
UpdateTime: strfmt.DateTime(s.UpdateTime),
}) })
} }
return result return result