diff --git a/server/store/datastore/cron.go b/server/store/datastore/cron.go index ce2609269..89cf91e3e 100644 --- a/server/store/datastore/cron.go +++ b/server/store/datastore/cron.go @@ -35,7 +35,7 @@ func (s storage) CronFind(repo *model.Repo, id int64) (*model.Cron, error) { func (s storage) CronList(repo *model.Repo, p *model.ListOptions) ([]*model.Cron, error) { var crons []*model.Cron - return crons, s.paginate(p).Where("repo_id = ?", repo.ID).Find(&crons) + return crons, s.paginate(p).Where("repo_id = ?", repo.ID).OrderBy("name").Find(&crons) } func (s storage) CronUpdate(_ *model.Repo, cron *model.Cron) error { diff --git a/web/src/components/repo/settings/CronTab.vue b/web/src/components/repo/settings/CronTab.vue index 4e2e5ca8f..98d27cdef 100644 --- a/web/src/components/repo/settings/CronTab.vue +++ b/web/src/components/repo/settings/CronTab.vue @@ -16,12 +16,14 @@ :key="cron.id" class="items-center !bg-wp-background-200 !dark:bg-wp-background-100" > - {{ cron.name }} - - - {{ $t('repo.settings.crons.next_exec') }}: {{ date.toLocaleString(new Date(cron.next_exec * 1000)) }} + + {{ cron.name }} + + + {{ $t('repo.settings.crons.next_exec') }}: {{ date.toLocaleString(new Date(cron.next_exec * 1000)) }} + + {{ $t('repo.settings.crons.not_executed_yet') }} - {{ $t('repo.settings.crons.not_executed_yet') }}