feat(cron): register cron page in router + sidebar, fix Gateway RPC call formats

- main.js: register /cron route
- sidebar.js: add '定时任务' to '数据' section
- cron.js: fix RPC params to match Gateway API:
  - cron.list: add includeDisabled param
  - cron.add: use structured schedule{kind,expr} + payload{kind,message}
  - cron.update: use patch format
  - cron.run: add mode:'force'
  - Map Gateway CronJob state fields (lastRunStatus, lastRunAtMs, etc)
This commit is contained in:
晴天
2026-03-11 00:09:12 +08:00
parent 381c7c1bb4
commit 8bba06f552
2 changed files with 2 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ const NAV_ITEMS_FULL = [
section: '数据',
items: [
{ route: '/memory', label: '记忆文件', icon: 'memory' },
{ route: '/cron', label: '定时任务', icon: 'clock' },
]
},
{

View File

@@ -304,6 +304,7 @@ async function boot() {
registerRoute('/setup', () => import('./pages/setup.js'))
registerRoute('/docker', () => import('./pages/docker.js'))
registerRoute('/channels', () => import('./pages/channels.js'))
registerRoute('/cron', () => import('./pages/cron.js'))
renderSidebar(sidebar)
initRouter(content)