Conversation
hehelove
added a commit
to hehelove/x-panel-ce
that referenced
this pull request
Apr 26, 2026
- 新增 service/cron_inspector.go:全局单例 GlobalCronInspector, 把 cron.EntryID 映射到 (name, spec) 元数据;List() 按 Next 升序 返回 CronJobInfo(id/name/spec/prev/next + 友好相对时间文本)。 - web/web.go:新增 trackedAddJob / trackedAddFunc 包一层后调 Track;保留原有 (EntryID, error) 签名让 StatsNotify 注册失败 仍能早返回。Server.Start 阶段调 Bind 注入 *cron.Cron。 - controller/xui.go:注册 /panel/cron_jobs(页面)和 /panel/cron_jobs/list(JSON)。 - html/cron_jobs.html:Ant Design Vue 表格,4 列(任务名 / cron 表达式 / 上次 / 下次),mounted 时 setInterval 30s 轮询;用 basePath 拼接 axios URL,subpath 部署也能用。 - 侧边栏菜单加入"定时任务"入口;zh_CN / zh_TW / en_US 三套 i18n 补齐 menu.cronJobs + pages.cronJobs.* 文案。 - 单测:CronInspector 空 List、Track+List、Bind 清空旧元数据、 并发 Track/List 不竞争、List 按 Next 升序;relativeTimeText 覆盖 zero / 秒/分/小时/天 + 过去/将来。 只读 by design:不暴露增删改接口,避免误操作打挂面板。
hehelove
added a commit
to hehelove/x-panel-ce
that referenced
this pull request
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the pull request?
Which part of the application is affected by the change?
Type of Changes
Screenshots