Skip to content

Commit ab96694

Browse files
committed
feat(schedule): improve ui
1 parent 7a2103a commit ab96694

File tree

6 files changed

+190
-53
lines changed

6 files changed

+190
-53
lines changed

api/router.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -620,19 +620,21 @@ func getSystemInfo(w http.ResponseWriter, r *http.Request) {
620620
authMethods.Email = &LoginEmailAuthMethod{}
621621
}
622622

623+
timezone := util.Config.Schedule.Timezone
624+
625+
if timezone == "" {
626+
timezone = "UTC"
627+
}
628+
623629
body := map[string]any{
624630
"version": util.Version(),
625631
"ansible": util.AnsibleVersion(),
626632
"web_host": util.Config.WebHost,
627633
"use_remote_runner": util.Config.UseRemoteRunner,
628-
629-
"auth_methods": authMethods,
630-
631-
"premium_features": proFeatures.GetFeatures(user),
632-
633-
"git_client": util.Config.GitClientId,
634-
635-
"schedule_timezone": util.Config.Schedule.Timezone,
634+
"auth_methods": authMethods,
635+
"premium_features": proFeatures.GetFeatures(user),
636+
"git_client": util.Config.GitClientId,
637+
"schedule_timezone": timezone,
636638
}
637639

638640
helpers.WriteJSON(w, http.StatusOK, body)

services/schedules/SchedulePool.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ func (r ScheduleRunner) Run() {
106106
task := db.Task{
107107
TemplateID: schedule.TemplateID,
108108
ProjectID: schedule.ProjectID,
109+
ScheduleID: &schedule.ID,
109110
}
110111

111112
_, err = r.pool.taskPool.AddTask(

web/package-lock.json

Lines changed: 18 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"axios": "^1.8.3",
1515
"chart.js": "^3.8.0",
1616
"core-js": "^3.40.0",
17-
"cron-parser": "^4.9.0",
17+
"cron-parser": "^5.3.0",
1818
"dayjs": "^1.11.13",
1919
"vue": "^2.6.14",
2020
"vue-chartjs": "^4.0.0",

0 commit comments

Comments
 (0)