@goodandready/dsh-cron 0.3.17 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/analytics-digest.js +0 -4
- package/lib/chat-start.js +7 -1
- package/lib/client.css +226 -0
- package/lib/client.js +813 -1186
- package/lib/cron-tool.js +4 -0
- package/lib/dag.js +12 -2
- package/lib/http-utils.js +79 -40
- package/lib/locales.json +336 -0
- package/lib/routes.js +42 -0
- package/lib/runner.js +25 -9
- package/lib/secrets.js +1 -0
- package/lib/store.js +43 -3
- package/package.json +14 -3
package/lib/client.js
CHANGED
|
@@ -4,7 +4,7 @@ factory: (require) => {
|
|
|
4
4
|
var module = { exports: {} }
|
|
5
5
|
var exports = module.exports
|
|
6
6
|
const React = window.React || require('react');
|
|
7
|
-
const
|
|
7
|
+
const _h = (...args) => (React && React.createElement ? React.createElement(...args) : null);
|
|
8
8
|
const ReactDOM = window.ReactDOM || require('react-dom/client');
|
|
9
9
|
const PLUGIN_ID = '@goodandready/dsh-cron';
|
|
10
10
|
const NS = 'dsh-cron';
|
|
@@ -43,7 +43,7 @@ CoreChevron = primitives && primitives.IconChevronDownOutline14;
|
|
|
43
43
|
} catch (e) {
|
|
44
44
|
/* Optional core chevron primitive not available; SVG fallback used */
|
|
45
45
|
}
|
|
46
|
-
const chevronNode = () => (CoreChevron ?
|
|
46
|
+
const chevronNode = () => (CoreChevron ? _h(CoreChevron) : _h('span', { style: { display: 'flex', alignItems: 'center' }, dangerouslySetInnerHTML: { __html: ICON_CHEVRON_DOWN } }));
|
|
47
47
|
const STRINGS = {
|
|
48
48
|
en: {
|
|
49
49
|
'sidebar.label': 'Scheduled tasks', 'sidebar.jobsTitle': 'Active jobs',
|
|
@@ -266,6 +266,9 @@ en: {
|
|
|
266
266
|
'form.agentPresetLabel': 'Agent preset',
|
|
267
267
|
'form.agentPresetPlaceholder': 'standard (leave empty for configured default)',
|
|
268
268
|
'form.agentPresetHint': 'Agent preset from dsh-agent-presets (e.g. standard, minimal, cordis, ptc). Mounts workspace and coding tools.',
|
|
269
|
+
'form.sessionTitleLabel': 'Session Title Template',
|
|
270
|
+
'form.sessionTitlePlaceholder': 'e.g. {{date}} a-share-review (supports {{date}})',
|
|
271
|
+
'form.sessionTitleHint': 'Name given to agent sessions created by this task. Supports {{date}} for YYYY-MM-DD. Defaults to "<YYYY-MM-DD> <title>".',
|
|
269
272
|
'form.targetSessionIdLabel': 'Target persistent session ID',
|
|
270
273
|
'form.targetSessionIdPlaceholder': 'e.g. audit-chat or dev-summary (empty = isolated run)',
|
|
271
274
|
'form.targetSessionIdHint': 'When specified, scheduled runs resume this session to maintain conversation context across runs instead of creating a new isolated session.',
|
|
@@ -310,185 +313,7 @@ en: {
|
|
|
310
313
|
'form.previewScheduleTitle': 'Next 5 scheduled runs:',
|
|
311
314
|
},
|
|
312
315
|
zh: {
|
|
313
|
-
'
|
|
314
|
-
'sidebar.noActiveJobs': '无运行中任务', 'sidebar.moreJobs': '及另外 {count} 个',
|
|
315
|
-
'chip.title': '定时任务 (Cron)', 'panel.back': '返回对话',
|
|
316
|
-
'panel.title': '定时任务', 'panel.subtitle': '让 DSH 规划任务、设置提醒或跟踪状态',
|
|
317
|
-
'actions.create': '新建', 'actions.createWithDsh': '💬 让 DSH 创建',
|
|
318
|
-
'actions.setupManually': '✏️ 手动配置', 'actions.runNow': '立即运行',
|
|
319
|
-
'actions.runNowShort': '运行', 'actions.edit': '编辑 / 详情',
|
|
320
|
-
'actions.duplicate': '复制任务', 'actions.tuneWithDsh': '让 DSH 优化',
|
|
321
|
-
'tune.startFailed': '无法启动优化会话: {error}', 'actions.delete': '删除任务',
|
|
322
|
-
'duplicate.done': '已创建副本并处于暂停状态:恢复前请先核对调度时间。',
|
|
323
|
-
'duplicate.oneShotHint': '该副本为一次性任务且已暂停,请设定新的执行时间后再启用。', 'duplicate.failed': '复制任务失败: {error}',
|
|
324
|
-
'transfer.exportTitle': '导出任务', 'transfer.importTitle': '导入任务',
|
|
325
|
-
'transfer.exported': '已成功导出 {count} 个任务。', 'transfer.exportFailed': '导出失败: {error}',
|
|
326
|
-
'transfer.importTitleModal': '导入任务',
|
|
327
|
-
'transfer.importHint': '仅导出任务静态配置:不包含历史记录与计数器。渠道通过凭据名称引用;注意完整导出保留自定义环境变量和 HTTP 请求头。',
|
|
328
|
-
'transfer.exportPrompt': '请选择导出模式:\n确定 = 净化导出(移除自定义环境变量与请求头)\n取消 = 完整原始导出',
|
|
329
|
-
'transfer.strategyAdd': '作为新任务导入(分配新 ID)', 'transfer.strategyReplace': '覆盖同 ID 任务',
|
|
330
|
-
'transfer.strategySkip': '跳过已存在的同 ID 任务',
|
|
331
|
-
'transfer.summary': '该文件包含 {total} 个任务:{add} 个新增,{replace} 个覆盖,{skip} 个跳过。',
|
|
332
|
-
'transfer.confirm': '开始导入', 'transfer.imported': '已成功导出 {count} 个任务。',
|
|
333
|
-
'transfer.importFailed': '导入失败: {error}', 'transfer.badFile': '所选文件不是有效的 JSON 导出文件: {error}',
|
|
334
|
-
'actions.pause': '暂停', 'actions.resume': '恢复',
|
|
335
|
-
'actions.settings': '通知与渠道设置', 'actions.dryRun': '空跑测试',
|
|
336
|
-
'actions.dryRunTitle': '空跑测试(模拟执行,不产生副作用且不发送通知)', 'actions.archive': '历史归档',
|
|
337
|
-
'actions.archiveTitle': '查看执行历史与日志归档', 'dryRun.title': '🧪 空跑模拟结果',
|
|
338
|
-
'dryRun.task': '任务', 'dryRun.status': '模拟状态',
|
|
339
|
-
'dryRun.duration': '耗时', 'dryRun.output': '模拟输出',
|
|
340
|
-
'dryRun.preflight': '预检结果', 'dryRun.close': '关闭',
|
|
341
|
-
'archive.title': '📜 运行历史归档', 'archive.totalRuns': '共记录 {total} 次运行',
|
|
342
|
-
'archive.empty': '该任务暂无历史运行归档。', 'archive.loadMore': '加载更多 ({shown} / {total})',
|
|
343
|
-
'archive.close': '关闭', 'form.reliabilityTitle': '🛡️ 可靠性、心跳监听与自愈',
|
|
344
|
-
'form.preflightLabel': '预检健康探测', 'form.preflightNone': '无',
|
|
345
|
-
'form.preflightHttp': 'HTTP (2xx 探测)', 'form.preflightShell': 'Shell 探测 (退出码 0)',
|
|
346
|
-
'form.preflightDisk': '磁盘空间探测 (挂载点:最小百分比)', 'form.preflightTargetLabel': '预检目标参数',
|
|
347
|
-
'form.preflightTargetPlaceholder': 'https://example.com/healthz 或 ls /data 或 /:10%',
|
|
348
|
-
'form.heartbeatIntervalLabel': '心跳打卡时限 (秒, 0 = 禁用)', 'form.gracePeriodLabel': '心跳宽限期 (秒)',
|
|
349
|
-
'form.priorityLabel': '队列优先级 (1-10,数值越大越先执行)', 'form.concurrencyGroupLabel': '并发分组名称',
|
|
350
|
-
'form.selfHealingLabel': '故障自愈脚本 (Shell)',
|
|
351
|
-
'form.selfHealingPlaceholder': 'systemctl restart app || true',
|
|
352
|
-
'form.autoDiagnoseLabel': '任务失败时启用 AI 智能分析诊断', 'form.agentPresetLabel': '智能体预设 (Agent Preset)',
|
|
353
|
-
'form.agentPresetPlaceholder': 'standard (留空使用全局默认预设)',
|
|
354
|
-
'form.agentPresetHint': '来自 dsh-agent-presets 的智能体预设(如 standard, minimal, cordis, ptc),挂载工作区工具与文件读写能力。',
|
|
355
|
-
'form.targetSessionIdLabel': '目标常驻会话 ID (Target Session ID)',
|
|
356
|
-
'form.targetSessionIdPlaceholder': '如 audit-chat 或 dev-summary(留空为单次隔离运行)',
|
|
357
|
-
'form.targetSessionIdHint': '配置后定时任务将在此常驻会话中持续交互,跨周期保留历史上下文对话记忆,不再每次新建孤立会话。',
|
|
358
|
-
'form.targetSessionResetLabel': '上下文轮转策略 (Session Rotation)',
|
|
359
|
-
'form.targetSessionResetNever': '永不轮转(单一会话持续累积)',
|
|
360
|
-
'form.targetSessionResetDaily': '每日轮转(每日自动开启新会话)',
|
|
361
|
-
'form.targetSessionResetWeekly': '每周轮转(每周自动开启新会话)',
|
|
362
|
-
'form.targetSessionResetHint': '自动按周期加注日期后缀轮转会话,有效防止长时间运行导致的模型上下文窗口超限与 Token 浪费。',
|
|
363
|
-
'form.previewSchedule': '预测下次运行时间', 'form.previewScheduleTitle': '未来 5 次计划运行时间:',
|
|
364
|
-
'search.placeholder': '搜索定时任务', 'filters.title': '筛选',
|
|
365
|
-
'filters.type': '类型', 'filters.model': '模型',
|
|
366
|
-
'filters.channel': '渠道', 'filters.any': '全部',
|
|
367
|
-
'filters.reset': '重置筛选', 'filters.empty': '没有匹配当前筛选条件的任务。',
|
|
368
|
-
'filters.showing': '显示 {shown} / 共 {total}', 'stats.activeTasks': '活跃任务',
|
|
369
|
-
'stats.totalRuns': '总运行次数', 'stats.totalTokens': '消耗 Token',
|
|
370
|
-
'stats.totalCost': '预估成本', 'tabs.all': '全部',
|
|
371
|
-
'tabs.active': '运行中', 'tabs.paused': '已暂停',
|
|
372
|
-
'tabs.completed': '已完成', 'list.empty': '暂无定时任务',
|
|
373
|
-
'list.emptyHint': '点击下方按钮让 DSH 规划任务,或手动配置。', 'list.oneShot': '一次性',
|
|
374
|
-
'list.runCount': '{count} 次运行', 'list.consecutiveFailures': '连续 {count} 次失败',
|
|
375
|
-
'list.lastRun': '上次: {time}', 'list.nextRun': '下次: {time}',
|
|
376
|
-
'list.badgeActive': '活跃', 'list.badgePaused': '已暂停',
|
|
377
|
-
'list.badgeCompleted': '已完成', 'list.configManaged': '配置只读',
|
|
378
|
-
'channel.telegram': 'Telegram', 'channel.discord': 'Discord',
|
|
379
|
-
'channel.slack': 'Slack', 'channel.ntfy': 'ntfy',
|
|
380
|
-
'channel.bark': 'Bark', 'channel.pushplus': 'PushPlus',
|
|
381
|
-
'channel.voice': '语音通话', 'channel.gitea': 'Gitea',
|
|
382
|
-
'channel.webhook': 'Webhook', 'modal.editTitle': '编辑任务',
|
|
383
|
-
'modal.newTitle': '新建定时任务', 'modal.statusActive': '活跃',
|
|
384
|
-
'modal.statusPaused': '已暂停', 'modal.params': '配置参数',
|
|
385
|
-
'modal.history': '运行历史 ({count})', 'modal.cancel': '取消',
|
|
386
|
-
'modal.confirmDiscard': '放弃未保存的内容?', 'modal.save': '保存修改',
|
|
387
|
-
'modal.create': '创建任务', 'history.loading': '正在加载历史记录...',
|
|
388
|
-
'history.empty': '暂无运行记录', 'history.summaryTokens': '消耗 Token: {count}',
|
|
389
|
-
'history.summaryCost': '预估成本: ${cost}', 'history.errorLabel': '错误详情:',
|
|
390
|
-
'history.outputLabel': '执行输出:', 'history.statusUncertain': '不确定',
|
|
391
|
-
'history.artifacts': '产物文件',
|
|
392
|
-
'history.resolveCompleted': '标记已完成', 'history.resolveFailed': '标记失败',
|
|
393
|
-
'history.statusUncertainHint': '服务重启中断 — 请确认结果', 'form.titleLabel': '任务名称 *',
|
|
394
|
-
'form.titlePlaceholder': '例如: 每周备份检查', 'form.typeLabel': '执行类型 *',
|
|
395
|
-
'form.promptLabel': '提示词内容 *', 'form.promptPlaceholder': '输入发送给智能体的执行指令...',
|
|
396
|
-
'form.modelLabel': 'AI 模型', 'form.modelDefault': '默认模型',
|
|
397
|
-
'form.fallbackModelLabel': '备用模型 (主模型失败时使用)', 'form.fallbackModelNone': '不使用备用模型',
|
|
398
|
-
'form.pipelineGroupLabel': '任务流水线串联', 'form.onSuccessLabel': '成功后触发任务 (ID 或名称)',
|
|
399
|
-
'form.onSuccessPlaceholder': '例如: task_upload_backup',
|
|
400
|
-
'form.onFailureLabel': '失败后触发告警任务 (ID 或名称)',
|
|
401
|
-
'form.onFailurePlaceholder': '例如: task_notify_incident',
|
|
402
|
-
'form.scheduleLabel': '调度计划 (Cron 或相对时间) *',
|
|
403
|
-
'form.schedulePlaceholder': '例如: 0 9 * * 1-5 或 15m 或 in 2 hours', 'form.channelsLabel': '通知渠道',
|
|
404
|
-
'form.channelsHint': '任务执行完毕后推送报告的目标渠道。', 'form.templateLabel': '自定义消息模板',
|
|
405
|
-
'form.templatePlaceholder': '留空使用默认摘要',
|
|
406
|
-
'form.templateHint': '支持变量: {title}, {status}, {output}, {error}, {durationMs}, {time}',
|
|
407
|
-
'form.silentRuleLabel': '静默规则 (可选)',
|
|
408
|
-
'form.silentRulePlaceholder': '例如: ALL_OK 或 status == 200',
|
|
409
|
-
'form.silentRuleHint': '若输出符合此规则,将不发送任何通知。', 'form.advancedToggle': '高级执行选项',
|
|
410
|
-
'form.timezoneLabel': '时区 (IANA 时区名)',
|
|
411
|
-
'form.timezonePlaceholder': '例如: Asia/Shanghai 或 UTC (留空使用服务器时区)',
|
|
412
|
-
'form.misfireLabel': '错过执行策略 (Misfire Policy)', 'form.misfireSkip': '跳过 (默认)',
|
|
413
|
-
'form.misfireRunOnce': '补跑一次', 'form.maxRetriesLabel': '失败重试次数 (0 = 不重试)',
|
|
414
|
-
'form.permissionPresetLabel': '权限预设', 'form.permissionDefault': '默认 (继承主配置)',
|
|
415
|
-
'form.permissionRestricted': '受限模式 (只读)', 'form.permissionFull': '完全访问权限',
|
|
416
|
-
'form.envLabel': '环境变量 (KEY=VALUE, 每行一个)', 'form.envPlaceholder': 'FOO=bar\nAPI_KEY=secret',
|
|
417
|
-
'form.cwdLabel': '工作目录 (绝对路径)', 'form.cwdPlaceholder': '/var/www/my-project',
|
|
418
|
-
'form.workspaceIdLabel': '关联 DSH Workspace ID', 'form.workspaceIdPlaceholder': '留空使用默认工作区',
|
|
419
|
-
'form.worktreeLabel': '在独立的临时 Git Worktree 中执行',
|
|
420
|
-
'form.keepWorktreeLabel': '执行结束后保留 Git Worktree (不自动清理)', 'form.timeoutLabel': '超时时间 (秒)',
|
|
421
|
-
'form.overlapLabel': '并发策略', 'form.overlapSkip': '跳过 (默认)',
|
|
422
|
-
'form.overlapQueue': '排队等待', 'form.overlapTerminate': '终止前次运行',
|
|
423
|
-
'form.overlapAllow': '允许并发', 'form.kanbanLabel': '看板同步模式',
|
|
424
|
-
'form.kanbanNone': '不同步到看板', 'form.kanbanCreate': '仅创建新卡片',
|
|
425
|
-
'form.kanbanSync': '保持卡片同步更新', 'settings.deliveryChannels': '推送渠道配置',
|
|
426
|
-
'settings.credentialsHint': '安全凭据在 DSH Credentials 服务中统一管理。',
|
|
427
|
-
'settings.saveChannels': '保存渠道配置', 'settings.testing': '正在测试...',
|
|
428
|
-
'settings.testSuccess': '✅ 测试成功!', 'settings.automationHint': '用于静默规则研判和故障诊断的辅助模型。留空沿用任务自身模型。',
|
|
429
|
-
'settings.silentRuleModelLabel': '静默规则研判模型',
|
|
430
|
-
'settings.secretsOnCard': '设置中引用的凭据将在前端脱敏展示,并通过名称引用。', 'form.nextRunLabel': '下次执行: ',
|
|
431
|
-
'form.notScheduled': '未安排计划', 'settings.loading': '正在加载设置...',
|
|
432
|
-
'settings.unavailable': '设置当前不可用。', 'settings.retry': '重试',
|
|
433
|
-
'settings.cardTitle': '⏰ 定时任务调度器 (Cron)',
|
|
434
|
-
'settings.cardDesc': '定时计划任务(Cron/间隔)、后台智能体场景以及支持 Telegram、Discord、Slack、ntfy、Bark、PushPlus、语音和 Gitea 的通知推送。',
|
|
435
|
-
'settings.openPanel': '打开任务管理看板', 'settings.modalTitle': '通知与渠道设置',
|
|
436
|
-
'settings.tokenLabel': 'Telegram Bot Token',
|
|
437
|
-
'settings.tokenPlaceholder': '123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ',
|
|
438
|
-
'settings.tokenPlaceholderDefault': '使用 DSH 全局配置的机器人 (或在此输入自定义 Token)',
|
|
439
|
-
'settings.defaultHint': '✓ 检测到 DSH 环境已配置默认 Bot', 'settings.chatIdLabel': 'Telegram Chat ID',
|
|
440
|
-
'settings.chatIdPlaceholder': '例如: 345678901', 'settings.kanbanUrlLabel': 'Kanban 服务基础地址',
|
|
441
|
-
'settings.globalNotify': '全局开启所有任务结果推送至 Telegram',
|
|
442
|
-
'settings.globalOnlyFailure': '全局模式:仅在失败时推送 (成功静默)',
|
|
443
|
-
'settings.dynamicCredentials': '动态凭据解析 (credential://...)',
|
|
444
|
-
'settings.dynamicCredentialsHint': '运行时从凭据服务动态解析 credential://... 且不泄露到存储 (#335)',
|
|
445
|
-
'settings.testTelegram': '🔔 测试 Telegram 发送', 'settings.testKanban': '📋 测试 Kanban',
|
|
446
|
-
'settings.sending': '正在发送...', 'settings.checkingKanban': '正在连接 Kanban...',
|
|
447
|
-
'settings.testOk': '✅ 测试消息已成功发送至 Telegram!', 'settings.testFail': '❌ 发送失败: {error}',
|
|
448
|
-
'settings.kanbanOk': '✅ Kanban 卡片创建成功', 'settings.kanbanFail': '❌ {error}',
|
|
449
|
-
'settings.save': '保存设置', 'settings.saved': '✓ 已保存',
|
|
450
|
-
'settings.saveError': '保存失败: {error}', 'settings.saveErrorUnknown': '未知错误',
|
|
451
|
-
'updater.title': '插件自更新', 'updater.btnCheck': '检查更新',
|
|
452
|
-
'updater.checking': '正在检查...', 'updater.btnUpdate': '升级至 v{version}',
|
|
453
|
-
'updater.updating': '正在更新...', 'updater.desc': '通过 npm 仓库在线检查并就地升级插件,无需 SSH 终端操作。',
|
|
454
|
-
'updater.current': '当前版本: v{version}', 'updater.available': '发现新版本: v{version}',
|
|
455
|
-
'updater.upToDate': '已是最新版本', 'updater.success': '已成功升级至 v{version}。请重启 DSH 或重载配置以应用更新。',
|
|
456
|
-
'dsh.modalTitle': '让 DSH 智能体创建任务', 'dsh.descLabel': '请描述你的任务目标和执行频率:',
|
|
457
|
-
'dsh.placeholder': '例如: 每两小时检查一次磁盘空间和失败的 systemd 守护进程,并在异常时报警...',
|
|
458
|
-
'dsh.sendHint': '按 Ctrl+Enter 发送', 'dsh.sendTitle': '提交给智能体',
|
|
459
|
-
'dsh.startFailed': '启动智能体对话失败: {error}', 'dsh.launchError': '执行错误: {error}',
|
|
460
|
-
'confirm.delete': '确定删除该任务吗?', 'form.requireApprovalLabel': '执行前需人工确认审批',
|
|
461
|
-
'form.requireApprovalHint': '开启后,任务执行前将挂起并等待授权用户批准提议 (#318)。',
|
|
462
|
-
'actions.approve': '批准', 'actions.reject': '拒绝', 'approval.waiting': '等待人工审批',
|
|
463
|
-
'approval.approved': '已批准', 'approval.rejected': '已拒绝',
|
|
464
|
-
'chainGraph.modalTitle': '任务链与检查点依赖图', 'chainGraph.viewGraph': '任务链图',
|
|
465
|
-
'chainGraph.noNodes': '未找到该任务或运行的关联步骤。', 'chainGraph.retryStep': '重试此步骤',
|
|
466
|
-
'chainGraph.stepSuccess': '成功', 'chainGraph.stepFailed': '失败', 'chainGraph.stepPending': '等待中', 'chainGraph.close': '关闭', 'chainGraph.decisionNode': '条件决策节点', 'chainGraph.stepSkipped': '已跳过', 'history.doctorDiagnosis': 'Doctor 诊断与建议修复', 'history.doctorApply': '一键应用修复', 'history.doctorRevert': '恢复上一版本代码', 'history.autoHealed': '已由 Doctor 自动修复', 'form.autoHealLabel': '自主 Self-Healing Doctor 自动修复', 'form.autoHealHint': '当任务失败时自动诊断并安全修复(每天上限 1 次)', 'form.elseTaskLabel': '默认后备任务 (elseTask)', 'form.elseTaskHint': '当没有分支条件匹配时触发的目标任务', 'form.elseTaskPlaceholder': '如 task-fallback',
|
|
467
|
-
'adaptive.badge': '自适应', 'adaptive.idle': '空闲', 'adaptive.backoff': '避让中',
|
|
468
|
-
'form.adaptiveEnabled': '自适应轮询 (Adaptive Polling)', 'form.adaptiveHint': '数据无变化时指数级延长执行间隔',
|
|
469
|
-
'liveLog.modalTitle': '实时任务执行日志流', 'liveLog.viewLog': '实时日志',
|
|
470
|
-
'liveLog.autoScroll': '自动滚动', 'liveLog.connecting': '正在连接日志流...', 'liveLog.waiting': '等待运行器输出...', 'liveLog.completed': '日志流已结束', 'liveLog.close': '关闭日志流',
|
|
471
|
-
'timeline.modalTitle': '24小时调度时间线', 'timeline.buttonLabel': '时间线',
|
|
472
|
-
'timeline.buttonTitle': '查看24小时预测任务调度与并发时间线',
|
|
473
|
-
'timeline.tabTimeline': '调度时间线', 'timeline.legendDesc': '未来24小时各时段任务预计执行分布:',
|
|
474
|
-
'timeline.peakWarning': '并发峰值预警',
|
|
475
|
-
'heatmap.modalTitle': '成本与Token消耗热力图', 'heatmap.buttonLabel': '热力图',
|
|
476
|
-
'heatmap.tabHeatmap': '成本热力图', 'heatmap.matrixDesc': '每周各时段成本分布矩阵(7天 × 24小时):',
|
|
477
|
-
'digest.modalTitle': '自动化与成本分析摘要', 'digest.buttonLabel': '分析摘要',
|
|
478
|
-
'digest.buttonTitle': '查看 7 天或 30 天运行统计与花费摘要',
|
|
479
|
-
'digest.period7': '最近 7 天', 'digest.period30': '最近 30 天',
|
|
480
|
-
'digest.executions': '执行次数', 'digest.tokens': 'Token 消耗', 'digest.cost': '花费 (USD)', 'digest.fleet': '任务总览',
|
|
481
|
-
'digest.unstableTitle': '最不稳定任务排行', 'digest.expensiveTitle': '资源消耗排行',
|
|
482
|
-
'digest.sendTelegram': '发送至 Telegram', 'digest.copyMarkdown': '复制 Markdown', 'digest.copied': '已复制!',
|
|
483
|
-
'digest.sentSuccess': '已成功发送至 Telegram!',
|
|
484
|
-
'prompt.version': '提示词版本', 'prompt.rollback': '回退至 v', 'prompt.history': '提示词历史', 'prompt.successRate': '成功率',
|
|
485
|
-
'form.chainingTitle': '任务链与 DAG 编排', 'form.onSuccessLabel': '成功后触发 (任务 ID)',
|
|
486
|
-
'form.onSuccessHint': '成功后并发触发的任务 ID,逗号分隔 (Fan-Out)',
|
|
487
|
-
'form.onFailureLabel': '失败后触发 (任务 ID)', 'form.onFailureHint': '失败后触发的任务 ID,逗号分隔',
|
|
488
|
-
'form.dependsOnLabel': '依赖任务 (dependsOn)', 'form.dependsOnHint': '执行前需等待的前置任务 ID,逗号分隔 (Fan-In)',
|
|
489
|
-
'form.joinPolicyLabel': '合并策略', 'form.joinPolicyAll': '所有前置均成功 (all_success)', 'form.joinPolicyAny': '任一前置成功即可 (any_success)',
|
|
490
|
-
'recipe.dependenciesMissing': '缺少必要集成服务或凭据',
|
|
491
|
-
'list.loadErrorPrefix': '加载任务列表失败'
|
|
316
|
+
'modal.confirmDiscard': '放弃未保存的内容?',
|
|
492
317
|
}
|
|
493
318
|
};
|
|
494
319
|
let translate = (key, vars) => {
|
|
@@ -501,238 +326,26 @@ s = s.split('{' + k + '}').join(String(vars[k]));
|
|
|
501
326
|
return s;
|
|
502
327
|
};
|
|
503
328
|
const T = (key, vars) => translate(key, vars);
|
|
504
|
-
const STYLES = `
|
|
505
|
-
:root {
|
|
506
|
-
--dsh-cron-success: var(--dsw-alias-state-success-primary);
|
|
507
|
-
--dsh-cron-success-bg: color-mix(in srgb, var(--dsh-cron-success) 10%, transparent);
|
|
508
|
-
--dsh-cron-danger: var(--dsw-alias-state-error-primary);
|
|
509
|
-
--dsh-cron-danger-bg: color-mix(in srgb, var(--dsh-cron-danger) 10%, transparent);
|
|
510
|
-
--dsh-cron-info: var(--dsw-alias-state-brand-primary);
|
|
511
|
-
--dsh-cron-info-bg: color-mix(in srgb, var(--dsh-cron-info) 12%, transparent);
|
|
512
|
-
--dsh-cron-accent: var(--dsw-alias-state-info-primary);
|
|
513
|
-
--dsh-cron-accent-bg: color-mix(in srgb, var(--dsh-cron-accent) 12%, transparent);
|
|
514
|
-
--dsh-cron-warning: var(--dsw-alias-state-warning-primary);
|
|
515
|
-
--dsh-cron-warning-bg: color-mix(in srgb, var(--dsh-cron-warning) 12%, transparent);
|
|
516
|
-
}
|
|
517
|
-
[data-pane=conversation], [class*=centerCol] {
|
|
518
|
-
position: relative !important;
|
|
519
|
-
}
|
|
520
|
-
[${VIEW_ATTR}] {
|
|
521
|
-
z-index: 60;
|
|
522
|
-
background: var(--dsw-alias-bg-base);
|
|
523
|
-
display: none;
|
|
524
|
-
position: absolute;
|
|
525
|
-
inset: 0;
|
|
526
|
-
}
|
|
527
|
-
html[${ACTIVE_ATTR}] [${VIEW_ATTR}] {
|
|
528
|
-
display: block !important;
|
|
529
|
-
}
|
|
530
|
-
html[${ACTIVE_ATTR}] [data-pane=conversation] > *:not([${VIEW_ATTR}]),
|
|
531
|
-
html[${ACTIVE_ATTR}] [class*=centerCol] > *:not([${VIEW_ATTR}]) {
|
|
532
|
-
display: none !important;
|
|
533
|
-
}
|
|
534
|
-
.dsh-cron-entry-clone { display: flex; align-items: center; gap: 8px; }
|
|
535
|
-
.dsh-cron-entry-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px; }
|
|
536
|
-
.dsh-cron-entry-label { text-overflow: ellipsis; overflow: hidden; }
|
|
537
|
-
[data-dsh-frame][data-sidebar-collapsed] .dsh-cron-entry-label { display: none; }
|
|
538
|
-
.dsh-cron-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-primary); overflow-y: auto; padding: 24px 48px 32px; z-index: 100; box-sizing: border-box; }
|
|
539
|
-
.dsh-cron-container { max-width: 960px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; padding: 8px 0 32px; box-sizing: border-box; }
|
|
540
|
-
.dsh-cron-top-bar { display: flex; align-items: center; gap: 12px; }
|
|
541
|
-
.dsh-cron-back-btn { appearance: none; font: inherit; cursor: pointer; color: var(--dsw-alias-label-secondary); background: 0 0; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; align-items: center; gap: 6px; padding: 4px 12px; font-size: 13px; display: inline-flex; flex: none; height: 32px; box-sizing: border-box; }
|
|
542
|
-
.dsh-cron-back-btn:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-4, var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent))); }
|
|
543
|
-
.dsh-cron-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--dsw-alias-border-l2); }
|
|
544
|
-
.dsh-cron-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
|
|
545
|
-
.dsh-cron-subtitle { font-size: 14px; color: var(--dsw-alias-label-secondary); line-height: 1.5; }
|
|
546
|
-
.dsh-cron-create-btn { appearance: none; display: inline-flex; align-items: center; gap: 6px; background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-primary); border: 1px solid var(--dsw-alias-border-l2); border-radius: 9999px; padding: 8px 16px; font-size: 14px; font-weight: 500; cursor: pointer; position: relative; }
|
|
547
|
-
.dsh-cron-create-btn:hover { background: var(--dsw-alias-bg-layer-hover, var(--dsw-alias-interactive-bg-hover)); }
|
|
548
|
-
.dsh-cron-dropdown { position: absolute; top: calc(100% + 6px); right: 0; width: 200px; background: var(--dsw-alias-bg-layer-3); border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; padding: 6px; box-shadow: 0 10px 25px color-mix(in srgb, var(--dsw-alias-bg-mask) 50%, transparent); z-index: 200; }
|
|
549
|
-
.dsh-cron-dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: transparent; border: none; border-radius: 8px; color: var(--dsw-alias-label-primary); font-size: 13.5px; text-align: left; cursor: pointer; }
|
|
550
|
-
.dsh-cron-dropdown-item:hover { background: var(--dsw-alias-interactive-bg-hover); }
|
|
551
|
-
.dsh-cron-search-bar { position: relative; margin-bottom: 0; }
|
|
552
|
-
.dsh-cron-search-input { width: 100%; height: 36px; background: var(--dsw-alias-bg-layer-2); border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; padding: 0 12px 0 38px; color: var(--dsw-alias-label-primary, inherit); font-size: 13px; outline: none; box-sizing: border-box; }
|
|
553
|
-
.dsh-cron-search-input:focus { outline: none; border-color: var(--dsh-cron-info); }
|
|
554
|
-
.dsh-cron-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dsw-alias-label-tertiary); }
|
|
555
|
-
.dsh-cron-filters { margin-top: 8px; }
|
|
556
|
-
.dsh-cron-filter-toggle { background: none; border: 1px solid var(--dsw-alias-border-l2); color: var(--dsw-alias-label-secondary); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
|
|
557
|
-
.dsh-cron-filter-toggle:hover { color: var(--dsw-alias-label-primary); border-color: var(--dsh-cron-info); }
|
|
558
|
-
.dsh-cron-filter-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; background: var(--dsw-alias-bg-layer-3, color-mix(in srgb, var(--dsw-alias-label-primary) 2%, transparent)); }
|
|
559
|
-
.dsh-cron-filter-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dsw-alias-label-tertiary); }
|
|
560
|
-
.dsh-cron-filter-field select { background: var(--dsw-alias-bg-layer-2); border: 1px solid var(--dsw-alias-border-l2); color: var(--dsw-alias-label-primary, inherit); border-radius: 6px; padding: 5px 8px; font-size: 12.5px; }
|
|
561
|
-
.dsh-cron-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
562
|
-
.dsh-cron-tab { appearance: none; background: transparent; border: 1px solid var(--dsw-alias-border-l2); padding: 4px 12px; border-radius: 999px; color: var(--dsw-alias-label-secondary); font-size: 12px; font-weight: 500; cursor: pointer; }
|
|
563
|
-
.dsh-cron-tab[data-active="true"] { background: var(--dsw-alias-bg-layer-4); color: var(--dsw-alias-label-primary); border-color: var(--dsw-alias-label-dimmed, var(--dsw-alias-border-l2)); }
|
|
564
|
-
.dsh-cron-task-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 0; }
|
|
565
|
-
.dsh-cron-task-item { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--dsw-alias-bg-layer-3); border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
|
|
566
|
-
.dsh-cron-task-item:hover, .dsh-cron-task-item:focus-visible { background: var(--dsw-alias-bg-layer-4); border-color: var(--dsw-alias-label-dimmed, var(--dsw-alias-border-l1)); outline: none; }
|
|
567
|
-
.dsh-cron-task-prompt-preview { font-size: 12.5px; color: var(--dsw-alias-label-secondary); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; line-height: 1.3; }
|
|
568
|
-
.dsh-cron-type-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l2); text-transform: uppercase; font-weight: 500; margin-left: 8px; vertical-align: middle; }
|
|
569
|
-
.dsh-cron-tag-success { background: var(--dsh-cron-info-bg); color: var(--dsh-cron-info); border-color: var(--dsh-cron-info); }
|
|
570
|
-
.dsh-cron-tag-failure { background: var(--dsh-cron-danger-bg); color: var(--dsh-cron-danger); border-color: var(--dsh-cron-danger); }
|
|
571
|
-
.dsh-cron-tag-heartbeat { background: var(--dsh-cron-accent-bg); color: var(--dsh-cron-accent); border-color: var(--dsh-cron-accent); }
|
|
572
|
-
.dsh-cron-tag-session { background: var(--dsh-cron-info-bg); color: var(--dsh-cron-info); border-color: var(--dsh-cron-info); }
|
|
573
|
-
.dsh-cron-tag-preflight { background: var(--dsh-cron-warning-bg); color: var(--dsh-cron-warning); border-color: var(--dsh-cron-warning); }
|
|
574
|
-
.dsh-cron-task-model-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l2); background: var(--dsw-alias-bg-layer-2, color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent)); color: var(--dsw-alias-label-secondary); margin-left: 8px; vertical-align: middle; }
|
|
575
|
-
.dsh-cron-task-actions { display: flex; gap: 8px; }
|
|
576
|
-
.dsh-cron-icon-btn { appearance: none; font: inherit; background: var(--dsw-alias-bg-layer-2, transparent); border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; color: var(--dsw-alias-label-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s ease; }
|
|
577
|
-
.dsh-cron-icon-btn:hover { background: var(--dsw-alias-bg-layer-4); border-color: var(--dsw-alias-label-dimmed, var(--dsw-alias-border-l2)); }
|
|
578
|
-
.dsh-cron-icon-btn.dsh-cron-danger { color: var(--dsh-cron-danger); border-color: var(--dsh-cron-danger-bg); }
|
|
579
|
-
.dsh-cron-icon-btn.dsh-cron-danger:hover { background: var(--dsh-cron-danger-bg); border-color: var(--dsh-cron-danger); }
|
|
580
|
-
.dsh-cron-task-status-btn { background: none; border: 1px solid var(--dsw-alias-border-l2); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); cursor: pointer; flex-shrink: 0; }
|
|
581
|
-
.dsh-cron-task-status-btn[data-active="true"] { color: var(--dsh-cron-success); border-color: var(--dsh-cron-success); }
|
|
582
|
-
.dsh-cron-recs-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
|
|
583
|
-
.dsh-cron-recs-list { display: flex; flex-direction: column; gap: 10px; }
|
|
584
|
-
.dsh-cron-rec-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--dsw-alias-bg-layer-3); border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; cursor: pointer; transition: background 0.15s; }
|
|
585
|
-
.dsh-cron-rec-card:hover, .dsh-cron-rec-card:focus-visible { background: var(--dsw-alias-bg-layer-4); border-color: var(--dsw-alias-label-dimmed, var(--dsw-alias-border-l2)); outline: none; }
|
|
586
|
-
.dsh-cron-rec-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--dsw-alias-bg-layer-2, color-mix(in srgb, var(--dsw-alias-label-primary) 3%, transparent)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
587
|
-
.dsh-cron-rec-content { flex: 1; min-width: 0; }
|
|
588
|
-
.dsh-cron-rec-title { font-size: 14.5px; font-weight: 500; margin-bottom: 4px; }
|
|
589
|
-
.dsh-cron-rec-time { font-size: 13px; color: var(--dsw-alias-label-secondary); font-weight: normal; margin-left: 8px; }
|
|
590
|
-
.dsh-cron-rec-desc { font-size: 13px; color: var(--dsw-alias-label-tertiary); }
|
|
591
|
-
.dsh-cron-modal-overlay { position: fixed; inset: 0; background: var(--dsw-alias-bg-mask, color-mix(in srgb, #000 75%, transparent)); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; box-sizing: border-box; overflow-y: auto; }
|
|
592
|
-
.dsh-cron-modal { background: var(--dsw-alias-bg-layer-2); border: 1px solid var(--dsw-alias-border-l2); border-radius: 16px; width: 100%; max-width: 540px; max-height: min(90vh, calc(100vh - 36px)); overflow-y: auto; padding: 24px; box-shadow: 0 20px 40px color-mix(in srgb, var(--dsw-alias-bg-mask) 60%, transparent); box-sizing: border-box; }
|
|
593
|
-
.dsh-cron-modal-scroll { max-width: 640px; max-height: min(90vh, calc(100vh - 36px)); overflow-y: auto; }
|
|
594
|
-
.dsh-cron-modal::-webkit-scrollbar { width: 6px; }
|
|
595
|
-
.dsh-cron-modal::-webkit-scrollbar-track { background: transparent; }
|
|
596
|
-
.dsh-cron-modal::-webkit-scrollbar-thumb { background: var(--dsw-alias-border-l2); border-radius: 3px; }
|
|
597
|
-
.dsh-cron-modal::-webkit-scrollbar-thumb:hover { background: var(--dsw-alias-label-tertiary); }
|
|
598
|
-
.dsh-cron-section-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; padding: 0; margin-bottom: 10px; font: inherit; font-weight: 500; font-size: 12.5px; color: var(--dsw-alias-label-secondary); cursor: pointer; }
|
|
599
|
-
.dsh-cron-section-head:hover { color: var(--dsw-alias-label-primary); }
|
|
600
|
-
.dsh-cron-section-chevron { transition: transform 0.15s ease; display: inline-block; }
|
|
601
|
-
.dsh-cron-section-chevron[data-open="false"] { transform: rotate(-90deg); }
|
|
602
|
-
.dsh-cron-section-body { padding-bottom: 4px; }
|
|
603
|
-
.dsh-cron-modal-title { font-size: 18px; font-weight: 600; margin-bottom: 18px; }
|
|
604
|
-
.dsh-cron-form-group { margin-bottom: 16px; }
|
|
605
|
-
.dsh-cron-form-group label { display: block; font-size: 13px; color: var(--dsw-alias-label-secondary); margin-bottom: 6px; }
|
|
606
|
-
.dsh-cron-form-group input, .dsh-cron-form-group textarea, .dsh-cron-form-group select { width: 100%; background: var(--dsw-alias-bg-layer-2); border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; padding: 8px 12px; color: var(--dsw-alias-label-primary); font-size: 13px; outline: none; box-sizing: border-box; }
|
|
607
|
-
.dsh-cron-form-group input:focus, .dsh-cron-form-group textarea:focus, .dsh-cron-form-group select:focus { outline: none; border-color: var(--dsh-cron-info); }
|
|
608
|
-
.dsh-cron-form-group select { cursor: pointer; }
|
|
609
|
-
.dsh-cron-form-group textarea { min-height: 80px; resize: vertical; }
|
|
610
|
-
.dsh-cron-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
|
611
|
-
.dsh-cron-modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px; position: sticky; bottom: -24px; background: var(--dsw-alias-bg-layer-2); border-top: 1px solid var(--dsw-alias-border-l2); padding-top: 14px; padding-bottom: 4px; margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; z-index: 10; }
|
|
612
|
-
.dsh-cron-btn-primary { background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-layer-3); border: 1px solid transparent; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
|
|
613
|
-
.dsh-cron-btn-primary:hover:not(:disabled) { opacity: 0.88; }
|
|
614
|
-
.dsh-cron-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
615
|
-
.dsh-cron-btn-secondary { appearance: none; font: inherit; background: var(--dsw-alias-bg-layer-2, transparent); color: var(--dsw-alias-label-primary); border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s ease; }
|
|
616
|
-
.dsh-cron-btn-secondary:hover:not(:disabled) { background: var(--dsw-alias-bg-layer-4); border-color: var(--dsw-alias-label-dimmed, var(--dsw-alias-border-l2)); }
|
|
617
|
-
.dsh-cron-chat-box { position: relative; background: var(--dsw-alias-bg-base); border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; padding: 12px; }
|
|
618
|
-
.dsh-cron-chat-input { width: 100%; background: transparent; border: none; color: var(--dsw-alias-label-primary); font-size: 14px; min-height: 100px; resize: vertical; outline: none; box-sizing: border-box; line-height: 1.5; }
|
|
619
|
-
.dsh-cron-chat-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--dsw-alias-border-l1); }
|
|
620
|
-
.dsh-cron-chat-hint { font-size: 12px; color: var(--dsw-alias-label-tertiary); }
|
|
621
|
-
.dsh-cron-send-btn { width: 34px; height: 34px; border-radius: 8px; background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-base); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.1s, background 0.15s; }
|
|
622
|
-
.dsh-cron-send-btn:hover:not(:disabled) { transform: translateY(-1px); }
|
|
623
|
-
.dsh-cron-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
624
|
-
.dsh-cron-card { background: var(--dsw-alias-bg-layer-3); border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; padding: 18px 20px; margin-bottom: 0; display: flex; flex-direction: column; gap: 14px; }
|
|
625
|
-
.dsh-cron-card-head-btn { appearance: none; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; background: 0 0; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 0; }
|
|
626
|
-
.dsh-cron-card-head-btn .dsh-cron-card-title { flex: 1; }
|
|
627
|
-
.dsh-cron-card-title { font-size: 16px; font-weight: 600; color: var(--dsw-alias-label-primary); }
|
|
628
|
-
.dsh-cron-chev { margin-left: auto; flex: none; color: var(--dsw-alias-label-tertiary); transition: transform 0.16s; display: flex; align-items: center; }
|
|
629
|
-
.dsh-cron-chev-open { transform: rotate(180deg); }
|
|
630
|
-
.dsh-cron-card-body { border-top: 1px solid var(--dsw-alias-border-l2); margin-top: 2px; padding-top: 14px; }
|
|
631
|
-
.dsh-cron-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
|
|
632
|
-
.dsh-cron-card-desc { font-size: 13px; color: var(--dsw-alias-label-secondary); line-height: 1.4; }
|
|
633
|
-
.dsh-cron-modal-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--dsw-alias-border-l2); margin-bottom: 18px; padding-bottom: 2px; }
|
|
634
|
-
.dsh-cron-modal-tab { appearance: none; background: transparent; border: none; border-bottom: 2px solid transparent; padding: 8px 14px; font-size: 13.5px; color: var(--dsw-alias-label-tertiary); cursor: pointer; font-weight: 500; transition: color 0.15s, border-color 0.15s; }
|
|
635
|
-
.dsh-cron-modal-tab:hover { color: var(--dsw-alias-label-secondary); }
|
|
636
|
-
.dsh-cron-modal-tab[data-active="true"] { color: var(--dsw-alias-label-primary); border-bottom-color: var(--dsw-alias-label-primary); }
|
|
637
|
-
.dsh-cron-history-list { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
|
|
638
|
-
.dsh-cron-history-item { background: var(--dsw-alias-bg-base); border: 1px solid var(--dsw-alias-border-l1); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; }
|
|
639
|
-
.dsh-cron-history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
|
|
640
|
-
.dsh-cron-history-status { font-weight: 500; font-size: 11px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l2); }
|
|
641
|
-
.dsh-cron-history-status[data-status="success"] { background: var(--dsh-cron-success-bg); color: var(--dsh-cron-success); border-color: var(--dsh-cron-success); }
|
|
642
|
-
.dsh-cron-history-status[data-status="validation_failed"] { background: var(--dsh-cron-danger-bg); color: var(--dsh-cron-danger); border-color: var(--dsh-cron-danger); }
|
|
643
|
-
.dsh-cron-stage-pill { font-size: 10.5px; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--dsw-alias-border-l2); color: var(--dsw-alias-label-secondary); }
|
|
644
|
-
.dsh-cron-stage-pill[data-status="success"], .dsh-cron-stage-pill[data-status="delivered"] { background: var(--dsh-cron-success-bg); color: var(--dsh-cron-success); border-color: var(--dsh-cron-success); }
|
|
645
|
-
.dsh-cron-stage-pill[data-status="failed"], .dsh-cron-stage-pill[data-status="error"] { background: var(--dsh-cron-danger-bg); color: var(--dsh-cron-danger); border-color: var(--dsh-cron-danger); }
|
|
646
|
-
.dsh-cron-stage-pill[data-status="partial"] { background: var(--dsh-cron-warning-bg); color: var(--dsh-cron-warning); border-color: var(--dsh-cron-warning); }
|
|
647
|
-
.dsh-cron-stage-pill[data-status="skipped"] { opacity: 0.6; }
|
|
648
|
-
.dsh-cron-history-status[data-status="error"], .dsh-cron-history-status[data-status="timeout"] { background: var(--dsh-cron-danger-bg); color: var(--dsh-cron-danger); border-color: var(--dsh-cron-danger); }
|
|
649
|
-
.dsh-cron-history-status[data-status="skipped"], .dsh-cron-history-status[data-status="missed"] { background: var(--dsh-cron-warning-bg); color: var(--dsh-cron-warning); border-color: var(--dsh-cron-warning); }
|
|
650
|
-
.dsh-cron-history-time { color: var(--dsw-alias-label-tertiary); font-size: 12px; }
|
|
651
|
-
.dsh-cron-history-output { background: var(--dsw-alias-bg-base); border: 1px solid var(--dsw-alias-border-l1); border-radius: 6px; padding: 8px 10px; font-family: monospace; font-size: 12px; color: var(--dsw-alias-label-secondary); max-height: 140px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; margin-top: 6px; }
|
|
652
|
-
.dsh-cron-history-empty { text-align: center; padding: 36px 0; color: var(--dsw-alias-label-tertiary); font-size: 13.5px; }
|
|
653
|
-
.dsh-cron-stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 0; }
|
|
654
|
-
.dsh-cron-stat-card { background: var(--dsw-alias-bg-layer-2, color-mix(in srgb, var(--dsw-alias-label-primary) 2%, transparent)); border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
|
|
655
|
-
.dsh-cron-stat-val { font-size: 18px; font-weight: 700; color: var(--dsw-alias-label-primary); }
|
|
656
|
-
.dsh-cron-stat-lbl { font-size: 12px; color: var(--dsw-alias-label-secondary); margin-top: 0; }
|
|
657
|
-
.dsh-cron-oneshot-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsh-cron-accent); background: var(--dsh-cron-accent-bg); color: var(--dsh-cron-accent); font-weight: 500; }
|
|
658
|
-
.dsh-cron-config-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l2); color: var(--dsw-alias-label-secondary); font-weight: 500; }
|
|
659
|
-
.dsh-cron-cost-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsh-cron-success); background: var(--dsh-cron-success-bg); color: var(--dsh-cron-success); font-weight: 500; }
|
|
660
|
-
.dsh-cron-tokens-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsh-cron-info); background: var(--dsh-cron-info-bg); color: var(--dsh-cron-info); }
|
|
661
|
-
.dsh-cron-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dsw-alias-label-secondary); cursor: pointer; user-select: none; }
|
|
662
|
-
.dsh-cron-checkbox-row input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--dsw-alias-label-primary); }
|
|
663
|
-
.dsh-cron-hint { font-size: 12px; color: var(--dsw-alias-label-tertiary); margin-top: 4px; }
|
|
664
|
-
.dsh-cron-channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 12px; }
|
|
665
|
-
.dsh-cron-section { border-top: 1px solid var(--dsw-alias-border-l2); margin-top: 16px; padding-top: 12px; }
|
|
666
|
-
.dsh-cron-section-title { font-weight: 500; font-size: 12.5px; color: var(--dsw-alias-label-secondary); margin-bottom: 10px; }
|
|
667
|
-
.dsh-cron-secret-row { display: flex; align-items: center; gap: 8px; }
|
|
668
|
-
.dsh-cron-secret-row input { flex: 1; }
|
|
669
|
-
.dsh-cron-badge-ref { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--dsw-alias-bg-layer-3, color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent)); color: var(--dsw-alias-label-tertiary); white-space: nowrap; }
|
|
670
|
-
.dsh-cron-status-banner { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; }
|
|
671
|
-
.dsh-cron-status-banner[data-type="success"] { background: var(--dsh-cron-success-bg); border: 1px solid var(--dsh-cron-success); color: var(--dsh-cron-success); }
|
|
672
|
-
.dsh-cron-status-banner[data-type="error"] { background: var(--dsh-cron-danger-bg); border: 1px solid var(--dsh-cron-danger); color: var(--dsh-cron-danger); }
|
|
673
|
-
.dsh-cron-status-banner[data-type="info"] { background: var(--dsh-cron-info-bg); border: 1px solid var(--dsh-cron-info); color: var(--dsh-cron-info); }
|
|
674
|
-
@keyframes dsh-cron-pulse-ring { 0% { box-shadow: 0 0 0 0 var(--dsh-cron-success-bg); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
|
|
675
|
-
.dsh-cron-pulse { animation: dsh-cron-pulse-ring 1.6s infinite; border-color: var(--dsh-cron-success); color: var(--dsh-cron-success); }
|
|
676
|
-
/* #34: sidebar job list */
|
|
677
|
-
.dsh-cron-sidebar-jobs { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 0; }
|
|
678
|
-
.dsh-cron-sidebar-jobs-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; padding: 4px 8px; font: inherit; font-size: 12px; color: var(--dsw-alias-label-tertiary); cursor: pointer; border-radius: 6px; text-align: left; }
|
|
679
|
-
.dsh-cron-sidebar-jobs-head:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, var(--dsw-alias-label-primary) 4%, transparent)); }
|
|
680
|
-
.dsh-cron-sidebar-jobs-head::after { content: '▾'; font-size: 10px; transition: transform 0.15s ease; }
|
|
681
|
-
.dsh-cron-sidebar-jobs[data-open="false"] .dsh-cron-sidebar-jobs-head::after { transform: rotate(-90deg); }
|
|
682
|
-
.dsh-cron-sidebar-jobs[data-open="false"] .dsh-cron-sidebar-jobs-list { display: none; }
|
|
683
|
-
.dsh-cron-sidebar-jobs-list { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; }
|
|
684
|
-
.dsh-cron-sidebar-job { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; background: none; border: none; border-left: 2px solid transparent; padding: 3px 8px; font: inherit; cursor: pointer; border-radius: 0 6px 6px 0; text-align: left; }
|
|
685
|
-
.dsh-cron-sidebar-job:hover { background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, var(--dsw-alias-label-primary) 4%, transparent)); border-left-color: var(--dsh-cron-info); }
|
|
686
|
-
.dsh-cron-sidebar-job-title { font-size: 12px; color: var(--dsw-alias-label-secondary); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
687
|
-
.dsh-cron-sidebar-job-meta { font-size: 11px; color: var(--dsw-alias-label-tertiary); }
|
|
688
|
-
.dsh-cron-sidebar-empty, .dsh-cron-sidebar-more { font-size: 11px; color: var(--dsw-alias-label-tertiary); padding: 2px 8px; }
|
|
689
|
-
.dsh-cron-task-highlight { border-color: var(--dsh-cron-info) !important; box-shadow: 0 0 0 2px var(--dsh-cron-info-bg); }
|
|
690
|
-
/* #39: narrow screens. Only layout changes — no information is hidden. */
|
|
691
|
-
@media (max-width: 900px) {
|
|
692
|
-
.dsh-cron-container { padding: 8px 12px 24px; gap: 14px; }
|
|
693
|
-
.dsh-cron-form-row { grid-template-columns: 1fr; }
|
|
694
|
-
.dsh-cron-channel-grid { grid-template-columns: 1fr; }
|
|
695
|
-
.dsh-cron-filter-panel { grid-template-columns: 1fr; }
|
|
696
|
-
.dsh-cron-modal { padding: 16px; border-radius: 12px; }
|
|
697
|
-
.dsh-cron-modal-foot { bottom: -16px; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
|
|
698
|
-
.dsh-cron-modal-scroll { max-height: 92vh; }
|
|
699
|
-
.dsh-cron-task-item { flex-wrap: wrap; gap: 10px; }
|
|
700
|
-
.dsh-cron-task-actions { margin-left: auto; }
|
|
701
|
-
.dsh-cron-history-list { max-height: 320px; }
|
|
702
|
-
}
|
|
703
|
-
@media (max-width: 640px) {
|
|
704
|
-
.dsh-cron-container { padding: 6px 8px 20px; }
|
|
705
|
-
.dsh-cron-top-bar { flex-wrap: wrap; gap: 8px; }
|
|
706
|
-
.dsh-cron-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
|
|
707
|
-
.dsh-cron-tab { white-space: nowrap; }
|
|
708
|
-
.dsh-cron-stats-bar { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
|
|
709
|
-
.dsh-cron-task-item { align-items: flex-start; padding: 12px; }
|
|
710
|
-
.dsh-cron-task-title { flex-wrap: wrap; row-gap: 4px; }
|
|
711
|
-
.dsh-cron-modal { padding: 14px; }
|
|
712
|
-
.dsh-cron-modal-foot { flex-direction: column-reverse; }
|
|
713
|
-
.dsh-cron-modal-foot > button { width: 100%; }
|
|
714
|
-
.dsh-cron-filter-panel { padding: 8px 10px; }
|
|
715
|
-
.dsh-cron-card { padding: 14px; }
|
|
716
|
-
/* 16px keeps iOS Safari from zooming the page when a field is focused. */
|
|
717
|
-
.dsh-cron-modal input, .dsh-cron-modal select, .dsh-cron-modal textarea,
|
|
718
|
-
.dsh-cron-card input, .dsh-cron-search-input, .dsh-cron-filter-field select { font-size: 16px; }
|
|
719
|
-
}
|
|
720
|
-
`;
|
|
721
329
|
const STYLE_ID = 'dsh-cron-styles';
|
|
330
|
+
const CSS_HREF = '/dsh-cron/client.css';
|
|
722
331
|
function ensureStyles() {
|
|
723
332
|
if (typeof document === 'undefined') return null;
|
|
724
333
|
let el = document.getElementById(STYLE_ID);
|
|
725
334
|
if (el === null) {
|
|
726
335
|
const head = document.head || document.documentElement;
|
|
727
336
|
if (!head) return null;
|
|
728
|
-
el = document.createElement('
|
|
337
|
+
el = document.createElement('link');
|
|
729
338
|
el.id = STYLE_ID;
|
|
339
|
+
el.rel = 'stylesheet';
|
|
340
|
+
el.href = CSS_HREF;
|
|
730
341
|
el.dataset.dshPlugin = 'dsh-cron';
|
|
731
|
-
el.textContent = STYLES;
|
|
732
342
|
head.appendChild(el);
|
|
733
343
|
return el;
|
|
734
344
|
}
|
|
735
|
-
if (el.
|
|
345
|
+
if (el.getAttribute('href') !== CSS_HREF) {
|
|
346
|
+
el.setAttribute('href', CSS_HREF);
|
|
347
|
+
el.href = CSS_HREF;
|
|
348
|
+
}
|
|
736
349
|
return el;
|
|
737
350
|
}
|
|
738
351
|
const STYLE_HEAL_KEY = '__dshCronStyleHeal';
|
|
@@ -782,10 +395,10 @@ console.error('[dsh-cron] React error:', error, errorInfo);
|
|
|
782
395
|
}
|
|
783
396
|
render() {
|
|
784
397
|
if (this.state.hasError) {
|
|
785
|
-
return
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
398
|
+
return _h('div', { className: 'dsh-cron-status-banner', 'data-type': 'error', style: { margin: '12px 0' } },
|
|
399
|
+
_h('div', { style: { fontWeight: 600, marginBottom: '6px' } }, '⚠️ Cron UI error:'),
|
|
400
|
+
_h('div', { style: { fontSize: '12px', wordBreak: 'break-all' } }, String((this.state.error && this.state.error.message) || this.state.error)),
|
|
401
|
+
_h('button', {
|
|
789
402
|
type: 'button',
|
|
790
403
|
className: 'dsh-cron-btn-secondary',
|
|
791
404
|
style: { marginTop: '10px', fontSize: '12px', padding: '4px 10px' },
|
|
@@ -980,9 +593,9 @@ return out;
|
|
|
980
593
|
}
|
|
981
594
|
function renderDeliverySettings({ T, values, onChange, onChannelTemplate, sections, onToggleSection }) {
|
|
982
595
|
const val = (key) => (values[key] === undefined || values[key] === null ? '' : String(values[key]));
|
|
983
|
-
const field = (f) =>
|
|
984
|
-
|
|
985
|
-
|
|
596
|
+
const field = (f) => _h('div', { className: 'dsh-cron-form-group', key: f.key, style: { marginBottom: '10px' } },
|
|
597
|
+
_h('label', null, T(f.labelKey)),
|
|
598
|
+
_h('input', f.numeric ? {
|
|
986
599
|
type: 'number',
|
|
987
600
|
min: f.min !== undefined ? f.min : 1000,
|
|
988
601
|
step: 1000,
|
|
@@ -1000,49 +613,49 @@ onChange: (e) => onChange(f.key, e.target.value)
|
|
|
1000
613
|
);
|
|
1001
614
|
const section = (key, titleKey, children) => {
|
|
1002
615
|
const open = Boolean(sections[key]);
|
|
1003
|
-
return
|
|
1004
|
-
|
|
616
|
+
return _h('div', { className: 'dsh-cron-section', key },
|
|
617
|
+
_h('button', {
|
|
1005
618
|
type: 'button',
|
|
1006
619
|
className: 'dsh-cron-section-head',
|
|
1007
620
|
'aria-expanded': open ? 'true' : 'false',
|
|
1008
621
|
onClick: () => onToggleSection(key)
|
|
1009
622
|
},
|
|
1010
|
-
|
|
1011
|
-
|
|
623
|
+
_h('span', null, T(titleKey)),
|
|
624
|
+
_h('span', { className: 'dsh-cron-section-chevron', 'data-open': open ? 'true' : 'false' }, '▾')
|
|
1012
625
|
),
|
|
1013
|
-
open &&
|
|
626
|
+
open && _h('div', { className: 'dsh-cron-section-body' }, children)
|
|
1014
627
|
);
|
|
1015
628
|
};
|
|
1016
629
|
return [
|
|
1017
630
|
section('secrets', 'settings.secretsSection', [
|
|
1018
|
-
|
|
631
|
+
_h('div', { className: 'dsh-cron-hint', key: 'hint', style: { marginBottom: '10px' } }, T('settings.secretsHint')),
|
|
1019
632
|
...DELIVERY_SETTING_FIELDS.filter((f) => f.group === 'secrets').map(field),
|
|
1020
633
|
]),
|
|
1021
634
|
section('channels', 'settings.deliverySection', [
|
|
1022
|
-
|
|
635
|
+
_h('div', { className: 'dsh-cron-form-row', key: 'row' },
|
|
1023
636
|
...DELIVERY_SETTING_FIELDS.filter((f) => f.group === 'channels').map(field)
|
|
1024
637
|
),
|
|
1025
638
|
]),
|
|
1026
639
|
section('automation', 'settings.automationSection', [
|
|
1027
|
-
|
|
1028
|
-
|
|
640
|
+
_h('div', { className: 'dsh-cron-hint', key: 'hint', style: { marginBottom: '10px' } }, T('settings.automationHint')),
|
|
641
|
+
_h('div', { className: 'dsh-cron-form-row', key: 'row' },
|
|
1029
642
|
...DELIVERY_SETTING_FIELDS.filter((f) => f.group === 'automation').map(field)
|
|
1030
643
|
),
|
|
1031
644
|
]),
|
|
1032
645
|
section('templates', 'settings.templatesSection', [
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
646
|
+
_h('div', { className: 'dsh-cron-form-group', key: 'global', style: { marginBottom: '10px' } },
|
|
647
|
+
_h('label', null, T('settings.templateLabel')),
|
|
648
|
+
_h('input', {
|
|
1036
649
|
type: 'text',
|
|
1037
650
|
value: val('template'),
|
|
1038
651
|
onChange: (e) => onChange('template', e.target.value)
|
|
1039
652
|
}),
|
|
1040
|
-
|
|
653
|
+
_h('div', { className: 'dsh-cron-hint' }, T('settings.templateHint'))
|
|
1041
654
|
),
|
|
1042
|
-
|
|
1043
|
-
...DELIVERY_CHANNELS.map((id) =>
|
|
1044
|
-
|
|
1045
|
-
|
|
655
|
+
_h('div', { className: 'dsh-cron-form-row', key: 'perchannel' },
|
|
656
|
+
...DELIVERY_CHANNELS.map((id) => _h('div', { className: 'dsh-cron-form-group', key: id, style: { marginBottom: '10px' } },
|
|
657
|
+
_h('label', null, T('settings.channelTemplateLabel', { channel: T(CHANNEL_LABEL_KEYS[id]) })),
|
|
658
|
+
_h('input', {
|
|
1046
659
|
type: 'text',
|
|
1047
660
|
value: (values.channelTemplates && values.channelTemplates[id]) || '',
|
|
1048
661
|
onChange: (e) => onChannelTemplate(id, e.target.value)
|
|
@@ -1132,68 +745,68 @@ if (!isOpen) return null;
|
|
|
1132
745
|
const graph = data?.graph || { nodes: [], edges: [], hasFailure: false };
|
|
1133
746
|
const chainRunId = data?.chainRunId || '';
|
|
1134
747
|
const nodes = graph.nodes || [];
|
|
1135
|
-
return
|
|
748
|
+
return _h('div', {
|
|
1136
749
|
className: 'dsh-cron-modal-overlay',
|
|
1137
750
|
onClick: onClose
|
|
1138
751
|
},
|
|
1139
|
-
|
|
752
|
+
_h('div', {
|
|
1140
753
|
className: 'dsh-cron-modal',
|
|
1141
754
|
style: { maxWidth: '820px', width: '92vw', maxHeight: '88vh', display: 'flex', flexDirection: 'column' },
|
|
1142
755
|
role: 'dialog',
|
|
1143
756
|
'aria-modal': 'true',
|
|
1144
757
|
onClick: (e) => e.stopPropagation()
|
|
1145
758
|
},
|
|
1146
|
-
|
|
759
|
+
_h('div', {
|
|
1147
760
|
className: 'dsh-cron-modal-head',
|
|
1148
761
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', borderBottom: '1px solid var(--dsw-alias-border-l2)', paddingBottom: '12px' }
|
|
1149
762
|
},
|
|
1150
|
-
|
|
1151
|
-
|
|
763
|
+
_h('div', null,
|
|
764
|
+
_h('div', {
|
|
1152
765
|
className: 'dsh-cron-modal-title',
|
|
1153
766
|
style: { margin: 0, display: 'flex', alignItems: 'center', gap: '8px' }
|
|
1154
767
|
},
|
|
1155
|
-
|
|
768
|
+
_h('span', { style: { fontSize: '18px' } }, '🕸️'),
|
|
1156
769
|
T_KEY(t, 'chainGraph.modalTitle')
|
|
1157
770
|
),
|
|
1158
|
-
chainRunId &&
|
|
771
|
+
chainRunId && _h('div', {
|
|
1159
772
|
style: { fontSize: '11px', color: 'var(--dsw-alias-label-secondary, #888)', marginTop: '4px', fontFamily: 'monospace' }
|
|
1160
773
|
}, 'Run ID: ' + chainRunId)
|
|
1161
774
|
),
|
|
1162
|
-
|
|
775
|
+
_h('button', {
|
|
1163
776
|
type: 'button',
|
|
1164
777
|
className: 'dsh-cron-icon-btn',
|
|
1165
778
|
onClick: onClose
|
|
1166
779
|
}, '✕')
|
|
1167
780
|
),
|
|
1168
|
-
|
|
781
|
+
_h('div', {
|
|
1169
782
|
style: { flex: 1, overflowY: 'auto', padding: '16px 0', minHeight: '260px' }
|
|
1170
783
|
},
|
|
1171
|
-
loading &&
|
|
784
|
+
loading && _h('div', {
|
|
1172
785
|
className: 'dsh-cron-history-empty'
|
|
1173
786
|
}, T_KEY(t, 'history.loading')),
|
|
1174
|
-
!loading && nodes.length === 0 &&
|
|
787
|
+
!loading && nodes.length === 0 && _h('div', {
|
|
1175
788
|
className: 'dsh-cron-history-empty'
|
|
1176
789
|
}, T_KEY(t, 'chainGraph.noNodes')),
|
|
1177
|
-
!loading && nodes.length > 0 &&
|
|
790
|
+
!loading && nodes.length > 0 && _h('div', {
|
|
1178
791
|
style: { display: 'flex', flexDirection: 'column', gap: '16px' }
|
|
1179
792
|
},
|
|
1180
|
-
|
|
793
|
+
_h('div', {
|
|
1181
794
|
style: { display: 'flex', gap: '12px', fontSize: '11px', color: 'var(--dsw-alias-label-secondary, #888)', padding: '0 4px' }
|
|
1182
795
|
},
|
|
1183
|
-
|
|
1184
|
-
|
|
796
|
+
_h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' } },
|
|
797
|
+
_h('span', { style: { width: '8px', height: '8px', borderRadius: '50%', background: 'var(--dsh-cron-success)' } }),
|
|
1185
798
|
T_KEY(t, 'chainGraph.stepSuccess')
|
|
1186
799
|
),
|
|
1187
|
-
|
|
1188
|
-
|
|
800
|
+
_h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' } },
|
|
801
|
+
_h('span', { style: { width: '8px', height: '8px', borderRadius: '50%', background: 'var(--dsh-cron-danger)' } }),
|
|
1189
802
|
T_KEY(t, 'chainGraph.stepFailed')
|
|
1190
803
|
),
|
|
1191
|
-
|
|
1192
|
-
|
|
804
|
+
_h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' } },
|
|
805
|
+
_h('span', { style: { width: '8px', height: '8px', borderRadius: '50%', background: 'var(--dsw-alias-label-tertiary, #888)' } }),
|
|
1193
806
|
T_KEY(t, 'chainGraph.stepPending')
|
|
1194
807
|
)
|
|
1195
808
|
),
|
|
1196
|
-
|
|
809
|
+
_h('div', {
|
|
1197
810
|
style: {
|
|
1198
811
|
display: 'flex',
|
|
1199
812
|
flexWrap: 'wrap',
|
|
@@ -1213,7 +826,7 @@ const borderColor = isOk
|
|
|
1213
826
|
: isFailed
|
|
1214
827
|
? 'var(--dsh-cron-danger)'
|
|
1215
828
|
: 'var(--dsw-alias-border-l2)';
|
|
1216
|
-
return
|
|
829
|
+
return _h('div', {
|
|
1217
830
|
key: n.id || idx,
|
|
1218
831
|
style: {
|
|
1219
832
|
flex: '1 1 220px',
|
|
@@ -1228,13 +841,13 @@ gap: '8px',
|
|
|
1228
841
|
boxShadow: isFailed ? '0 0 0 1px var(--dsh-cron-danger)' : 'none'
|
|
1229
842
|
}
|
|
1230
843
|
},
|
|
1231
|
-
|
|
844
|
+
_h('div', {
|
|
1232
845
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: '6px' }
|
|
1233
846
|
},
|
|
1234
|
-
|
|
847
|
+
_h('div', {
|
|
1235
848
|
style: { fontWeight: '600', fontSize: '13px', color: 'var(--dsw-alias-label-primary)' }
|
|
1236
849
|
}, n.title || n.id),
|
|
1237
|
-
|
|
850
|
+
_h('span', {
|
|
1238
851
|
style: {
|
|
1239
852
|
fontSize: '10px',
|
|
1240
853
|
padding: '2px 6px',
|
|
@@ -1245,22 +858,22 @@ color: isOk ? 'var(--dsh-cron-success)' : isFailed ? 'var(--dsh-cron-danger)' :
|
|
|
1245
858
|
}
|
|
1246
859
|
}, isOk ? '✓ ' + T_KEY(t, 'chainGraph.stepSuccess') : isFailed ? '✗ ' + T_KEY(t, 'chainGraph.stepFailed') : '⏳ ' + T_KEY(t, 'chainGraph.stepPending'))
|
|
1247
860
|
),
|
|
1248
|
-
|
|
861
|
+
_h('div', {
|
|
1249
862
|
style: { fontSize: '11px', color: 'var(--dsw-alias-label-secondary)', display: 'flex', gap: '8px', flexWrap: 'wrap' }
|
|
1250
863
|
},
|
|
1251
|
-
n.durationMs > 0 &&
|
|
1252
|
-
n.retryCount > 0 &&
|
|
1253
|
-
n.joinPolicy && n.dependsOn?.length > 0 &&
|
|
864
|
+
n.durationMs > 0 && _h('span', null, n.durationMs + 'ms'),
|
|
865
|
+
n.retryCount > 0 && _h('span', { style: { color: 'var(--dsh-cron-warning)' } }, '↻ ' + n.retryCount),
|
|
866
|
+
n.joinPolicy && n.dependsOn?.length > 0 && _h('span', {
|
|
1254
867
|
style: { background: 'var(--dsw-alias-bg-layer-3)', padding: '1px 4px', borderRadius: '4px' }
|
|
1255
868
|
}, n.joinPolicy === 'any_success' ? 'join:any' : 'join:all')
|
|
1256
869
|
),
|
|
1257
|
-
n.isDecisionNode &&
|
|
870
|
+
n.isDecisionNode && _h('div', {
|
|
1258
871
|
style: { fontSize: '11px', color: 'var(--dsh-cron-warning)', fontWeight: '600', display: 'flex', alignItems: 'center', gap: '4px' }
|
|
1259
872
|
}, '🔀 ' + T_KEY(t, 'chainGraph.decisionNode') + ' (' + n.branchRulesCount + ')'),
|
|
1260
|
-
n.dependsOn?.length > 0 &&
|
|
873
|
+
n.dependsOn?.length > 0 && _h('div', {
|
|
1261
874
|
style: { fontSize: '11px', color: 'var(--dsw-alias-label-tertiary)' }
|
|
1262
875
|
}, '← ' + n.dependsOn.join(', ')),
|
|
1263
|
-
n.outputSnippet &&
|
|
876
|
+
n.outputSnippet && _h('div', {
|
|
1264
877
|
style: {
|
|
1265
878
|
background: 'var(--dsw-alias-bg-layer-2)',
|
|
1266
879
|
border: '1px solid var(--dsw-alias-border-l2)',
|
|
@@ -1275,7 +888,7 @@ maxHeight: '60px',
|
|
|
1275
888
|
overflowY: 'auto'
|
|
1276
889
|
}
|
|
1277
890
|
}, n.outputSnippet),
|
|
1278
|
-
isFailed && chainRunId &&
|
|
891
|
+
isFailed && chainRunId && _h('button', {
|
|
1279
892
|
type: 'button',
|
|
1280
893
|
className: 'dsh-cron-btn-secondary',
|
|
1281
894
|
style: {
|
|
@@ -1296,11 +909,11 @@ onClick: () => onRetry && onRetry(n.id)
|
|
|
1296
909
|
)
|
|
1297
910
|
)
|
|
1298
911
|
),
|
|
1299
|
-
|
|
912
|
+
_h('div', {
|
|
1300
913
|
className: 'dsh-cron-modal-foot',
|
|
1301
914
|
style: { borderTop: '1px solid var(--dsw-alias-border-l2)', paddingTop: '12px', marginTop: 'auto' }
|
|
1302
915
|
},
|
|
1303
|
-
|
|
916
|
+
_h('button', {
|
|
1304
917
|
type: 'button',
|
|
1305
918
|
className: 'dsh-cron-btn-primary',
|
|
1306
919
|
onClick: onClose
|
|
@@ -1318,26 +931,26 @@ el.scrollTop = el.scrollHeight;
|
|
|
1318
931
|
};
|
|
1319
932
|
const isLive = status === 'running' || status === 'connecting';
|
|
1320
933
|
const statusColor = isLive ? 'var(--dsh-cron-success, #2a2)' : (status === 'completed' ? 'var(--dsw-alias-label-secondary, #888)' : 'var(--dsh-cron-danger, #e33)');
|
|
1321
|
-
return
|
|
934
|
+
return _h('div', {
|
|
1322
935
|
className: 'dsh-cron-modal-overlay',
|
|
1323
936
|
onClick: onClose
|
|
1324
937
|
},
|
|
1325
|
-
|
|
938
|
+
_h('div', {
|
|
1326
939
|
className: 'dsh-cron-modal',
|
|
1327
940
|
style: { maxWidth: '860px', width: '92vw', height: '80vh', display: 'flex', flexDirection: 'column', background: 'var(--dsw-alias-bg-base, #111)', color: 'var(--dsw-alias-label-primary, #ddd)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '8px' },
|
|
1328
941
|
role: 'dialog',
|
|
1329
942
|
'aria-modal': 'true',
|
|
1330
943
|
onClick: (e) => e.stopPropagation()
|
|
1331
944
|
},
|
|
1332
|
-
|
|
945
|
+
_h('div', {
|
|
1333
946
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', borderBottom: '1px solid var(--dsw-alias-border-l2, #333)', background: 'var(--dsw-alias-bg-layer-2, #111)' }
|
|
1334
947
|
},
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
948
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '10px' } },
|
|
949
|
+
_h('span', { style: { fontSize: '18px' } }, '📺'),
|
|
950
|
+
_h('div', null,
|
|
951
|
+
_h('div', { style: { fontWeight: '600', fontSize: '14px', color: 'var(--dsw-alias-label-primary, #fff)', display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
1339
952
|
T_KEY(t, 'liveLog.modalTitle'),
|
|
1340
|
-
|
|
953
|
+
_h('span', {
|
|
1341
954
|
style: {
|
|
1342
955
|
display: 'inline-block',
|
|
1343
956
|
width: '8px',
|
|
@@ -1348,14 +961,14 @@ boxShadow: isLive ? '0 0 8px ' + statusColor : 'none'
|
|
|
1348
961
|
}
|
|
1349
962
|
})
|
|
1350
963
|
),
|
|
1351
|
-
|
|
964
|
+
_h('div', { style: { fontSize: '11px', color: 'var(--dsw-alias-label-secondary, #888)', marginTop: '2px', fontFamily: 'monospace' } },
|
|
1352
965
|
(taskTitle || taskId) + ' · ' + (isLive ? T_KEY(t, 'liveLog.connecting') : (completed ? T_KEY(t, 'liveLog.completed') : status))
|
|
1353
966
|
)
|
|
1354
967
|
)
|
|
1355
968
|
),
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
969
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '12px' } },
|
|
970
|
+
_h('label', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #888)', display: 'flex', alignItems: 'center', gap: '4px', cursor: 'pointer' } },
|
|
971
|
+
_h('input', {
|
|
1359
972
|
type: 'checkbox',
|
|
1360
973
|
checked: Boolean(autoScroll),
|
|
1361
974
|
onChange: onToggleAutoScroll,
|
|
@@ -1363,7 +976,7 @@ style: { cursor: 'pointer' }
|
|
|
1363
976
|
}),
|
|
1364
977
|
T_KEY(t, 'liveLog.autoScroll')
|
|
1365
978
|
),
|
|
1366
|
-
|
|
979
|
+
_h('button', {
|
|
1367
980
|
type: 'button',
|
|
1368
981
|
className: 'dsh-cron-icon-btn',
|
|
1369
982
|
style: { color: 'var(--dsw-alias-label-secondary, #888)', background: 'transparent', border: 'none', cursor: 'pointer', fontSize: '16px' },
|
|
@@ -1371,29 +984,29 @@ onClick: onClose
|
|
|
1371
984
|
}, '✕')
|
|
1372
985
|
)
|
|
1373
986
|
),
|
|
1374
|
-
|
|
987
|
+
_h('div', {
|
|
1375
988
|
ref: terminalRef,
|
|
1376
989
|
style: { flex: 1, overflowY: 'auto', padding: '14px 16px', fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace', fontSize: '12px', lineHeight: '1.5', background: 'var(--dsw-alias-bg-base, #000)' }
|
|
1377
990
|
},
|
|
1378
|
-
(!logs || logs.length === 0) &&
|
|
991
|
+
(!logs || logs.length === 0) && _h('div', {
|
|
1379
992
|
style: { color: 'var(--dsw-alias-label-secondary, #888)', fontStyle: 'italic', padding: '20px 0', textAlign: 'center' }
|
|
1380
993
|
}, isLive ? T_KEY(t, 'liveLog.waiting') : 'No output captured for this run.'),
|
|
1381
994
|
logs && logs.length > 0 && logs.map((item, idx) => {
|
|
1382
995
|
const isErr = item.stream === 'stderr';
|
|
1383
996
|
const timeStr = item.ts ? new Date(item.ts).toLocaleTimeString() : '';
|
|
1384
|
-
return
|
|
997
|
+
return _h('div', {
|
|
1385
998
|
key: idx,
|
|
1386
999
|
style: { display: 'flex', gap: '8px', color: isErr ? 'var(--dsh-cron-danger, #f55)' : 'var(--dsh-cron-success, #5f5)', wordBreak: 'break-all', whiteSpace: 'pre-wrap' }
|
|
1387
1000
|
},
|
|
1388
|
-
timeStr &&
|
|
1389
|
-
|
|
1001
|
+
timeStr && _h('span', { style: { color: 'var(--dsw-alias-label-secondary, #555)', userSelect: 'none', flexShrink: 0 } }, '[' + timeStr + ']'),
|
|
1002
|
+
_h('span', { style: { flex: 1 } }, item.chunk || item.text || String(item))
|
|
1390
1003
|
);
|
|
1391
1004
|
})
|
|
1392
1005
|
),
|
|
1393
|
-
|
|
1006
|
+
_h('div', {
|
|
1394
1007
|
style: { display: 'flex', justifyContent: 'flex-end', padding: '10px 16px', borderTop: '1px solid var(--dsw-alias-border-l2, #333)', background: 'var(--dsw-alias-bg-layer-2, #111)' }
|
|
1395
1008
|
},
|
|
1396
|
-
|
|
1009
|
+
_h('button', {
|
|
1397
1010
|
type: 'button',
|
|
1398
1011
|
className: 'dsh-cron-btn dsh-cron-btn-secondary',
|
|
1399
1012
|
style: { padding: '6px 14px', fontSize: '12px' },
|
|
@@ -1429,117 +1042,117 @@ const text = [
|
|
|
1429
1042
|
].join(String.fromCharCode(10));
|
|
1430
1043
|
navigator.clipboard.writeText(text).catch(() => {});
|
|
1431
1044
|
};
|
|
1432
|
-
return
|
|
1045
|
+
return _h('div', {
|
|
1433
1046
|
className: 'dsh-cron-modal-overlay',
|
|
1434
1047
|
onClick: onClose
|
|
1435
1048
|
},
|
|
1436
|
-
|
|
1049
|
+
_h('div', {
|
|
1437
1050
|
className: 'dsh-cron-modal',
|
|
1438
1051
|
style: { maxWidth: '780px', width: '92vw', maxHeight: '86vh', display: 'flex', flexDirection: 'column', background: 'var(--dsw-alias-bg-base, #111)', color: 'var(--dsw-alias-label-primary, #ddd)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '8px' },
|
|
1439
1052
|
role: 'dialog',
|
|
1440
1053
|
'aria-modal': 'true',
|
|
1441
1054
|
onClick: (e) => e.stopPropagation()
|
|
1442
1055
|
},
|
|
1443
|
-
|
|
1056
|
+
_h('div', {
|
|
1444
1057
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '14px 18px', borderBottom: '1px solid var(--dsw-alias-border-l2, #333)', background: 'var(--dsw-alias-bg-layer-2, #111)' }
|
|
1445
1058
|
},
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1059
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '10px' } },
|
|
1060
|
+
_h('span', { style: { fontSize: '20px' } }, '📊'),
|
|
1061
|
+
_h('div', null,
|
|
1062
|
+
_h('div', { style: { fontWeight: '600', fontSize: '15px', color: 'var(--dsw-alias-label-primary, #fff)' } },
|
|
1450
1063
|
T_KEY(t, 'digest.modalTitle')
|
|
1451
1064
|
),
|
|
1452
|
-
|
|
1065
|
+
_h('div', { style: { fontSize: '11.5px', color: 'var(--dsw-alias-label-secondary, #888)', marginTop: '2px' } },
|
|
1453
1066
|
(T_KEY(t, 'digest.buttonTitle')) + ' · ' + (periodDays || 7) + 'd'
|
|
1454
1067
|
)
|
|
1455
1068
|
)
|
|
1456
1069
|
),
|
|
1457
|
-
|
|
1458
|
-
|
|
1070
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
1071
|
+
_h('button', {
|
|
1459
1072
|
type: 'button',
|
|
1460
1073
|
className: 'dsh-cron-btn-secondary',
|
|
1461
1074
|
style: { padding: '4px 10px', fontSize: '12px', fontWeight: periodDays === 7 ? '600' : '400', background: periodDays === 7 ? 'var(--dsw-alias-bg-layer-3, #222)' : 'transparent' },
|
|
1462
1075
|
onClick: () => onSelectPeriod && onSelectPeriod(7)
|
|
1463
1076
|
}, T_KEY(t, 'digest.period7')),
|
|
1464
|
-
|
|
1077
|
+
_h('button', {
|
|
1465
1078
|
type: 'button',
|
|
1466
1079
|
className: 'dsh-cron-btn-secondary',
|
|
1467
1080
|
style: { padding: '4px 10px', fontSize: '12px', fontWeight: periodDays === 30 ? '600' : '400', background: periodDays === 30 ? 'var(--dsw-alias-bg-layer-3, #222)' : 'transparent' },
|
|
1468
1081
|
onClick: () => onSelectPeriod && onSelectPeriod(30)
|
|
1469
1082
|
}, T_KEY(t, 'digest.period30')),
|
|
1470
|
-
|
|
1083
|
+
_h('button', {
|
|
1471
1084
|
type: 'button',
|
|
1472
1085
|
className: 'dsh-cron-icon-btn',
|
|
1473
1086
|
onClick: onClose,
|
|
1474
1087
|
style: { marginLeft: '8px' }
|
|
1475
|
-
},
|
|
1088
|
+
}, _h('span', null, '✕'))
|
|
1476
1089
|
)
|
|
1477
1090
|
),
|
|
1478
|
-
|
|
1091
|
+
_h('div', {
|
|
1479
1092
|
style: { padding: '16px 18px', overflowY: 'auto', flex: 1, display: 'flex', flexDirection: 'column', gap: '16px' }
|
|
1480
1093
|
},
|
|
1481
|
-
isLoading ?
|
|
1094
|
+
isLoading ? _h('div', { style: { padding: '30px', textAlign: 'center', color: 'var(--dsw-alias-label-secondary, #888)' } }, 'Loading digest metrics...') : _h(React.Fragment, null,
|
|
1482
1095
|
(() => {
|
|
1483
|
-
const renderKpi = (label, val, sub, subCol) =>
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1096
|
+
const renderKpi = (label, val, sub, subCol) => _h('div', { style: { background: 'var(--dsw-alias-bg-layer-2, #111)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '6px', padding: '10px 12px' } },
|
|
1097
|
+
_h('div', { style: { fontSize: '11px', color: 'var(--dsw-alias-label-secondary, #888)' } }, label),
|
|
1098
|
+
_h('div', { style: { fontSize: '18px', fontWeight: '700', color: 'var(--dsw-alias-label-primary, #fff)', marginTop: '4px' } }, val),
|
|
1099
|
+
_h('div', { style: { fontSize: '11px', color: subCol || 'var(--dsw-alias-label-secondary, #888)', marginTop: '2px' } }, sub)
|
|
1487
1100
|
);
|
|
1488
|
-
return
|
|
1101
|
+
return _h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '10px' } },
|
|
1489
1102
|
renderKpi(T_KEY(t, 'digest.executions'), digest.totalRuns, digest.successRate + '% SR', digest.successRate >= 90 ? 'var(--dsh-cron-success, #2a2)' : 'var(--dsh-cron-warning, #fa0)'),
|
|
1490
1103
|
renderKpi(T_KEY(t, 'digest.tokens'), Number(digest.totalTokens || 0).toLocaleString(), 'LLM prompt+out'),
|
|
1491
1104
|
renderKpi(T_KEY(t, 'digest.cost'), '$' + Number(digest.totalCostUsd || 0).toFixed(4), 'USD estimated'),
|
|
1492
1105
|
renderKpi(T_KEY(t, 'digest.fleet'), digest.activeTasksCount, digest.pausedTasksCount + ' paused')
|
|
1493
1106
|
);
|
|
1494
1107
|
})(),
|
|
1495
|
-
|
|
1496
|
-
|
|
1108
|
+
_h('div', { style: { background: 'var(--dsw-alias-bg-layer-2, #111)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '6px', padding: '12px' } },
|
|
1109
|
+
_h('div', { style: { fontWeight: '600', fontSize: '13px', color: 'var(--dsh-cron-warning, #fa0)', marginBottom: '8px' } },
|
|
1497
1110
|
'⚠️ ' + (T_KEY(t, 'digest.unstableTitle'))
|
|
1498
1111
|
),
|
|
1499
|
-
(digest.topUnstableTasks && digest.topUnstableTasks.length > 0) ?
|
|
1500
|
-
digest.topUnstableTasks.map((tItem, idx) =>
|
|
1112
|
+
(digest.topUnstableTasks && digest.topUnstableTasks.length > 0) ? _h('div', { style: { display: 'flex', flexDirection: 'column', gap: '6px' } },
|
|
1113
|
+
digest.topUnstableTasks.map((tItem, idx) => _h('div', {
|
|
1501
1114
|
key: tItem.id || idx,
|
|
1502
1115
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', fontSize: '12px', padding: '6px 8px', background: 'var(--dsw-alias-bg-base, #111)', borderRadius: '4px', border: '1px solid var(--dsw-alias-border-l2, #222)' }
|
|
1503
1116
|
},
|
|
1504
|
-
|
|
1505
|
-
|
|
1117
|
+
_h('span', { style: { fontFamily: 'monospace' } }, (idx + 1) + '. ' + (tItem.name || tItem.id)),
|
|
1118
|
+
_h('span', { style: { color: 'var(--dsh-cron-danger, #e33)', fontWeight: '600' } },
|
|
1506
1119
|
tItem.failures + ' fail (' + tItem.successRate + '% SR)'
|
|
1507
1120
|
)
|
|
1508
1121
|
))
|
|
1509
|
-
) :
|
|
1122
|
+
) : _h('div', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #888)' } }, '✓ All tasks healthy — 0 failures in window!')
|
|
1510
1123
|
),
|
|
1511
|
-
|
|
1512
|
-
|
|
1124
|
+
_h('div', { style: { background: 'var(--dsw-alias-bg-layer-2, #111)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '6px', padding: '12px' } },
|
|
1125
|
+
_h('div', { style: { fontWeight: '600', fontSize: '13px', color: 'var(--dsh-cron-info, #4af)', marginBottom: '8px' } },
|
|
1513
1126
|
'💰 ' + (T_KEY(t, 'digest.expensiveTitle'))
|
|
1514
1127
|
),
|
|
1515
|
-
(digest.topExpensiveTasks && digest.topExpensiveTasks.length > 0) ?
|
|
1516
|
-
digest.topExpensiveTasks.map((tItem, idx) =>
|
|
1128
|
+
(digest.topExpensiveTasks && digest.topExpensiveTasks.length > 0) ? _h('div', { style: { display: 'flex', flexDirection: 'column', gap: '6px' } },
|
|
1129
|
+
digest.topExpensiveTasks.map((tItem, idx) => _h('div', {
|
|
1517
1130
|
key: tItem.id || idx,
|
|
1518
1131
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', fontSize: '12px', padding: '6px 8px', background: 'var(--dsw-alias-bg-base, #111)', borderRadius: '4px', border: '1px solid var(--dsw-alias-border-l2, #222)' }
|
|
1519
1132
|
},
|
|
1520
|
-
|
|
1521
|
-
|
|
1133
|
+
_h('span', { style: { fontFamily: 'monospace' } }, (idx + 1) + '. ' + (tItem.name || tItem.id)),
|
|
1134
|
+
_h('span', { style: { color: 'var(--dsw-alias-label-primary, #ddd)' } },
|
|
1522
1135
|
Number(tItem.tokens || 0).toLocaleString() + ' tok ($' + Number(tItem.costUsd || 0).toFixed(4) + ')'
|
|
1523
1136
|
)
|
|
1524
1137
|
))
|
|
1525
|
-
) :
|
|
1138
|
+
) : _h('div', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #888)' } }, 'No significant token consumption recorded.')
|
|
1526
1139
|
)
|
|
1527
1140
|
)
|
|
1528
1141
|
),
|
|
1529
|
-
|
|
1142
|
+
_h('div', {
|
|
1530
1143
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 18px', borderTop: '1px solid var(--dsw-alias-border-l2, #333)', background: 'var(--dsw-alias-bg-layer-2, #111)' }
|
|
1531
1144
|
},
|
|
1532
|
-
|
|
1145
|
+
_h('div', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #888)' } },
|
|
1533
1146
|
sendStatus || ''
|
|
1534
1147
|
),
|
|
1535
|
-
|
|
1536
|
-
|
|
1148
|
+
_h('div', { style: { display: 'flex', gap: '8px' } },
|
|
1149
|
+
_h('button', {
|
|
1537
1150
|
type: 'button',
|
|
1538
1151
|
className: 'dsh-cron-btn-secondary',
|
|
1539
1152
|
onClick: copyMarkdown,
|
|
1540
1153
|
style: { padding: '6px 14px', fontSize: '12px' }
|
|
1541
1154
|
}, T_KEY(t, 'digest.copyMarkdown')),
|
|
1542
|
-
|
|
1155
|
+
_h('button', {
|
|
1543
1156
|
type: 'button',
|
|
1544
1157
|
className: 'dsh-cron-btn-primary',
|
|
1545
1158
|
onClick: onSendTelegram,
|
|
@@ -1564,70 +1177,70 @@ if (!isOpen) return null;
|
|
|
1564
1177
|
const tab = activeTab || 'timeline';
|
|
1565
1178
|
const timeline = timelineData || { buckets: [], totalRuns: 0, peakHoursCount: 0, maxConcurrent: 3 };
|
|
1566
1179
|
const heatmap = heatmapData || { matrix: [], dayLabels: [], hourLabels: [], totalCostUsd: 0, totalTokens: 0, maxCostHour: 0 };
|
|
1567
|
-
return
|
|
1180
|
+
return _h('div', {
|
|
1568
1181
|
className: 'dsh-cron-modal-overlay',
|
|
1569
1182
|
onClick: onClose
|
|
1570
1183
|
},
|
|
1571
|
-
|
|
1184
|
+
_h('div', {
|
|
1572
1185
|
className: 'dsh-cron-modal',
|
|
1573
1186
|
style: { maxWidth: '960px', width: '94vw', maxHeight: '88vh', display: 'flex', flexDirection: 'column', background: 'var(--dsw-alias-bg-base, #111)', color: 'var(--dsw-alias-label-primary, #ddd)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '8px' },
|
|
1574
1187
|
role: 'dialog',
|
|
1575
1188
|
'aria-modal': 'true',
|
|
1576
1189
|
onClick: (e) => e.stopPropagation()
|
|
1577
1190
|
},
|
|
1578
|
-
|
|
1191
|
+
_h('div', {
|
|
1579
1192
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '14px 18px', borderBottom: '1px solid var(--dsw-alias-border-l2, #333)', background: 'var(--dsw-alias-bg-layer-2, #111)' }
|
|
1580
1193
|
},
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1194
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '10px' } },
|
|
1195
|
+
_h('span', { style: { fontSize: '20px' } }, tab === 'timeline' ? '⏱' : '🔥'),
|
|
1196
|
+
_h('div', null,
|
|
1197
|
+
_h('div', { style: { fontWeight: '600', fontSize: '15px', color: 'var(--dsw-alias-label-primary, #fff)' } },
|
|
1585
1198
|
tab === 'timeline' ? (T_KEY(t, 'timeline.modalTitle')) : (T_KEY(t, 'heatmap.modalTitle'))
|
|
1586
1199
|
),
|
|
1587
|
-
|
|
1200
|
+
_h('div', { style: { fontSize: '11.5px', color: 'var(--dsw-alias-label-secondary, #888)', marginTop: '2px' } },
|
|
1588
1201
|
tab === 'timeline'
|
|
1589
1202
|
? (timeline.totalRuns + ' runs projected · ' + (timeline.peakHoursCount ? '⚠️ ' + timeline.peakHoursCount + ' peak hours' : '✓ balanced concurrency'))
|
|
1590
1203
|
: ('$' + Number(heatmap.totalCostUsd || 0).toFixed(4) + ' USD · ' + Number(heatmap.totalTokens || 0).toLocaleString() + ' tokens')
|
|
1591
1204
|
)
|
|
1592
1205
|
)
|
|
1593
1206
|
),
|
|
1594
|
-
|
|
1595
|
-
|
|
1207
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
1208
|
+
_h('button', {
|
|
1596
1209
|
type: 'button',
|
|
1597
1210
|
className: 'dsh-cron-btn-secondary',
|
|
1598
1211
|
style: { padding: '4px 12px', fontSize: '12px', fontWeight: tab === 'timeline' ? '600' : '400', background: tab === 'timeline' ? 'var(--dsw-alias-bg-layer-3, #222)' : 'transparent' },
|
|
1599
1212
|
onClick: () => onSelectTab && onSelectTab('timeline')
|
|
1600
1213
|
}, '⏱ ' + (T_KEY(t, 'timeline.tabTimeline'))),
|
|
1601
|
-
|
|
1214
|
+
_h('button', {
|
|
1602
1215
|
type: 'button',
|
|
1603
1216
|
className: 'dsh-cron-btn-secondary',
|
|
1604
1217
|
style: { padding: '4px 12px', fontSize: '12px', fontWeight: tab === 'heatmap' ? '600' : '400', background: tab === 'heatmap' ? 'var(--dsw-alias-bg-layer-3, #222)' : 'transparent' },
|
|
1605
1218
|
onClick: () => onSelectTab && onSelectTab('heatmap')
|
|
1606
1219
|
}, '🔥 ' + (T_KEY(t, 'heatmap.tabHeatmap'))),
|
|
1607
|
-
|
|
1220
|
+
_h('button', {
|
|
1608
1221
|
type: 'button',
|
|
1609
1222
|
className: 'dsh-cron-icon-btn',
|
|
1610
1223
|
onClick: onClose,
|
|
1611
1224
|
style: { marginLeft: '8px' }
|
|
1612
|
-
},
|
|
1225
|
+
}, _h('span', null, '✕'))
|
|
1613
1226
|
)
|
|
1614
1227
|
),
|
|
1615
|
-
|
|
1228
|
+
_h('div', {
|
|
1616
1229
|
style: { padding: '16px 18px', overflowY: 'auto', flex: 1, display: 'flex', flexDirection: 'column', gap: '14px' }
|
|
1617
1230
|
},
|
|
1618
|
-
isLoading ?
|
|
1231
|
+
isLoading ? _h('div', { style: { padding: '40px', textAlign: 'center', color: 'var(--dsw-alias-label-secondary, #888)' } }, 'Loading visualization data...') : (
|
|
1619
1232
|
tab === 'timeline' ? (
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1233
|
+
_h('div', { style: { display: 'flex', flexDirection: 'column', gap: '8px' } },
|
|
1234
|
+
_h('div', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #888)', display: 'flex', justifyContent: 'space-between' } },
|
|
1235
|
+
_h('span', null, T_KEY(t, 'timeline.legendDesc')),
|
|
1236
|
+
_h('span', { style: { color: 'var(--dsh-cron-warning, #fa0)' } }, '⚠️ ' + (T_KEY(t, 'timeline.peakWarning')) + ' (' + timeline.maxConcurrent + ')')
|
|
1624
1237
|
),
|
|
1625
|
-
|
|
1238
|
+
_h('div', {
|
|
1626
1239
|
style: { display: 'grid', gridTemplateColumns: 'repeat(12, 1fr)', gap: '8px', marginTop: '6px' }
|
|
1627
1240
|
},
|
|
1628
1241
|
(timeline.buckets || []).map((b) => {
|
|
1629
1242
|
const isPeak = b.isPeak, hasRuns = b.count > 0;
|
|
1630
|
-
return
|
|
1243
|
+
return _h('div', {
|
|
1631
1244
|
key: b.index,
|
|
1632
1245
|
style: {
|
|
1633
1246
|
background: isPeak ? 'color-mix(in srgb, var(--dsh-cron-danger, #e33) 12%, var(--dsw-alias-bg-layer-2, #111))' : (hasRuns ? 'var(--dsw-alias-bg-layer-2, #111)' : 'var(--dsw-alias-bg-base, #111)'),
|
|
@@ -1635,12 +1248,12 @@ border: isPeak ? '1px solid var(--dsh-cron-danger, #e33)' : (hasRuns ? '1px soli
|
|
|
1635
1248
|
borderRadius: '6px', padding: '8px', minHeight: '75px', display: 'flex', flexDirection: 'column', justifyContent: 'space-between'
|
|
1636
1249
|
}
|
|
1637
1250
|
},
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
hasRuns ?
|
|
1251
|
+
_h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', fontSize: '11px' } },
|
|
1252
|
+
_h('span', { style: { fontWeight: '600', color: isPeak ? 'var(--dsh-cron-danger, #e33)' : 'var(--dsw-alias-label-primary, #fff)' } }, b.label),
|
|
1253
|
+
hasRuns ? _h('span', { style: { fontSize: '10px', padding: '1px 5px', borderRadius: '8px', background: isPeak ? 'var(--dsh-cron-danger, #e33)' : 'var(--dsw-alias-bg-layer-3, #222)', color: '#fff' } }, b.count) : null
|
|
1641
1254
|
),
|
|
1642
|
-
|
|
1643
|
-
(b.runs || []).slice(0, 3).map((r, rIdx) =>
|
|
1255
|
+
_h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: '3px', marginTop: '4px' } },
|
|
1256
|
+
(b.runs || []).slice(0, 3).map((r, rIdx) => _h('span', {
|
|
1644
1257
|
key: rIdx, title: (r.title || r.taskId) + ' (' + r.time + ')',
|
|
1645
1258
|
style: { fontSize: '9.5px', fontFamily: 'monospace', padding: '1px 4px', borderRadius: '3px', background: 'var(--dsw-alias-bg-base, #111)', border: '1px solid var(--dsw-alias-border-l2, #333)', maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }
|
|
1646
1259
|
}, r.title || r.taskId))
|
|
@@ -1650,36 +1263,36 @@ style: { fontSize: '9.5px', fontFamily: 'monospace', padding: '1px 4px', borderR
|
|
|
1650
1263
|
)
|
|
1651
1264
|
)
|
|
1652
1265
|
) : (
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1266
|
+
_h('div', { style: { display: 'flex', flexDirection: 'column', gap: '10px' } },
|
|
1267
|
+
_h('div', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #888)', display: 'flex', justifyContent: 'space-between' } },
|
|
1268
|
+
_h('span', null, T_KEY(t, 'heatmap.matrixDesc')),
|
|
1269
|
+
_h('span', null, 'Max hour spend: $' + Number(heatmap.maxCostHour || 0).toFixed(4))
|
|
1657
1270
|
),
|
|
1658
|
-
|
|
1271
|
+
_h('div', {
|
|
1659
1272
|
style: { overflowX: 'auto', paddingBottom: '8px' }
|
|
1660
1273
|
},
|
|
1661
|
-
|
|
1274
|
+
_h('table', {
|
|
1662
1275
|
style: { borderCollapse: 'collapse', width: '100%', minWidth: '700px', fontSize: '10.5px' }
|
|
1663
1276
|
},
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
Array.from({ length: 24 }, (_,
|
|
1668
|
-
key:
|
|
1277
|
+
_h('thead', null,
|
|
1278
|
+
_h('tr', null,
|
|
1279
|
+
_h('th', { style: { padding: '4px 6px', textAlign: 'left', color: 'var(--dsw-alias-label-secondary, #888)' } }, 'Day'),
|
|
1280
|
+
Array.from({ length: 24 }, (_, hour) => _h('th', {
|
|
1281
|
+
key: hour,
|
|
1669
1282
|
style: { padding: '4px 2px', textAlign: 'center', color: 'var(--dsw-alias-label-secondary, #888)', fontWeight: '400' }
|
|
1670
|
-
}, String(
|
|
1283
|
+
}, String(hour).padStart(2, '0')))
|
|
1671
1284
|
)
|
|
1672
1285
|
),
|
|
1673
|
-
|
|
1674
|
-
(heatmap.matrix || []).map((row, dIdx) =>
|
|
1675
|
-
|
|
1286
|
+
_h('tbody', null,
|
|
1287
|
+
(heatmap.matrix || []).map((row, dIdx) => _h('tr', { key: dIdx },
|
|
1288
|
+
_h('td', { style: { padding: '4px 6px', fontWeight: '600', color: 'var(--dsw-alias-label-primary, #ddd)' } }, (heatmap.dayLabels && heatmap.dayLabels[dIdx]) || 'Day'),
|
|
1676
1289
|
row.map((cell, hIdx) => {
|
|
1677
1290
|
const intensity = cell.costIntensity || 0;
|
|
1678
1291
|
const hasSpend = cell.costUsd > 0;
|
|
1679
1292
|
const bg = hasSpend
|
|
1680
1293
|
? 'color-mix(in srgb, var(--dsh-cron-primary, #4af) ' + Math.max(15, Math.round(intensity * 100)) + '%, transparent)'
|
|
1681
1294
|
: 'transparent';
|
|
1682
|
-
return
|
|
1295
|
+
return _h('td', {
|
|
1683
1296
|
key: hIdx,
|
|
1684
1297
|
title: cell.dayLabel + ' ' + cell.hourLabel + ': $' + cell.costUsd + ' (' + cell.tokens.toLocaleString() + ' tokens, ' + cell.runs + ' runs)',
|
|
1685
1298
|
style: {
|
|
@@ -1689,7 +1302,7 @@ background: bg,
|
|
|
1689
1302
|
border: '1px solid var(--dsw-alias-border-l2, #222)',
|
|
1690
1303
|
cursor: hasSpend ? 'pointer' : 'default'
|
|
1691
1304
|
}
|
|
1692
|
-
}, hasSpend ?
|
|
1305
|
+
}, hasSpend ? _h('span', { style: { fontSize: '9px', color: intensity > 0.5 ? '#fff' : 'var(--dsw-alias-label-primary, #ddd)' } }, '$' + (cell.costUsd >= 0.01 ? cell.costUsd.toFixed(2) : cell.costUsd.toFixed(3).slice(1))) : '·');
|
|
1693
1306
|
})
|
|
1694
1307
|
))
|
|
1695
1308
|
)
|
|
@@ -1699,10 +1312,10 @@ cursor: hasSpend ? 'pointer' : 'default'
|
|
|
1699
1312
|
)
|
|
1700
1313
|
)
|
|
1701
1314
|
),
|
|
1702
|
-
|
|
1315
|
+
_h('div', {
|
|
1703
1316
|
style: { display: 'flex', justifyContent: 'flex-end', padding: '12px 18px', borderTop: '1px solid var(--dsw-alias-border-l2, #333)', background: 'var(--dsw-alias-bg-layer-2, #111)' }
|
|
1704
1317
|
},
|
|
1705
|
-
|
|
1318
|
+
_h('button', {
|
|
1706
1319
|
type: 'button',
|
|
1707
1320
|
className: 'dsh-cron-btn-secondary',
|
|
1708
1321
|
onClick: onClose,
|
|
@@ -1810,6 +1423,7 @@ const [formMisfirePolicy, setFormMisfirePolicy] = React.useState('skip');
|
|
|
1810
1423
|
const [formMaxRetries, setFormMaxRetries] = React.useState(0);
|
|
1811
1424
|
const [formPermissionPreset, setFormPermissionPreset] = React.useState('default');
|
|
1812
1425
|
const [formAgentPreset, setFormAgentPreset] = React.useState('');
|
|
1426
|
+
const [formSessionTitle, setFormSessionTitle] = React.useState('');
|
|
1813
1427
|
const [formTargetSessionId, setFormTargetSessionId] = React.useState('');
|
|
1814
1428
|
const [formTargetSessionReset, setFormTargetSessionReset] = React.useState('never');
|
|
1815
1429
|
const [formEnv, setFormEnv] = React.useState('');
|
|
@@ -2585,6 +2199,7 @@ misfirePolicy: 'skip',
|
|
|
2585
2199
|
maxRetries: 0,
|
|
2586
2200
|
permissionPreset: 'default',
|
|
2587
2201
|
agentPreset: '',
|
|
2202
|
+
sessionTitle: '',
|
|
2588
2203
|
targetSessionId: '',
|
|
2589
2204
|
targetSessionReset: 'never',
|
|
2590
2205
|
env: '',
|
|
@@ -2719,6 +2334,7 @@ setFormMisfirePolicy(task.misfirePolicy || 'skip');
|
|
|
2719
2334
|
setFormMaxRetries(task.maxRetries !== undefined ? task.maxRetries : 0);
|
|
2720
2335
|
setFormPermissionPreset(task.permissionPreset || 'default');
|
|
2721
2336
|
setFormAgentPreset(task.agentPreset || '');
|
|
2337
|
+
setFormSessionTitle(task.sessionTitle || '');
|
|
2722
2338
|
setFormTargetSessionId(task.targetSessionId || '');
|
|
2723
2339
|
setFormTargetSessionReset(task.targetSessionReset || 'never');
|
|
2724
2340
|
setFormEnv(formatEnvText(task.env));
|
|
@@ -2777,6 +2393,7 @@ misfirePolicy: formMisfirePolicy,
|
|
|
2777
2393
|
maxRetries: Number(formMaxRetries) || 0,
|
|
2778
2394
|
permissionPreset: isAgentType ? formPermissionPreset : 'default',
|
|
2779
2395
|
agentPreset: formAgentPreset.trim() || undefined,
|
|
2396
|
+
sessionTitle: formSessionTitle.trim() || undefined,
|
|
2780
2397
|
targetSessionId: formTargetSessionId.trim() || undefined,
|
|
2781
2398
|
targetSessionReset: formTargetSessionReset || 'never',
|
|
2782
2399
|
kanbanMode: formKanbanMode,
|
|
@@ -3011,82 +2628,82 @@ setTimelineLoading(false);
|
|
|
3011
2628
|
const onSelectTimelineTab = (tab) => {
|
|
3012
2629
|
setTimelineTab(tab);
|
|
3013
2630
|
};
|
|
3014
|
-
return
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
2631
|
+
return _h('div', { className: 'dsh-cron-overlay' },
|
|
2632
|
+
_h('div', { className: 'dsh-cron-container' },
|
|
2633
|
+
_h('div', { className: 'dsh-cron-top-bar' },
|
|
2634
|
+
_h('button', {
|
|
3018
2635
|
type: 'button',
|
|
3019
2636
|
className: 'dsh-cron-back-btn',
|
|
3020
2637
|
title: T_KEY(t, 'panel.back'),
|
|
3021
2638
|
onClick: () => { if (onClose) onClose(); else toggle.set(false); }
|
|
3022
2639
|
},
|
|
3023
|
-
|
|
3024
|
-
|
|
2640
|
+
_h('span', svgProps(BACK_ICON)),
|
|
2641
|
+
_h('span', null, T_KEY(t, 'panel.back'))
|
|
3025
2642
|
)
|
|
3026
2643
|
),
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
2644
|
+
_h('div', { className: 'dsh-cron-header' },
|
|
2645
|
+
_h('div', null,
|
|
2646
|
+
_h('div', { className: 'dsh-cron-title' }, T_KEY(t, 'panel.title')),
|
|
2647
|
+
_h('div', { className: 'dsh-cron-subtitle' }, T_KEY(t, 'panel.subtitle'))
|
|
3031
2648
|
),
|
|
3032
|
-
|
|
3033
|
-
|
|
2649
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '10px' } },
|
|
2650
|
+
_h('button', {
|
|
3034
2651
|
type: 'button',
|
|
3035
2652
|
className: 'dsh-cron-btn-secondary',
|
|
3036
2653
|
style: { display: 'flex', alignItems: 'center', gap: '6px', height: '36px', padding: '0 12px' },
|
|
3037
2654
|
title: T_KEY(t, 'timeline.buttonTitle'),
|
|
3038
2655
|
onClick: () => openTimelineModal('timeline')
|
|
3039
2656
|
},
|
|
3040
|
-
|
|
2657
|
+
_h('span', { style: { fontSize: '14px' } }, '⏱'),
|
|
3041
2658
|
T_KEY(t, 'timeline.buttonLabel')
|
|
3042
2659
|
),
|
|
3043
|
-
|
|
2660
|
+
_h('button', {
|
|
3044
2661
|
type: 'button',
|
|
3045
2662
|
className: 'dsh-cron-btn-secondary',
|
|
3046
2663
|
style: { display: 'flex', alignItems: 'center', gap: '6px', height: '36px', padding: '0 12px' },
|
|
3047
2664
|
title: T_KEY(t, 'digest.buttonTitle'),
|
|
3048
2665
|
onClick: openAnalyticsDigest
|
|
3049
2666
|
},
|
|
3050
|
-
|
|
2667
|
+
_h('span', { style: { fontSize: '14px' } }, '📊'),
|
|
3051
2668
|
T_KEY(t, 'digest.buttonLabel')
|
|
3052
2669
|
),
|
|
3053
|
-
|
|
2670
|
+
_h('button', {
|
|
3054
2671
|
type: 'button',
|
|
3055
2672
|
className: 'dsh-cron-btn-secondary',
|
|
3056
2673
|
style: { display: 'flex', alignItems: 'center', gap: '6px', height: '36px', padding: '0 14px' },
|
|
3057
2674
|
title: T_KEY(t, 'actions.settings'),
|
|
3058
2675
|
onClick: openSettingsModal
|
|
3059
2676
|
},
|
|
3060
|
-
|
|
2677
|
+
_h('span', { style: { display: 'flex', alignItems: 'center', color: 'var(--dsh-cron-info)' }, ...iconHtml(ICON_TELEGRAM) }),
|
|
3061
2678
|
T_KEY(t, 'actions.settings')
|
|
3062
2679
|
),
|
|
3063
|
-
|
|
3064
|
-
|
|
2680
|
+
_h('div', { style: { position: 'relative' } },
|
|
2681
|
+
_h('button', { className: 'dsh-cron-create-btn', onClick: () => setDropdownOpen(!dropdownOpen) },
|
|
3065
2682
|
T_KEY(t, 'actions.create'),
|
|
3066
|
-
|
|
2683
|
+
_h('span', iconHtml(ICON_CHEVRON_DOWN))
|
|
3067
2684
|
),
|
|
3068
|
-
dropdownOpen &&
|
|
3069
|
-
|
|
3070
|
-
|
|
2685
|
+
dropdownOpen && _h('div', { className: 'dsh-cron-dropdown' },
|
|
2686
|
+
_h('button', { className: 'dsh-cron-dropdown-item', onClick: openDshModal }, T_KEY(t, 'actions.createWithDsh')),
|
|
2687
|
+
_h('button', { className: 'dsh-cron-dropdown-item', onClick: () => openManualModal(null) }, T_KEY(t, 'actions.setupManually'))
|
|
3071
2688
|
)
|
|
3072
2689
|
),
|
|
3073
|
-
|
|
2690
|
+
_h('button', {
|
|
3074
2691
|
type: 'button',
|
|
3075
2692
|
className: 'dsh-cron-icon-btn',
|
|
3076
2693
|
title: T_KEY(t, 'transfer.exportTitle'),
|
|
3077
2694
|
'aria-label': T_KEY(t, 'transfer.exportTitle'),
|
|
3078
2695
|
disabled: transferBusy,
|
|
3079
2696
|
onClick: handleExport
|
|
3080
|
-
},
|
|
3081
|
-
|
|
2697
|
+
}, _h('span', svgProps(ICON_DOWNLOAD))),
|
|
2698
|
+
_h('button', {
|
|
3082
2699
|
type: 'button',
|
|
3083
2700
|
className: 'dsh-cron-icon-btn',
|
|
3084
2701
|
title: T_KEY(t, 'transfer.importTitle'),
|
|
3085
2702
|
'aria-label': T_KEY(t, 'transfer.importTitle'),
|
|
3086
2703
|
disabled: transferBusy,
|
|
3087
2704
|
onClick: () => { if (importFileRef.current) importFileRef.current.click(); }
|
|
3088
|
-
},
|
|
3089
|
-
|
|
2705
|
+
}, _h('span', svgProps(ICON_UPLOAD))),
|
|
2706
|
+
_h('input', {
|
|
3090
2707
|
type: 'file',
|
|
3091
2708
|
accept: '.json,application/json',
|
|
3092
2709
|
ref: importFileRef,
|
|
@@ -3095,9 +2712,9 @@ onChange: handleImportFile
|
|
|
3095
2712
|
})
|
|
3096
2713
|
)
|
|
3097
2714
|
),
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
2715
|
+
_h('div', { className: 'dsh-cron-search-bar' },
|
|
2716
|
+
_h('span', { className: 'dsh-cron-search-icon', ...iconHtml(ICON_SEARCH) }),
|
|
2717
|
+
_h('input', {
|
|
3101
2718
|
className: 'dsh-cron-search-input',
|
|
3102
2719
|
type: 'search',
|
|
3103
2720
|
'aria-label': T_KEY(t, 'search.placeholder'),
|
|
@@ -3106,27 +2723,27 @@ value: query,
|
|
|
3106
2723
|
onChange: (e) => setQuery(e.target.value)
|
|
3107
2724
|
})
|
|
3108
2725
|
),
|
|
3109
|
-
stats &&
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
2726
|
+
stats && _h('div', { className: 'dsh-cron-stats-bar' },
|
|
2727
|
+
_h('div', { className: 'dsh-cron-stat-card' },
|
|
2728
|
+
_h('div', { className: 'dsh-cron-stat-val' }, stats.activeTasks || 0),
|
|
2729
|
+
_h('div', { className: 'dsh-cron-stat-lbl' }, T_KEY(t, 'stats.activeTasks'))
|
|
3113
2730
|
),
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
2731
|
+
_h('div', { className: 'dsh-cron-stat-card' },
|
|
2732
|
+
_h('div', { className: 'dsh-cron-stat-val' }, stats.totalRuns || 0),
|
|
2733
|
+
_h('div', { className: 'dsh-cron-stat-lbl' }, T_KEY(t, 'stats.totalRuns'))
|
|
3117
2734
|
),
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
2735
|
+
_h('div', { className: 'dsh-cron-stat-card' },
|
|
2736
|
+
_h('div', { className: 'dsh-cron-stat-val' }, (stats.totalTokens || 0).toLocaleString()),
|
|
2737
|
+
_h('div', { className: 'dsh-cron-stat-lbl' }, T_KEY(t, 'stats.totalTokens'))
|
|
3121
2738
|
),
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
2739
|
+
_h('div', { className: 'dsh-cron-stat-card' },
|
|
2740
|
+
_h('div', { className: 'dsh-cron-stat-val', style: { color: 'var(--dsh-cron-success)' } }, '$' + (stats.totalCostUsd || 0).toFixed(4)),
|
|
2741
|
+
_h('div', { className: 'dsh-cron-stat-lbl' }, T_KEY(t, 'stats.totalCost'))
|
|
3125
2742
|
)
|
|
3126
2743
|
),
|
|
3127
|
-
|
|
2744
|
+
_h('div', { className: 'dsh-cron-tabs' },
|
|
3128
2745
|
['all', 'active', 'paused', 'completed'].map((tabName) =>
|
|
3129
|
-
|
|
2746
|
+
_h('button', {
|
|
3130
2747
|
key: tabName,
|
|
3131
2748
|
className: 'dsh-cron-tab',
|
|
3132
2749
|
'data-active': tab === tabName ? 'true' : undefined,
|
|
@@ -3138,8 +2755,8 @@ tabName === 'all' ? T_KEY(t, 'tabs.all')
|
|
|
3138
2755
|
: T_KEY(t, 'tabs.completed'))
|
|
3139
2756
|
)
|
|
3140
2757
|
),
|
|
3141
|
-
|
|
3142
|
-
|
|
2758
|
+
_h('div', { className: 'dsh-cron-filters' },
|
|
2759
|
+
_h('button', {
|
|
3143
2760
|
type: 'button',
|
|
3144
2761
|
className: 'dsh-cron-filter-toggle',
|
|
3145
2762
|
'aria-expanded': filtersOpen ? 'true' : 'false',
|
|
@@ -3148,73 +2765,73 @@ onClick: () => setFiltersOpen(!filtersOpen)
|
|
|
3148
2765
|
T_KEY(t, 'filters.title'),
|
|
3149
2766
|
(filterType || filterModel || filterChannel) ? ' •' : ''
|
|
3150
2767
|
),
|
|
3151
|
-
filtersOpen &&
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
2768
|
+
filtersOpen && _h('div', { className: 'dsh-cron-filter-panel' },
|
|
2769
|
+
_h('label', { className: 'dsh-cron-filter-field' },
|
|
2770
|
+
_h('span', null, T_KEY(t, 'filters.type')),
|
|
2771
|
+
_h('select', {
|
|
3155
2772
|
value: filterType,
|
|
3156
2773
|
onChange: (e) => setFilterType(e.target.value)
|
|
3157
2774
|
},
|
|
3158
|
-
|
|
3159
|
-
...filterTypeOptions.map((value) =>
|
|
2775
|
+
_h('option', { value: '' }, T_KEY(t, 'filters.any')),
|
|
2776
|
+
...filterTypeOptions.map((value) => _h('option', { key: value, value }, value))
|
|
3160
2777
|
)
|
|
3161
2778
|
),
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
2779
|
+
_h('label', { className: 'dsh-cron-filter-field' },
|
|
2780
|
+
_h('span', null, T_KEY(t, 'filters.model')),
|
|
2781
|
+
_h('select', {
|
|
3165
2782
|
value: filterModel,
|
|
3166
2783
|
onChange: (e) => setFilterModel(e.target.value)
|
|
3167
2784
|
},
|
|
3168
|
-
|
|
3169
|
-
...filterModelOptions.map((value) =>
|
|
2785
|
+
_h('option', { value: '' }, T_KEY(t, 'filters.any')),
|
|
2786
|
+
...filterModelOptions.map((value) => _h('option', { key: value, value }, value))
|
|
3170
2787
|
)
|
|
3171
2788
|
),
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
2789
|
+
_h('label', { className: 'dsh-cron-filter-field' },
|
|
2790
|
+
_h('span', null, T_KEY(t, 'filters.channel')),
|
|
2791
|
+
_h('select', {
|
|
3175
2792
|
value: filterChannel,
|
|
3176
2793
|
onChange: (e) => setFilterChannel(e.target.value)
|
|
3177
2794
|
},
|
|
3178
|
-
|
|
3179
|
-
...DELIVERY_CHANNELS.map((id) =>
|
|
2795
|
+
_h('option', { value: '' }, T_KEY(t, 'filters.any')),
|
|
2796
|
+
...DELIVERY_CHANNELS.map((id) => _h('option', { key: id, value: id }, T_KEY(t, CHANNEL_LABEL_KEYS[id])))
|
|
3180
2797
|
)
|
|
3181
2798
|
)
|
|
3182
2799
|
)
|
|
3183
2800
|
),
|
|
3184
|
-
fetchError ?
|
|
2801
|
+
fetchError ? _h('div', {
|
|
3185
2802
|
className: 'dsh-cron-status-banner',
|
|
3186
2803
|
'data-type': 'error',
|
|
3187
2804
|
style: { margin: '8px 0', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }
|
|
3188
2805
|
},
|
|
3189
|
-
|
|
3190
|
-
|
|
2806
|
+
_h('span', null, T_KEY(t, 'banner.loadError', { error: fetchError })),
|
|
2807
|
+
_h('button', {
|
|
3191
2808
|
type: 'button',
|
|
3192
2809
|
className: 'dsh-cron-btn-secondary',
|
|
3193
2810
|
style: { marginLeft: '8px', padding: '2px 8px', fontSize: '12px' },
|
|
3194
2811
|
onClick: () => fetchTasks()
|
|
3195
2812
|
}, T_KEY(t, 'banner.retry'))
|
|
3196
2813
|
) : null,
|
|
3197
|
-
(filterType || filterModel || filterChannel) ?
|
|
2814
|
+
(filterType || filterModel || filterChannel) ? _h('div', {
|
|
3198
2815
|
className: 'dsh-cron-filter-summary',
|
|
3199
2816
|
style: { fontSize: '12px', color: 'var(--dsw-alias-label-tertiary, #888)', marginBottom: '8px', display: 'flex', gap: '8px', alignItems: 'center' }
|
|
3200
2817
|
},
|
|
3201
|
-
|
|
3202
|
-
|
|
2818
|
+
_h('span', null, T_KEY(t, 'filters.showing', { shown: visibleTasks.length, total: tasks.length })),
|
|
2819
|
+
_h('button', {
|
|
3203
2820
|
type: 'button',
|
|
3204
2821
|
className: 'dsh-cron-btn-secondary',
|
|
3205
2822
|
style: { padding: '2px 8px', fontSize: '11px' },
|
|
3206
2823
|
onClick: resetFilters
|
|
3207
2824
|
}, T_KEY(t, 'filters.reset'))
|
|
3208
2825
|
) : null,
|
|
3209
|
-
|
|
2826
|
+
_h('div', { className: 'dsh-cron-task-list' },
|
|
3210
2827
|
loading && tasks.length === 0
|
|
3211
|
-
?
|
|
2828
|
+
? _h('div', { style: { color: 'var(--dsw-alias-label-tertiary, #888)', padding: '16px 0', fontSize: '14px' } }, T_KEY(t, 'list.loading'))
|
|
3212
2829
|
: tasks.length === 0
|
|
3213
|
-
?
|
|
2830
|
+
? _h('div', { style: { color: 'var(--dsw-alias-label-tertiary, #777)', padding: '16px 0', fontSize: '14px' } }, T_KEY(t, 'list.empty'))
|
|
3214
2831
|
: visibleTasks.length === 0
|
|
3215
|
-
?
|
|
3216
|
-
|
|
3217
|
-
|
|
2832
|
+
? _h('div', { style: { color: 'var(--dsw-alias-label-tertiary, #777)', padding: '16px 0', fontSize: '14px', display: 'flex', gap: '10px', alignItems: 'center' } },
|
|
2833
|
+
_h('span', null, T_KEY(t, 'filters.empty')),
|
|
2834
|
+
_h('button', {
|
|
3218
2835
|
type: 'button',
|
|
3219
2836
|
className: 'dsh-cron-btn-secondary',
|
|
3220
2837
|
style: { padding: '2px 8px', fontSize: '12px' },
|
|
@@ -3222,7 +2839,7 @@ onClick: resetFilters
|
|
|
3222
2839
|
}, T_KEY(t, 'filters.reset'))
|
|
3223
2840
|
)
|
|
3224
2841
|
: visibleTasks.map((task) =>
|
|
3225
|
-
|
|
2842
|
+
_h('div', {
|
|
3226
2843
|
key: task.id,
|
|
3227
2844
|
className: 'dsh-cron-task-item',
|
|
3228
2845
|
'data-task-id': task.id,
|
|
@@ -3238,127 +2855,127 @@ openEditModal(task);
|
|
|
3238
2855
|
}
|
|
3239
2856
|
}
|
|
3240
2857
|
},
|
|
3241
|
-
isConfigManaged(task) ? null :
|
|
2858
|
+
isConfigManaged(task) ? null : _h('button', {
|
|
3242
2859
|
type: 'button',
|
|
3243
2860
|
className: 'dsh-cron-task-status-btn' + (task.running ? ' dsh-cron-pulse' : ''),
|
|
3244
2861
|
'data-active': task.status === 'active' ? 'true' : undefined,
|
|
3245
2862
|
title: task.status === 'active' ? T_KEY(t, 'actions.pause') : T_KEY(t, 'actions.resume'),
|
|
3246
2863
|
'aria-label': task.status === 'active' ? T_KEY(t, 'actions.pause') : T_KEY(t, 'actions.resume'),
|
|
3247
2864
|
onClick: (e) => { e.stopPropagation(); handleToggleTask(task.id); }
|
|
3248
|
-
},
|
|
3249
|
-
|
|
3250
|
-
|
|
2865
|
+
}, _h('span', svgProps(task.status === 'active' ? ICON_PAUSE : ICON_PLAY))),
|
|
2866
|
+
_h('div', { className: 'dsh-cron-task-info' },
|
|
2867
|
+
_h('div', { className: 'dsh-cron-task-title' },
|
|
3251
2868
|
task.title,
|
|
3252
|
-
|
|
2869
|
+
_h('span', {
|
|
3253
2870
|
className: 'dsh-cron-type-tag',
|
|
3254
2871
|
style: task.type === 'script'
|
|
3255
2872
|
? { background: 'var(--dsh-cron-info-bg)', color: 'var(--dsh-cron-info)' }
|
|
3256
2873
|
: { background: 'var(--dsh-cron-success-bg)', color: 'var(--dsh-cron-success)' }
|
|
3257
2874
|
}, task.type === 'script' ? T_KEY(t, 'list.typeShell') : T_KEY(t, 'list.typeLlm')),
|
|
3258
|
-
task.model ?
|
|
3259
|
-
task.oneShot ?
|
|
3260
|
-
isConfigManaged(task) ?
|
|
2875
|
+
task.model ? _h('span', { className: 'dsh-cron-task-model-tag' }, task.model.split('/').pop()) : null,
|
|
2876
|
+
task.oneShot ? _h('span', { className: 'dsh-cron-oneshot-tag' }, T_KEY(t, 'list.oneShot')) : null,
|
|
2877
|
+
isConfigManaged(task) ? _h('span', {
|
|
3261
2878
|
className: 'dsh-cron-config-tag',
|
|
3262
2879
|
title: T_KEY(t, 'list.configManagedHint')
|
|
3263
2880
|
}, T_KEY(t, 'list.configManaged')) : null,
|
|
3264
|
-
task.lastDurationMs > 0 ?
|
|
3265
|
-
task.onSuccess ?
|
|
3266
|
-
task.onFailure ?
|
|
3267
|
-
(task.dependsOn && (Array.isArray(task.dependsOn) ? task.dependsOn.length > 0 : Boolean(task.dependsOn))) ?
|
|
3268
|
-
task.adaptive?.enabled ?
|
|
2881
|
+
task.lastDurationMs > 0 ? _h('span', { className: 'dsh-cron-cost-tag', title: 'Last execution duration' }, task.lastDurationMs + 'ms') : null,
|
|
2882
|
+
task.onSuccess ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-success', title: 'On success: triggers ' + task.onSuccess }, '➜ ' + task.onSuccess) : null,
|
|
2883
|
+
task.onFailure ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-failure', title: 'On failure: triggers ' + task.onFailure }, '↳ ' + task.onFailure) : null,
|
|
2884
|
+
(task.dependsOn && (Array.isArray(task.dependsOn) ? task.dependsOn.length > 0 : Boolean(task.dependsOn))) ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-heartbeat', title: 'Depends on: ' + (Array.isArray(task.dependsOn) ? task.dependsOn.join(', ') : task.dependsOn) }, '⛓️ ' + (Array.isArray(task.dependsOn) ? task.dependsOn.join(', ') : task.dependsOn)) : null,
|
|
2885
|
+
task.adaptive?.enabled ? _h('span', {
|
|
3269
2886
|
className: 'dsh-cron-type-tag' + (task.adaptiveState?.backedOff ? ' dsh-cron-tag-failure' : ' dsh-cron-tag-success'),
|
|
3270
2887
|
title: 'Adaptive: ' + (task.adaptiveState?.effectiveIntervalStr || task.adaptive.minInterval || '5m') + ' (idle: ' + (task.adaptiveState?.idleCount || 0) + ')'
|
|
3271
2888
|
}, (task.adaptiveState?.backedOff ? '⏳ ' : '⚡ ') + (task.adaptiveState?.effectiveIntervalStr || task.adaptive.minInterval || '5m')) : null,
|
|
3272
|
-
task.heartbeatIntervalSeconds > 0 ?
|
|
3273
|
-
task.targetSessionId ?
|
|
3274
|
-
task.preflightType && task.preflightType !== 'none' ?
|
|
3275
|
-
task.totalCostUsd > 0 ?
|
|
3276
|
-
task.totalTokens > 0 ?
|
|
3277
|
-
task.status === 'paused' && task.pausedReason ?
|
|
3278
|
-
),
|
|
3279
|
-
|
|
2889
|
+
task.heartbeatIntervalSeconds > 0 ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-heartbeat', title: 'Heartbeat: every ' + task.heartbeatIntervalSeconds + 's' }, '💓 ' + task.heartbeatIntervalSeconds + 's') : null,
|
|
2890
|
+
task.targetSessionId ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-session', title: 'Target session: ' + task.targetSessionId + (task.targetSessionReset && task.targetSessionReset !== 'never' ? ' (' + task.targetSessionReset + ')' : '') }, '🧵 ' + task.targetSessionId) : null,
|
|
2891
|
+
task.preflightType && task.preflightType !== 'none' ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-preflight', title: 'Preflight: ' + task.preflightType }, '🛡️ ' + task.preflightType) : null,
|
|
2892
|
+
task.totalCostUsd > 0 ? _h('span', { className: 'dsh-cron-cost-tag' }, '$' + task.totalCostUsd.toFixed(4)) : null,
|
|
2893
|
+
task.totalTokens > 0 ? _h('span', { className: 'dsh-cron-tokens-tag' }, (task.totalTokens > 1000 ? Math.round(task.totalTokens / 1000) + 'k' : task.totalTokens) + ' tok') : null,
|
|
2894
|
+
task.status === 'paused' && task.pausedReason ? _h('span', { className: 'dsh-cron-type-tag dsh-cron-tag-failure', title: task.pausedReason }, '🛑 ' + task.pausedReason) : null
|
|
2895
|
+
),
|
|
2896
|
+
_h('div', { className: 'dsh-cron-task-sched' },
|
|
3280
2897
|
task.scheduleText || task.schedule,
|
|
3281
2898
|
task.nextRunAt ? T_KEY(t, 'list.next', { time: new Date(task.nextRunAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) }) : '',
|
|
3282
2899
|
task.running && task.runningSince
|
|
3283
2900
|
? ' · ' + T_KEY(t, 'list.runningNow') + ' ' + Math.max(0, Math.round((Date.now() - task.runningSince) / 1000)) + 's'
|
|
3284
2901
|
: ''
|
|
3285
2902
|
),
|
|
3286
|
-
task.prompt ?
|
|
2903
|
+
task.prompt ? _h('div', {
|
|
3287
2904
|
className: 'dsh-cron-task-prompt-preview',
|
|
3288
2905
|
title: task.prompt
|
|
3289
2906
|
}, task.prompt.slice(0, 140) + (task.prompt.length > 140 ? '…' : '')) : null
|
|
3290
2907
|
),
|
|
3291
|
-
|
|
2908
|
+
_h('div', {
|
|
3292
2909
|
className: 'dsh-cron-task-actions',
|
|
3293
2910
|
onClick: (e) => e.stopPropagation()
|
|
3294
2911
|
},
|
|
3295
|
-
|
|
2912
|
+
_h('button', {
|
|
3296
2913
|
type: 'button',
|
|
3297
2914
|
className: 'dsh-cron-icon-btn',
|
|
3298
2915
|
title: T_KEY(t, 'actions.dryRunTitle'),
|
|
3299
2916
|
onClick: () => handleDryRun(task.id)
|
|
3300
2917
|
}, '🧪'),
|
|
3301
|
-
|
|
2918
|
+
_h('button', {
|
|
3302
2919
|
type: 'button',
|
|
3303
2920
|
className: 'dsh-cron-icon-btn' + (task.running ? ' dsh-cron-pulse' : ''),
|
|
3304
2921
|
title: T_KEY(t, 'liveLog.viewLog'),
|
|
3305
2922
|
onClick: () => handleOpenLiveLogs(task)
|
|
3306
2923
|
}, '📺'),
|
|
3307
|
-
|
|
2924
|
+
_h('button', {
|
|
3308
2925
|
type: 'button',
|
|
3309
2926
|
className: 'dsh-cron-icon-btn',
|
|
3310
2927
|
title: T_KEY(t, 'actions.archiveTitle'),
|
|
3311
2928
|
onClick: () => openArchiveModal(task, 0)
|
|
3312
2929
|
}, '📜'),
|
|
3313
|
-
(task.onSuccess || task.onFailure || (task.dependsOn && (Array.isArray(task.dependsOn) ? task.dependsOn.length > 0 : Boolean(task.dependsOn)))) ?
|
|
2930
|
+
(task.onSuccess || task.onFailure || (task.dependsOn && (Array.isArray(task.dependsOn) ? task.dependsOn.length > 0 : Boolean(task.dependsOn)))) ? _h('button', {
|
|
3314
2931
|
type: 'button',
|
|
3315
2932
|
className: 'dsh-cron-icon-btn',
|
|
3316
2933
|
title: T_KEY(t, 'chainGraph.viewGraph'),
|
|
3317
2934
|
onClick: () => openChainGraphModal(task)
|
|
3318
2935
|
}, '🕸️') : null,
|
|
3319
|
-
|
|
2936
|
+
_h('button', {
|
|
3320
2937
|
type: 'button',
|
|
3321
2938
|
className: 'dsh-cron-icon-btn',
|
|
3322
2939
|
title: T_KEY(t, 'actions.runNow'),
|
|
3323
2940
|
onClick: () => handleRunNow(task.id)
|
|
3324
2941
|
}, T_KEY(t, 'actions.runNowShort')),
|
|
3325
|
-
isConfigManaged(task) ? null :
|
|
2942
|
+
isConfigManaged(task) ? null : _h('button', {
|
|
3326
2943
|
type: 'button',
|
|
3327
2944
|
className: 'dsh-cron-icon-btn',
|
|
3328
2945
|
title: T_KEY(t, 'actions.edit'),
|
|
3329
2946
|
'aria-label': T_KEY(t, 'actions.edit'),
|
|
3330
2947
|
onClick: () => openEditModal(task)
|
|
3331
|
-
},
|
|
3332
|
-
isConfigManaged(task) ? null :
|
|
2948
|
+
}, _h('span', svgProps(ICON_EDIT))),
|
|
2949
|
+
isConfigManaged(task) ? null : _h('button', {
|
|
3333
2950
|
type: 'button',
|
|
3334
2951
|
className: 'dsh-cron-icon-btn',
|
|
3335
2952
|
title: T_KEY(t, 'actions.tuneWithDsh'),
|
|
3336
2953
|
'aria-label': T_KEY(t, 'actions.tuneWithDsh'),
|
|
3337
2954
|
onClick: () => handleTuneWithDsh(task)
|
|
3338
|
-
},
|
|
3339
|
-
isConfigManaged(task) ? null :
|
|
2955
|
+
}, _h('span', svgProps(ICON_TUNE))),
|
|
2956
|
+
isConfigManaged(task) ? null : _h('button', {
|
|
3340
2957
|
type: 'button',
|
|
3341
2958
|
className: 'dsh-cron-icon-btn',
|
|
3342
2959
|
title: T_KEY(t, 'actions.duplicate'),
|
|
3343
2960
|
'aria-label': T_KEY(t, 'actions.duplicate'),
|
|
3344
2961
|
onClick: () => handleDuplicate(task)
|
|
3345
|
-
},
|
|
3346
|
-
isConfigManaged(task) ? null :
|
|
2962
|
+
}, _h('span', svgProps(ICON_COPY))),
|
|
2963
|
+
isConfigManaged(task) ? null : _h('button', {
|
|
3347
2964
|
type: 'button',
|
|
3348
2965
|
className: 'dsh-cron-icon-btn dsh-cron-danger',
|
|
3349
2966
|
title: T_KEY(t, 'actions.delete'),
|
|
3350
2967
|
'aria-label': T_KEY(t, 'actions.delete'),
|
|
3351
2968
|
onClick: () => handleDelete(task.id)
|
|
3352
|
-
},
|
|
2969
|
+
}, _h('span', svgProps(ICON_TRASH)))
|
|
3353
2970
|
)
|
|
3354
2971
|
)
|
|
3355
2972
|
)
|
|
3356
2973
|
),
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
2974
|
+
_h('div', { className: 'dsh-cron-recs-title' }, T_KEY(t, 'recs.title')),
|
|
2975
|
+
_h('div', { className: 'dsh-cron-hint', style: { marginBottom: '8px' } }, T_KEY(t, 'recs.hint')),
|
|
2976
|
+
_h('div', { className: 'dsh-cron-recs-list' },
|
|
3360
2977
|
recs.map((rec) =>
|
|
3361
|
-
|
|
2978
|
+
_h('div', {
|
|
3362
2979
|
key: rec.id,
|
|
3363
2980
|
className: 'dsh-cron-rec-card',
|
|
3364
2981
|
role: 'button',
|
|
@@ -3371,36 +2988,36 @@ openManualModal(rec);
|
|
|
3371
2988
|
}
|
|
3372
2989
|
}
|
|
3373
2990
|
},
|
|
3374
|
-
|
|
3375
|
-
|
|
2991
|
+
_h('div', { className: 'dsh-cron-rec-icon' },
|
|
2992
|
+
_h('span', iconHtml(rec.icon === 'bell' ? ICON_BELL : rec.icon === 'clipboard' ? ICON_CLIPBOARD : ICON_ACTIVITY))
|
|
3376
2993
|
),
|
|
3377
|
-
|
|
3378
|
-
|
|
2994
|
+
_h('div', { className: 'dsh-cron-rec-content' },
|
|
2995
|
+
_h('div', { className: 'dsh-cron-rec-title' },
|
|
3379
2996
|
rec.title,
|
|
3380
|
-
|
|
2997
|
+
_h('span', { className: 'dsh-cron-rec-time' }, rec.scheduleText)
|
|
3381
2998
|
),
|
|
3382
|
-
|
|
2999
|
+
_h('div', { className: 'dsh-cron-rec-desc' }, rec.description)
|
|
3383
3000
|
)
|
|
3384
3001
|
)
|
|
3385
3002
|
)
|
|
3386
3003
|
)
|
|
3387
3004
|
),
|
|
3388
|
-
manualModalOpen &&
|
|
3005
|
+
manualModalOpen && _h('div', {
|
|
3389
3006
|
className: 'dsh-cron-modal-overlay',
|
|
3390
3007
|
onClick: (e) => {
|
|
3391
3008
|
if (e.target === e.currentTarget) closeManualModalWithConfirm();
|
|
3392
3009
|
}
|
|
3393
3010
|
},
|
|
3394
|
-
|
|
3011
|
+
_h('div', {
|
|
3395
3012
|
className: 'dsh-cron-modal dsh-cron-modal-scroll',
|
|
3396
3013
|
style: { maxWidth: '640px' },
|
|
3397
3014
|
role: 'dialog',
|
|
3398
3015
|
'aria-modal': 'true',
|
|
3399
3016
|
onClick: (e) => e.stopPropagation()
|
|
3400
3017
|
},
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
selectedTaskMeta &&
|
|
3018
|
+
_h('div', { className: 'dsh-cron-modal-head', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: formId ? '12px' : '18px' } },
|
|
3019
|
+
_h('div', { className: 'dsh-cron-modal-title', style: { margin: 0 } }, formId ? T_KEY(t, 'modal.editTitle') : T_KEY(t, 'modal.newTitle')),
|
|
3020
|
+
selectedTaskMeta && _h('span', {
|
|
3404
3021
|
style: {
|
|
3405
3022
|
fontSize: '12px',
|
|
3406
3023
|
padding: '3px 8px',
|
|
@@ -3410,65 +3027,65 @@ color: selectedTaskMeta.status === 'active' ? 'var(--dsh-cron-success)' : 'var(-
|
|
|
3410
3027
|
}
|
|
3411
3028
|
}, selectedTaskMeta.status === 'active' ? T_KEY(t, 'modal.statusActive') : T_KEY(t, 'modal.statusPaused'))
|
|
3412
3029
|
),
|
|
3413
|
-
formId &&
|
|
3414
|
-
|
|
3030
|
+
formId && _h('div', { className: 'dsh-cron-modal-nav' },
|
|
3031
|
+
_h('button', {
|
|
3415
3032
|
type: 'button',
|
|
3416
3033
|
className: 'dsh-cron-modal-tab',
|
|
3417
3034
|
'data-active': modalTab === 'params' ? 'true' : undefined,
|
|
3418
3035
|
onClick: () => setModalTab('params')
|
|
3419
3036
|
}, T_KEY(t, 'modal.params')),
|
|
3420
|
-
|
|
3037
|
+
_h('button', {
|
|
3421
3038
|
type: 'button',
|
|
3422
3039
|
className: 'dsh-cron-modal-tab',
|
|
3423
3040
|
'data-active': modalTab === 'history' ? 'true' : undefined,
|
|
3424
3041
|
onClick: () => { setModalTab('history'); if (formId) loadTaskHistory(formId); }
|
|
3425
3042
|
}, T_KEY(t, 'modal.history', { count: taskHistory.length || 0 }))
|
|
3426
3043
|
),
|
|
3427
|
-
modalTab === 'history' && formId ?
|
|
3428
|
-
historyLoading ?
|
|
3429
|
-
taskHistory.length === 0 ?
|
|
3430
|
-
|
|
3431
|
-
taskHistory.map((run) =>
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3044
|
+
modalTab === 'history' && formId ? _h('div', null,
|
|
3045
|
+
historyLoading ? _h('div', { className: 'dsh-cron-history-empty' }, T_KEY(t, 'history.loading')) :
|
|
3046
|
+
taskHistory.length === 0 ? _h('div', { className: 'dsh-cron-history-empty' }, T_KEY(t, 'history.empty')) :
|
|
3047
|
+
_h('div', { className: 'dsh-cron-history-list' },
|
|
3048
|
+
taskHistory.map((run) => _h('div', { key: run.id, className: 'dsh-cron-history-item' },
|
|
3049
|
+
_h('div', { className: 'dsh-cron-history-head' },
|
|
3050
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
3051
|
+
_h('span', {
|
|
3435
3052
|
className: 'dsh-cron-history-status',
|
|
3436
3053
|
'data-status': run.status
|
|
3437
3054
|
}, statusLabel(t, run.status)),
|
|
3438
|
-
|
|
3055
|
+
_h('span', { className: 'dsh-cron-history-time' }, run.at ? new Date(run.at).toLocaleString() : '')
|
|
3439
3056
|
),
|
|
3440
|
-
|
|
3441
|
-
run.costUsd > 0 &&
|
|
3442
|
-
run.usage && (run.usage.inputTokens > 0 || run.usage.outputTokens > 0) &&
|
|
3443
|
-
|
|
3057
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
3058
|
+
run.costUsd > 0 && _h('span', { className: 'dsh-cron-cost-tag' }, '$' + run.costUsd.toFixed(5)),
|
|
3059
|
+
run.usage && (run.usage.inputTokens > 0 || run.usage.outputTokens > 0) && _h('span', { className: 'dsh-cron-tokens-tag' }, (run.usage.inputTokens + run.usage.outputTokens) + ' tok'),
|
|
3060
|
+
_h('span', { style: { color: 'var(--dsw-alias-label-tertiary, #888)', fontSize: '11.5px' } }, (run.durationMs || 0) + ' ms')
|
|
3444
3061
|
)
|
|
3445
3062
|
),
|
|
3446
|
-
run.stoppedReason &&
|
|
3063
|
+
run.stoppedReason && _h('div', {
|
|
3447
3064
|
className: 'dsh-cron-hint',
|
|
3448
3065
|
style: { display: 'flex', gap: '6px', alignItems: 'center', marginTop: '6px' }
|
|
3449
3066
|
},
|
|
3450
|
-
|
|
3451
|
-
|
|
3067
|
+
_h('span', { className: 'dsh-cron-badge-ref' }, T_KEY(t, 'history.stoppedReasonTitle')),
|
|
3068
|
+
_h('span', null, run.stoppedReason)
|
|
3452
3069
|
),
|
|
3453
|
-
Array.isArray(run.stages) && run.stages.length > 0 &&
|
|
3070
|
+
Array.isArray(run.stages) && run.stages.length > 0 && _h('div', {
|
|
3454
3071
|
className: 'dsh-cron-stages-flow',
|
|
3455
3072
|
style: { display: 'flex', gap: '6px', flexWrap: 'wrap', marginTop: '6px' }
|
|
3456
3073
|
},
|
|
3457
|
-
run.stages.map((st) =>
|
|
3074
|
+
run.stages.map((st) => _h('span', {
|
|
3458
3075
|
key: st.name,
|
|
3459
3076
|
className: 'dsh-cron-stage-pill',
|
|
3460
3077
|
'data-status': st.status || 'unknown',
|
|
3461
3078
|
title: st.error ? (st.name + ': ' + st.error) : (st.name + (st.durationMs !== undefined ? ' (' + st.durationMs + 'ms)' : ''))
|
|
3462
3079
|
}, (T_KEY(t, 'history.stage_' + st.name) || st.name) + (st.durationMs !== undefined ? ' ' + st.durationMs + 'ms' : '')))
|
|
3463
3080
|
),
|
|
3464
|
-
run.delivery &&
|
|
3081
|
+
run.delivery && _h('div', {
|
|
3465
3082
|
style: { display: 'flex', alignItems: 'center', gap: '8px', marginTop: '6px' }
|
|
3466
3083
|
},
|
|
3467
|
-
|
|
3084
|
+
_h('span', {
|
|
3468
3085
|
className: 'dsh-cron-badge-ref',
|
|
3469
3086
|
'data-status': run.delivery.status
|
|
3470
3087
|
}, 'Delivery: ' + run.delivery.status),
|
|
3471
|
-
(run.delivery.status === 'failed' || run.delivery.status === 'partial') &&
|
|
3088
|
+
(run.delivery.status === 'failed' || run.delivery.status === 'partial') && _h('button', {
|
|
3472
3089
|
type: 'button',
|
|
3473
3090
|
className: 'dsh-cron-btn-secondary',
|
|
3474
3091
|
style: { padding: '2px 8px', fontSize: '11px' },
|
|
@@ -3476,11 +3093,11 @@ disabled: retryingDeliveryId === run.id,
|
|
|
3476
3093
|
onClick: () => handleRetryDelivery(formId, run.id)
|
|
3477
3094
|
}, retryingDeliveryId === run.id ? T_KEY(t, 'history.retryingDelivery') : T_KEY(t, 'history.retryDelivery'))
|
|
3478
3095
|
),
|
|
3479
|
-
run.artifacts && run.artifacts.length > 0 &&
|
|
3096
|
+
run.artifacts && run.artifacts.length > 0 && _h('div', {
|
|
3480
3097
|
style: { display: 'flex', flexWrap: 'wrap', gap: '6px', marginTop: '6px', alignItems: 'center' }
|
|
3481
3098
|
},
|
|
3482
|
-
|
|
3483
|
-
run.artifacts.map((art) =>
|
|
3099
|
+
_h('span', { className: 'dsh-cron-hint', style: { fontSize: '11px' } }, '📦 ' + T_KEY(t, 'history.artifacts') + ':'),
|
|
3100
|
+
run.artifacts.map((art) => _h('a', {
|
|
3484
3101
|
key: art.name || art.id,
|
|
3485
3102
|
href: '/dsh-cron/runs/' + encodeURIComponent(run.id) + '/artifacts/' + encodeURIComponent(art.name) + '/preview',
|
|
3486
3103
|
target: '_blank',
|
|
@@ -3490,20 +3107,20 @@ style: { padding: '2px 8px', fontSize: '11px', textDecoration: 'none' },
|
|
|
3490
3107
|
title: art.name + ' (' + Math.round((art.size || 0) / 1024 * 10) / 10 + ' KB)'
|
|
3491
3108
|
}, art.name))
|
|
3492
3109
|
),
|
|
3493
|
-
run.status === 'uncertain' &&
|
|
3110
|
+
run.status === 'uncertain' && _h('div', {
|
|
3494
3111
|
className: 'dsh-cron-status-banner',
|
|
3495
3112
|
'data-type': 'warning',
|
|
3496
3113
|
style: { marginTop: '8px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '8px' }
|
|
3497
3114
|
},
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3115
|
+
_h('span', null, '⚠️ ' + T_KEY(t, 'history.statusUncertainHint')),
|
|
3116
|
+
_h('div', { style: { display: 'flex', gap: '6px' } },
|
|
3117
|
+
_h('button', {
|
|
3501
3118
|
type: 'button',
|
|
3502
3119
|
className: 'dsh-cron-btn-secondary',
|
|
3503
3120
|
style: { padding: '2px 8px', fontSize: '11px' },
|
|
3504
3121
|
onClick: () => handleResolveUncertain(formId, run.id, 'completed')
|
|
3505
3122
|
}, '✓ ' + T_KEY(t, 'history.resolveCompleted')),
|
|
3506
|
-
|
|
3123
|
+
_h('button', {
|
|
3507
3124
|
type: 'button',
|
|
3508
3125
|
className: 'dsh-cron-btn-secondary',
|
|
3509
3126
|
style: { padding: '2px 8px', fontSize: '11px' },
|
|
@@ -3511,25 +3128,25 @@ onClick: () => handleResolveUncertain(formId, run.id, 'failed')
|
|
|
3511
3128
|
}, '✕ ' + T_KEY(t, 'history.resolveFailed'))
|
|
3512
3129
|
)
|
|
3513
3130
|
),
|
|
3514
|
-
(run.diagnosis || run.doctorReport) &&
|
|
3131
|
+
(run.diagnosis || run.doctorReport) && _h('div', {
|
|
3515
3132
|
className: 'dsh-cron-status-banner',
|
|
3516
3133
|
'data-type': 'info',
|
|
3517
3134
|
style: { marginTop: '8px', display: 'flex', flexDirection: 'column', gap: '6px' }
|
|
3518
3135
|
},
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
(run.autoHealed || run.doctorReport?.autoHealed) &&
|
|
3136
|
+
_h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
3137
|
+
_h('strong', null, '🩺 ' + T_KEY(t, run.doctorReport ? 'history.doctorDiagnosis' : 'history.diagnosis')),
|
|
3138
|
+
_h('div', { style: { display: 'flex', gap: '6px', alignItems: 'center' } },
|
|
3139
|
+
(run.autoHealed || run.doctorReport?.autoHealed) && _h('span', {
|
|
3523
3140
|
style: { fontSize: '10px', background: 'var(--dsh-cron-success-bg)', color: 'var(--dsh-cron-success)', padding: '1px 6px', borderRadius: '8px', fontWeight: '600' }
|
|
3524
3141
|
}, '✨ ' + T_KEY(t, 'history.autoHealed')),
|
|
3525
|
-
(run.doctorReport?.category || run.category) &&
|
|
3142
|
+
(run.doctorReport?.category || run.category) && _h('span', {
|
|
3526
3143
|
style: { fontSize: '10px', background: 'var(--dsw-alias-bg-layer-3)', padding: '1px 6px', borderRadius: '4px' }
|
|
3527
3144
|
}, run.doctorReport?.category || run.category),
|
|
3528
|
-
run.confidence ?
|
|
3145
|
+
run.confidence ? _h('span', { style: { fontSize: '10px', color: 'var(--dsw-alias-label-secondary)' } }, '(' + run.confidence + ')') : null
|
|
3529
3146
|
)
|
|
3530
3147
|
),
|
|
3531
|
-
|
|
3532
|
-
run.doctorReport?.diff &&
|
|
3148
|
+
_h('div', null, run.doctorReport?.cause || run.diagnosis),
|
|
3149
|
+
run.doctorReport?.diff && _h('div', {
|
|
3533
3150
|
style: {
|
|
3534
3151
|
background: 'var(--dsw-alias-bg-layer-2)',
|
|
3535
3152
|
border: '1px solid var(--dsw-alias-border-l2)',
|
|
@@ -3542,14 +3159,14 @@ overflowY: 'auto',
|
|
|
3542
3159
|
whiteSpace: 'pre'
|
|
3543
3160
|
}
|
|
3544
3161
|
}, run.doctorReport.diff),
|
|
3545
|
-
(run.doctorReport?.suggestedFix || run.suggestion) &&
|
|
3546
|
-
typeof handleApplyDoctorFix === 'function' &&
|
|
3162
|
+
(run.doctorReport?.suggestedFix || run.suggestion) && _h('div', { style: { display: 'flex', gap: '8px', marginTop: '4px' } },
|
|
3163
|
+
typeof handleApplyDoctorFix === 'function' && _h('button', {
|
|
3547
3164
|
type: 'button',
|
|
3548
3165
|
className: 'dsh-cron-btn-primary',
|
|
3549
3166
|
style: { padding: '3px 10px', fontSize: '12px' },
|
|
3550
3167
|
onClick: () => handleApplyDoctorFix(formId, run.doctorReport || { suggestedFix: run.suggestion })
|
|
3551
3168
|
}, '⚡ ' + T_KEY(t, 'history.doctorApply')),
|
|
3552
|
-
|
|
3169
|
+
_h('button', {
|
|
3553
3170
|
type: 'button',
|
|
3554
3171
|
className: 'dsh-cron-btn-secondary',
|
|
3555
3172
|
style: { padding: '3px 10px', fontSize: '12px' },
|
|
@@ -3557,29 +3174,29 @@ onClick: () => openEditModal(selectedTaskMeta, { prompt: run.suggestion })
|
|
|
3557
3174
|
}, T_KEY(t, 'history.applySuggestion'))
|
|
3558
3175
|
)
|
|
3559
3176
|
),
|
|
3560
|
-
run.subtaskRuns && Array.isArray(run.subtaskRuns) && run.subtaskRuns.length > 0 &&
|
|
3177
|
+
run.subtaskRuns && Array.isArray(run.subtaskRuns) && run.subtaskRuns.length > 0 && _h('div', {
|
|
3561
3178
|
style: { marginTop: '8px', padding: '8px', background: 'var(--dsw-alias-bg-layer-2)', borderRadius: '6px', fontSize: '12px' }
|
|
3562
3179
|
},
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
run.subtaskRuns.map((st, sidx) =>
|
|
3180
|
+
_h('div', { style: { fontWeight: '600', marginBottom: '4px' } }, '🐝 ' + T_KEY(t, 'history.swarmBadge') + ' (' + run.subtaskRuns.filter(r => r.status === 'success').length + '/' + run.subtaskRuns.length + ')'),
|
|
3181
|
+
_h('div', { style: { display: 'flex', flexDirection: 'column', gap: '4px' } },
|
|
3182
|
+
run.subtaskRuns.map((st, sidx) => _h('div', {
|
|
3566
3183
|
key: sidx,
|
|
3567
3184
|
style: { display: 'flex', justifyContent: 'space-between', padding: '2px 6px', background: 'var(--dsw-alias-bg-layer-3)', borderRadius: '4px' }
|
|
3568
3185
|
},
|
|
3569
|
-
|
|
3570
|
-
|
|
3186
|
+
_h('span', null, (st.status === 'success' ? '✅ ' : '❌ ') + st.title),
|
|
3187
|
+
_h('span', { style: { color: 'var(--dsw-alias-label-tertiary)', fontSize: '11px' } }, (st.durationMs || 0) + 'ms')
|
|
3571
3188
|
))
|
|
3572
3189
|
)
|
|
3573
3190
|
),
|
|
3574
|
-
run.gitDiff && run.gitDiff.hasChanges &&
|
|
3191
|
+
run.gitDiff && run.gitDiff.hasChanges && _h('div', {
|
|
3575
3192
|
className: 'dsh-cron-status-banner',
|
|
3576
3193
|
style: { marginTop: '8px', display: 'flex', flexDirection: 'column', gap: '6px' }
|
|
3577
3194
|
},
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3195
|
+
_h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
3196
|
+
_h('strong', null, '📝 ' + T_KEY(t, 'history.gitDiff')),
|
|
3197
|
+
_h('span', { style: { fontSize: '11px', color: 'var(--dsw-alias-label-secondary)' } }, run.gitDiff.stat || '')
|
|
3581
3198
|
),
|
|
3582
|
-
run.gitDiff.diff &&
|
|
3199
|
+
run.gitDiff.diff && _h('div', {
|
|
3583
3200
|
style: {
|
|
3584
3201
|
background: 'var(--dsw-alias-bg-layer-2)',
|
|
3585
3202
|
border: '1px solid var(--dsw-alias-border-l2)',
|
|
@@ -3592,8 +3209,8 @@ overflowY: 'auto',
|
|
|
3592
3209
|
whiteSpace: 'pre'
|
|
3593
3210
|
}
|
|
3594
3211
|
}, run.gitDiff.diff),
|
|
3595
|
-
|
|
3596
|
-
|
|
3212
|
+
_h('div', { style: { display: 'flex', gap: '8px', marginTop: '4px' } },
|
|
3213
|
+
_h('button', {
|
|
3597
3214
|
type: 'button',
|
|
3598
3215
|
className: 'dsh-cron-btn-secondary',
|
|
3599
3216
|
style: { padding: '2px 8px', fontSize: '12px' },
|
|
@@ -3613,7 +3230,7 @@ else alert(d.error || 'Failed to discard changes');
|
|
|
3613
3230
|
finally { if (tId) clearTimeout(tId); }
|
|
3614
3231
|
}
|
|
3615
3232
|
}, '🗑️ ' + T_KEY(t, 'history.discardDiff')),
|
|
3616
|
-
|
|
3233
|
+
_h('button', {
|
|
3617
3234
|
type: 'button',
|
|
3618
3235
|
className: 'dsh-cron-btn-primary',
|
|
3619
3236
|
style: { padding: '2px 8px', fontSize: '12px' },
|
|
@@ -3636,16 +3253,16 @@ finally { if (tId) clearTimeout(tId); }
|
|
|
3636
3253
|
}, '✅ ' + T_KEY(t, 'history.applyDiff'))
|
|
3637
3254
|
)
|
|
3638
3255
|
),
|
|
3639
|
-
run.silentSkip &&
|
|
3256
|
+
run.silentSkip && _h('div', {
|
|
3640
3257
|
className: 'dsh-cron-hint',
|
|
3641
3258
|
style: { display: 'flex', gap: '6px', alignItems: 'center' }
|
|
3642
3259
|
},
|
|
3643
|
-
|
|
3644
|
-
|
|
3260
|
+
_h('span', { className: 'dsh-cron-badge-ref' }, T_KEY(t, 'history.silentSkip')),
|
|
3261
|
+
_h('span', null, run.silentReason || '')
|
|
3645
3262
|
),
|
|
3646
|
-
run.output &&
|
|
3647
|
-
run.error &&
|
|
3648
|
-
run.sessionId &&
|
|
3263
|
+
run.output && _h('div', { className: 'dsh-cron-history-output' }, run.output),
|
|
3264
|
+
run.error && _h('div', { className: 'dsh-cron-history-output', style: { color: 'var(--dsh-cron-danger)', borderColor: 'var(--dsh-cron-danger-bg)' } }, run.error),
|
|
3265
|
+
run.sessionId && _h('button', {
|
|
3649
3266
|
type: 'button',
|
|
3650
3267
|
className: 'dsh-cron-btn-secondary',
|
|
3651
3268
|
style: { marginTop: '8px', fontSize: '12px', padding: '4px 10px' },
|
|
@@ -3653,23 +3270,23 @@ onClick: () => openSession(ctx, run.sessionId)
|
|
|
3653
3270
|
}, T_KEY(t, 'history.openSession'))
|
|
3654
3271
|
))
|
|
3655
3272
|
),
|
|
3656
|
-
|
|
3657
|
-
|
|
3273
|
+
_h('div', { className: 'dsh-cron-modal-foot', style: { marginTop: '18px' } },
|
|
3274
|
+
_h('button', {
|
|
3658
3275
|
type: 'button',
|
|
3659
3276
|
className: 'dsh-cron-btn-secondary',
|
|
3660
3277
|
onClick: () => { if (formId) loadTaskHistory(formId); }
|
|
3661
3278
|
}, T_KEY(t, 'history.refresh')),
|
|
3662
|
-
|
|
3279
|
+
_h('button', {
|
|
3663
3280
|
type: 'button',
|
|
3664
3281
|
className: 'dsh-cron-btn-primary',
|
|
3665
3282
|
onClick: closeManualModalWithConfirm
|
|
3666
3283
|
}, T_KEY(t, 'modal.close'))
|
|
3667
3284
|
)
|
|
3668
3285
|
) :
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3286
|
+
_h('form', { onSubmit: handleSaveManual },
|
|
3287
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3288
|
+
_h('label', null, T_KEY(t, 'form.nameLabel')),
|
|
3289
|
+
_h('input', {
|
|
3673
3290
|
required: true,
|
|
3674
3291
|
autoFocus: true,
|
|
3675
3292
|
value: formTitle,
|
|
@@ -3677,40 +3294,40 @@ placeholder: T_KEY(t, 'form.namePlaceholder'),
|
|
|
3677
3294
|
onChange: (e) => setFormTitle(e.target.value)
|
|
3678
3295
|
})
|
|
3679
3296
|
),
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3297
|
+
_h('div', { className: 'dsh-cron-form-row' },
|
|
3298
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3299
|
+
_h('label', null, T_KEY(t, 'form.typeLabel')),
|
|
3300
|
+
_h('select', {
|
|
3684
3301
|
value: formType,
|
|
3685
3302
|
onChange: (e) => setFormType(e.target.value)
|
|
3686
3303
|
},
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3304
|
+
_h('option', { value: 'llm' }, T_KEY(t, 'form.typeLlm')),
|
|
3305
|
+
_h('option', { value: 'script' }, T_KEY(t, 'form.typeScript')),
|
|
3306
|
+
_h('option', { value: 'node' }, T_KEY(t, 'form.typeNode')),
|
|
3307
|
+
_h('option', { value: 'python' }, T_KEY(t, 'form.typePython')),
|
|
3308
|
+
_h('option', { value: 'http' }, T_KEY(t, 'form.typeHttp')),
|
|
3309
|
+
_h('option', { value: 'ssh' }, T_KEY(t, 'form.typeSsh')),
|
|
3310
|
+
_h('option', { value: 'docker' }, T_KEY(t, 'form.typeDocker')),
|
|
3311
|
+
_h('option', { value: 'skill' }, T_KEY(t, 'form.typeSkill')),
|
|
3312
|
+
_h('option', { value: 'workflow' }, T_KEY(t, 'form.typeWorkflow'))
|
|
3696
3313
|
)
|
|
3697
3314
|
),
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3315
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3316
|
+
_h('label', null, T_KEY(t, 'form.scheduleLabel')),
|
|
3317
|
+
_h('input', {
|
|
3701
3318
|
required: true,
|
|
3702
3319
|
value: formSchedule,
|
|
3703
3320
|
placeholder: T_KEY(t, 'form.schedulePlaceholder'),
|
|
3704
3321
|
onChange: (e) => setFormSchedule(e.target.value)
|
|
3705
3322
|
}),
|
|
3706
|
-
|
|
3323
|
+
_h('div', { style: { display: 'flex', gap: '5px', flexWrap: 'wrap', marginTop: '5px' } },
|
|
3707
3324
|
[
|
|
3708
3325
|
{ label: '15m', expr: '*/15 * * * *' },
|
|
3709
3326
|
{ label: '1h', expr: '0 * * * *' },
|
|
3710
3327
|
{ label: 'Daily 09:00', expr: '0 9 * * *' },
|
|
3711
3328
|
{ label: 'Weekdays', expr: '0 9 * * 1-5' },
|
|
3712
3329
|
{ label: 'Weekly Mon', expr: '0 9 * * 1' },
|
|
3713
|
-
].map((p) =>
|
|
3330
|
+
].map((p) => _h('button', {
|
|
3714
3331
|
key: p.label,
|
|
3715
3332
|
type: 'button',
|
|
3716
3333
|
className: 'dsh-cron-btn-secondary',
|
|
@@ -3718,23 +3335,23 @@ style: { padding: '2px 7px', fontSize: '11px', borderRadius: '4px' },
|
|
|
3718
3335
|
onClick: () => { setFormSchedule(p.expr); handlePreviewSchedule(p.expr); }
|
|
3719
3336
|
}, p.label))
|
|
3720
3337
|
),
|
|
3721
|
-
|
|
3722
|
-
|
|
3338
|
+
_h('div', { style: { display: 'flex', gap: '8px', alignItems: 'center', marginTop: '6px' } },
|
|
3339
|
+
_h('button', {
|
|
3723
3340
|
type: 'button',
|
|
3724
3341
|
className: 'dsh-cron-btn-secondary',
|
|
3725
3342
|
style: { padding: '3px 8px', fontSize: '11.5px' },
|
|
3726
3343
|
onClick: () => handlePreviewSchedule(formSchedule)
|
|
3727
3344
|
}, T_KEY(t, 'form.previewSchedule')),
|
|
3728
|
-
schedulePreviewRuns && schedulePreviewRuns.length > 0 &&
|
|
3345
|
+
schedulePreviewRuns && schedulePreviewRuns.length > 0 && _h('div', { style: { fontSize: '11px', color: 'var(--dsw-alias-label-secondary, #999)' } },
|
|
3729
3346
|
T_KEY(t, 'form.previewScheduleTitle') + ' ' + schedulePreviewRuns.slice(0, 3).map(r => new Date(r).toLocaleTimeString()).join(', ')
|
|
3730
3347
|
)
|
|
3731
3348
|
)
|
|
3732
3349
|
)
|
|
3733
3350
|
),
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3351
|
+
_h('div', { className: 'dsh-cron-form-row' },
|
|
3352
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3353
|
+
_h('label', null, T_KEY(t, 'form.timeoutLabel')),
|
|
3354
|
+
_h('input', {
|
|
3738
3355
|
type: 'number',
|
|
3739
3356
|
min: 1,
|
|
3740
3357
|
value: formTimeoutSeconds,
|
|
@@ -3742,44 +3359,44 @@ placeholder: '1800',
|
|
|
3742
3359
|
onChange: (e) => setFormTimeoutSeconds(e.target.value)
|
|
3743
3360
|
})
|
|
3744
3361
|
),
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3362
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3363
|
+
_h('label', null, T_KEY(t, 'form.overlapLabel')),
|
|
3364
|
+
_h('select', {
|
|
3748
3365
|
value: formOverlapPolicy,
|
|
3749
3366
|
onChange: (e) => setFormOverlapPolicy(e.target.value)
|
|
3750
3367
|
},
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3368
|
+
_h('option', { value: 'skip' }, T_KEY(t, 'form.overlapSkip')),
|
|
3369
|
+
_h('option', { value: 'queue' }, T_KEY(t, 'form.overlapQueue')),
|
|
3370
|
+
_h('option', { value: 'replace' }, T_KEY(t, 'form.overlapReplace'))
|
|
3754
3371
|
)
|
|
3755
3372
|
)
|
|
3756
3373
|
),
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3374
|
+
_h('div', { className: 'dsh-cron-form-row' },
|
|
3375
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3376
|
+
_h('label', null, T_KEY(t, 'form.timezoneLabel')),
|
|
3377
|
+
_h('input', {
|
|
3761
3378
|
value: formTimezone,
|
|
3762
3379
|
placeholder: T_KEY(t, 'form.timezonePlaceholder'),
|
|
3763
3380
|
onChange: (e) => setFormTimezone(e.target.value)
|
|
3764
3381
|
})
|
|
3765
3382
|
),
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3383
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3384
|
+
_h('label', null, T_KEY(t, 'form.misfireLabel')),
|
|
3385
|
+
_h('select', {
|
|
3769
3386
|
value: formMisfirePolicy,
|
|
3770
3387
|
onChange: (e) => setFormMisfirePolicy(e.target.value)
|
|
3771
3388
|
},
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3389
|
+
_h('option', { value: 'skip' }, T_KEY(t, 'form.misfireSkip')),
|
|
3390
|
+
_h('option', { value: 'runOnce' }, T_KEY(t, 'form.misfireRunOnce')),
|
|
3391
|
+
_h('option', { value: 'catchUpAll' }, T_KEY(t, 'form.misfireCatchUp'))
|
|
3775
3392
|
)
|
|
3776
3393
|
)
|
|
3777
3394
|
),
|
|
3778
3395
|
AGENT_FORM_TYPES.includes(formType) ? (
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3396
|
+
_h('div', { className: 'dsh-cron-form-row' },
|
|
3397
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3398
|
+
_h('label', null, T_KEY(t, 'form.retriesLabel')),
|
|
3399
|
+
_h('input', {
|
|
3783
3400
|
type: 'number',
|
|
3784
3401
|
min: 0,
|
|
3785
3402
|
value: formMaxRetries,
|
|
@@ -3787,23 +3404,23 @@ placeholder: '0',
|
|
|
3787
3404
|
onChange: (e) => setFormMaxRetries(e.target.value)
|
|
3788
3405
|
})
|
|
3789
3406
|
),
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3407
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3408
|
+
_h('label', null, T_KEY(t, 'form.permissionLabel')),
|
|
3409
|
+
_h('select', {
|
|
3793
3410
|
value: formPermissionPreset,
|
|
3794
3411
|
onChange: (e) => setFormPermissionPreset(e.target.value)
|
|
3795
3412
|
},
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3413
|
+
_h('option', { value: 'default' }, T_KEY(t, 'form.permissionDefault')),
|
|
3414
|
+
_h('option', { value: 'read-only' }, T_KEY(t, 'form.permissionReadonly')),
|
|
3415
|
+
_h('option', { value: 'workspace-write' }, T_KEY(t, 'form.permissionWrite')),
|
|
3416
|
+
_h('option', { value: 'full' }, T_KEY(t, 'form.permissionFull'))
|
|
3800
3417
|
)
|
|
3801
3418
|
)
|
|
3802
3419
|
)
|
|
3803
3420
|
) : (
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3421
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3422
|
+
_h('label', null, T_KEY(t, 'form.retriesLabel')),
|
|
3423
|
+
_h('input', {
|
|
3807
3424
|
type: 'number',
|
|
3808
3425
|
min: 0,
|
|
3809
3426
|
value: formMaxRetries,
|
|
@@ -3812,114 +3429,124 @@ onChange: (e) => setFormMaxRetries(e.target.value)
|
|
|
3812
3429
|
})
|
|
3813
3430
|
)
|
|
3814
3431
|
),
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3432
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3433
|
+
_h('label', null, T_KEY(t, 'form.kanbanLabel')),
|
|
3434
|
+
_h('select', {
|
|
3818
3435
|
value: formKanbanMode,
|
|
3819
3436
|
onChange: (e) => setFormKanbanMode(e.target.value)
|
|
3820
3437
|
},
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3438
|
+
_h('option', { value: 'none' }, T_KEY(t, 'form.kanbanNone')),
|
|
3439
|
+
_h('option', { value: 'on_failure' }, T_KEY(t, 'form.kanbanOnFailure')),
|
|
3440
|
+
_h('option', { value: 'always' }, T_KEY(t, 'form.kanbanAlways'))
|
|
3824
3441
|
)
|
|
3825
3442
|
),
|
|
3826
|
-
AGENT_FORM_TYPES.includes(formType) &&
|
|
3827
|
-
|
|
3828
|
-
|
|
3443
|
+
AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-group' },
|
|
3444
|
+
_h('label', null, T_KEY(t, 'form.agentPresetLabel')),
|
|
3445
|
+
_h('input', {
|
|
3829
3446
|
type: 'text',
|
|
3830
3447
|
value: formAgentPreset,
|
|
3831
3448
|
placeholder: T_KEY(t, 'form.agentPresetPlaceholder'),
|
|
3832
3449
|
onChange: (e) => setFormAgentPreset(e.target.value)
|
|
3833
3450
|
}),
|
|
3834
|
-
|
|
3451
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.agentPresetHint'))
|
|
3452
|
+
),
|
|
3453
|
+
AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-group' },
|
|
3454
|
+
_h('label', null, T_KEY(t, 'form.sessionTitleLabel')),
|
|
3455
|
+
_h('input', {
|
|
3456
|
+
type: 'text',
|
|
3457
|
+
value: formSessionTitle,
|
|
3458
|
+
placeholder: T_KEY(t, 'form.sessionTitlePlaceholder'),
|
|
3459
|
+
onChange: (e) => setFormSessionTitle(e.target.value)
|
|
3460
|
+
}),
|
|
3461
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.sessionTitleHint'))
|
|
3835
3462
|
),
|
|
3836
|
-
AGENT_FORM_TYPES.includes(formType) &&
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3463
|
+
AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-row' },
|
|
3464
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3465
|
+
_h('label', null, T_KEY(t, 'form.targetSessionIdLabel')),
|
|
3466
|
+
_h('input', {
|
|
3840
3467
|
type: 'text',
|
|
3841
3468
|
value: formTargetSessionId,
|
|
3842
3469
|
placeholder: T_KEY(t, 'form.targetSessionIdPlaceholder'),
|
|
3843
3470
|
onChange: (e) => setFormTargetSessionId(e.target.value)
|
|
3844
3471
|
}),
|
|
3845
|
-
|
|
3472
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.targetSessionIdHint'))
|
|
3846
3473
|
),
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3474
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3475
|
+
_h('label', null, T_KEY(t, 'form.targetSessionResetLabel')),
|
|
3476
|
+
_h('select', {
|
|
3850
3477
|
value: formTargetSessionReset,
|
|
3851
3478
|
onChange: (e) => setFormTargetSessionReset(e.target.value)
|
|
3852
3479
|
},
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3480
|
+
_h('option', { value: 'never' }, T_KEY(t, 'form.targetSessionResetNever')),
|
|
3481
|
+
_h('option', { value: 'daily' }, T_KEY(t, 'form.targetSessionResetDaily')),
|
|
3482
|
+
_h('option', { value: 'weekly' }, T_KEY(t, 'form.targetSessionResetWeekly'))
|
|
3856
3483
|
),
|
|
3857
|
-
|
|
3484
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.targetSessionResetHint'))
|
|
3858
3485
|
)
|
|
3859
3486
|
),
|
|
3860
|
-
AGENT_FORM_TYPES.includes(formType) &&
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3487
|
+
AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-row' },
|
|
3488
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3489
|
+
_h('label', null, T_KEY(t, 'form.providerLabel')),
|
|
3490
|
+
_h('select', {
|
|
3864
3491
|
value: formProvider,
|
|
3865
3492
|
onChange: handleProviderChange
|
|
3866
3493
|
},
|
|
3867
|
-
|
|
3868
|
-
providers.map((p) =>
|
|
3494
|
+
_h('option', { value: '' }, T_KEY(t, 'form.providerDefault')),
|
|
3495
|
+
providers.map((p) => _h('option', { key: p.id, value: p.id }, p.name || p.id))
|
|
3869
3496
|
)
|
|
3870
3497
|
),
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3498
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3499
|
+
_h('label', null, T_KEY(t, 'form.modelLabel')),
|
|
3500
|
+
_h('select', {
|
|
3874
3501
|
value: formModel,
|
|
3875
3502
|
onChange: (e) => setFormModel(e.target.value)
|
|
3876
3503
|
},
|
|
3877
|
-
|
|
3878
|
-
models.map((m) =>
|
|
3504
|
+
_h('option', { value: '' }, T_KEY(t, 'form.modelDefault')),
|
|
3505
|
+
models.map((m) => _h('option', { key: m.id, value: m.id }, m.name || m.id))
|
|
3879
3506
|
)
|
|
3880
3507
|
),
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3508
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3509
|
+
_h('label', null, T_KEY(t, 'form.fallbackModelLabel')),
|
|
3510
|
+
_h('input', {
|
|
3884
3511
|
type: 'text',
|
|
3885
3512
|
value: formFallbackModel,
|
|
3886
3513
|
placeholder: T_KEY(t, 'form.fallbackModelPlaceholder'),
|
|
3887
3514
|
onChange: (e) => setFormFallbackModel(e.target.value)
|
|
3888
3515
|
}),
|
|
3889
|
-
|
|
3516
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.fallbackModelHint'))
|
|
3890
3517
|
),
|
|
3891
|
-
|
|
3892
|
-
|
|
3518
|
+
_h('label', { className: 'dsh-cron-checkbox-row', style: { marginTop: '4px' } },
|
|
3519
|
+
_h('input', {
|
|
3893
3520
|
type: 'checkbox',
|
|
3894
3521
|
checked: formInspectOnFailure,
|
|
3895
3522
|
onChange: (e) => setFormInspectOnFailure(e.target.checked)
|
|
3896
3523
|
}),
|
|
3897
|
-
|
|
3524
|
+
_h('span', null, T_KEY(t, 'form.inspectOnFailureLabel'))
|
|
3898
3525
|
),
|
|
3899
|
-
formInspectOnFailure &&
|
|
3900
|
-
|
|
3901
|
-
|
|
3526
|
+
formInspectOnFailure && _h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.inspectOnFailureHint')),
|
|
3527
|
+
_h('label', { className: 'dsh-cron-checkbox-row', style: { marginTop: '8px' } },
|
|
3528
|
+
_h('input', {
|
|
3902
3529
|
type: 'checkbox',
|
|
3903
3530
|
checked: formRequireApproval,
|
|
3904
3531
|
onChange: (e) => setFormRequireApproval(e.target.checked)
|
|
3905
3532
|
}),
|
|
3906
|
-
|
|
3533
|
+
_h('span', null, T_KEY(t, 'form.requireApprovalLabel'))
|
|
3907
3534
|
),
|
|
3908
|
-
formRequireApproval &&
|
|
3535
|
+
formRequireApproval && _h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.requireApprovalHint'))
|
|
3909
3536
|
),
|
|
3910
|
-
formType === 'http' &&
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3537
|
+
formType === 'http' && _h('div', { className: 'dsh-cron-form-row' },
|
|
3538
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3539
|
+
_h('label', null, T_KEY(t, 'form.httpMethodLabel')),
|
|
3540
|
+
_h('select', {
|
|
3914
3541
|
value: formHttpMethod,
|
|
3915
3542
|
onChange: (e) => setFormHttpMethod(e.target.value)
|
|
3916
3543
|
},
|
|
3917
|
-
['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD'].map((m) =>
|
|
3544
|
+
['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD'].map((m) => _h('option', { key: m, value: m }, m))
|
|
3918
3545
|
)
|
|
3919
3546
|
),
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3547
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3548
|
+
_h('label', null, T_KEY(t, 'form.httpUrlLabel')),
|
|
3549
|
+
_h('input', {
|
|
3923
3550
|
required: true,
|
|
3924
3551
|
value: formHttpUrl,
|
|
3925
3552
|
placeholder: 'https://example.test/webhook',
|
|
@@ -3927,41 +3554,41 @@ onChange: (e) => setFormHttpUrl(e.target.value)
|
|
|
3927
3554
|
})
|
|
3928
3555
|
)
|
|
3929
3556
|
),
|
|
3930
|
-
formType === 'http' &&
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3557
|
+
formType === 'http' && _h('div', { className: 'dsh-cron-form-row' },
|
|
3558
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3559
|
+
_h('label', null, T_KEY(t, 'form.httpHeadersLabel')),
|
|
3560
|
+
_h('input', {
|
|
3934
3561
|
value: formHttpHeaders,
|
|
3935
3562
|
placeholder: '{"Authorization":"Bearer ..."}',
|
|
3936
3563
|
onChange: (e) => setFormHttpHeaders(e.target.value)
|
|
3937
3564
|
})
|
|
3938
3565
|
),
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3566
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3567
|
+
_h('label', null, T_KEY(t, 'form.httpBodyLabel')),
|
|
3568
|
+
_h('input', {
|
|
3942
3569
|
value: formHttpBody,
|
|
3943
3570
|
onChange: (e) => setFormHttpBody(e.target.value)
|
|
3944
3571
|
})
|
|
3945
3572
|
)
|
|
3946
3573
|
),
|
|
3947
|
-
formType === 'ssh' &&
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3574
|
+
formType === 'ssh' && _h('div', { className: 'dsh-cron-form-row' },
|
|
3575
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3576
|
+
_h('label', null, T_KEY(t, 'form.sshProfileLabel')),
|
|
3577
|
+
_h('input', {
|
|
3951
3578
|
value: formSshProfileId,
|
|
3952
3579
|
placeholder: 'prod-web',
|
|
3953
3580
|
onChange: (e) => setFormSshProfileId(e.target.value)
|
|
3954
3581
|
}),
|
|
3955
|
-
|
|
3582
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.sshProfileHint'))
|
|
3956
3583
|
),
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3584
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3585
|
+
_h('label', null, T_KEY(t, 'form.sshTargetLabel')),
|
|
3586
|
+
_h('input', {
|
|
3960
3587
|
value: formSshTarget,
|
|
3961
3588
|
placeholder: 'user@example.com',
|
|
3962
3589
|
onChange: (e) => setFormSshTarget(e.target.value)
|
|
3963
3590
|
}),
|
|
3964
|
-
|
|
3591
|
+
_h('input', {
|
|
3965
3592
|
style: { marginTop: '6px' },
|
|
3966
3593
|
value: formSshKeyPath,
|
|
3967
3594
|
placeholder: '~/.ssh/id_ed25519',
|
|
@@ -3969,107 +3596,107 @@ onChange: (e) => setFormSshKeyPath(e.target.value)
|
|
|
3969
3596
|
})
|
|
3970
3597
|
)
|
|
3971
3598
|
),
|
|
3972
|
-
formType === 'docker' &&
|
|
3973
|
-
|
|
3974
|
-
|
|
3599
|
+
formType === 'docker' && _h('div', { className: 'dsh-cron-form-group' },
|
|
3600
|
+
_h('label', null, T_KEY(t, 'form.dockerImageLabel')),
|
|
3601
|
+
_h('input', {
|
|
3975
3602
|
required: true,
|
|
3976
3603
|
value: formDockerImage,
|
|
3977
3604
|
placeholder: 'alpine:3.20',
|
|
3978
3605
|
onChange: (e) => setFormDockerImage(e.target.value)
|
|
3979
3606
|
})
|
|
3980
3607
|
),
|
|
3981
|
-
formType === 'skill' &&
|
|
3982
|
-
|
|
3983
|
-
|
|
3608
|
+
formType === 'skill' && _h('div', { className: 'dsh-cron-form-group' },
|
|
3609
|
+
_h('label', null, T_KEY(t, 'form.skillNameLabel')),
|
|
3610
|
+
_h('input', {
|
|
3984
3611
|
value: formSkillName,
|
|
3985
3612
|
placeholder: 'gitea',
|
|
3986
3613
|
onChange: (e) => setFormSkillName(e.target.value)
|
|
3987
3614
|
})
|
|
3988
3615
|
),
|
|
3989
|
-
formType === 'workflow' &&
|
|
3990
|
-
|
|
3991
|
-
|
|
3616
|
+
formType === 'workflow' && _h('div', { className: 'dsh-cron-form-group' },
|
|
3617
|
+
_h('label', null, T_KEY(t, 'form.workflowNameLabel')),
|
|
3618
|
+
_h('input', {
|
|
3992
3619
|
value: formWorkflowName,
|
|
3993
3620
|
placeholder: 'nightly-release',
|
|
3994
3621
|
onChange: (e) => setFormWorkflowName(e.target.value)
|
|
3995
3622
|
})
|
|
3996
3623
|
),
|
|
3997
|
-
(formType === 'node' || formType === 'python') &&
|
|
3998
|
-
|
|
3999
|
-
|
|
3624
|
+
(formType === 'node' || formType === 'python') && _h('div', { className: 'dsh-cron-form-group' },
|
|
3625
|
+
_h('label', null, formType === 'node' ? 'Node.js binary (optional)' : 'Python interpreter (optional)'),
|
|
3626
|
+
_h('input', {
|
|
4000
3627
|
value: formType === 'node' ? formNodePath : formPythonPath,
|
|
4001
3628
|
placeholder: formType === 'node' ? 'auto' : '.venv/bin/python',
|
|
4002
3629
|
onChange: (e) => (formType === 'node' ? setFormNodePath(e.target.value) : setFormPythonPath(e.target.value))
|
|
4003
3630
|
})
|
|
4004
3631
|
),
|
|
4005
|
-
!AGENT_FORM_TYPES.includes(formType) &&
|
|
4006
|
-
|
|
4007
|
-
|
|
3632
|
+
!AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-group' },
|
|
3633
|
+
_h('label', null, T_KEY(t, 'form.envLabel')),
|
|
3634
|
+
_h('textarea', {
|
|
4008
3635
|
rows: 3,
|
|
4009
3636
|
style: { fontFamily: 'monospace', fontSize: '12.5px' },
|
|
4010
3637
|
value: formEnv,
|
|
4011
3638
|
placeholder: T_KEY(t, 'form.envPlaceholder'),
|
|
4012
3639
|
onChange: (e) => setFormEnv(e.target.value)
|
|
4013
3640
|
}),
|
|
4014
|
-
|
|
3641
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.envHint'))
|
|
4015
3642
|
),
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
3643
|
+
_h('div', { className: 'dsh-cron-form-row' },
|
|
3644
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3645
|
+
_h('label', null, T_KEY(t, 'form.cwdLabel')),
|
|
3646
|
+
_h('input', {
|
|
4020
3647
|
value: formCwd,
|
|
4021
3648
|
placeholder: '/srv/app',
|
|
4022
3649
|
onChange: (e) => setFormCwd(e.target.value)
|
|
4023
3650
|
})
|
|
4024
3651
|
),
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
3652
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3653
|
+
_h('label', null, T_KEY(t, 'form.workspaceLabel')),
|
|
3654
|
+
_h('input', {
|
|
4028
3655
|
value: formWorkspaceId,
|
|
4029
3656
|
onChange: (e) => setFormWorkspaceId(e.target.value)
|
|
4030
3657
|
})
|
|
4031
3658
|
)
|
|
4032
3659
|
),
|
|
4033
|
-
AGENT_FORM_TYPES.includes(formType) &&
|
|
4034
|
-
|
|
4035
|
-
|
|
3660
|
+
AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-group' },
|
|
3661
|
+
_h('label', { className: 'dsh-cron-checkbox-row' },
|
|
3662
|
+
_h('input', {
|
|
4036
3663
|
type: 'checkbox',
|
|
4037
3664
|
checked: formWorktree,
|
|
4038
3665
|
onChange: (e) => setFormWorktree(e.target.checked)
|
|
4039
3666
|
}),
|
|
4040
|
-
|
|
3667
|
+
_h('span', null, T_KEY(t, 'form.worktreeLabel'))
|
|
4041
3668
|
),
|
|
4042
|
-
formWorktree &&
|
|
4043
|
-
|
|
3669
|
+
formWorktree && _h('label', { className: 'dsh-cron-checkbox-row', style: { marginLeft: '24px', marginTop: '6px' } },
|
|
3670
|
+
_h('input', {
|
|
4044
3671
|
type: 'checkbox',
|
|
4045
3672
|
checked: formKeepWorktree,
|
|
4046
3673
|
onChange: (e) => setFormKeepWorktree(e.target.checked)
|
|
4047
3674
|
}),
|
|
4048
|
-
|
|
3675
|
+
_h('span', null, T_KEY(t, 'form.keepWorktreeLabel'))
|
|
4049
3676
|
)
|
|
4050
3677
|
),
|
|
4051
|
-
formType !== 'http' &&
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
(selectedTaskMeta && selectedTaskMeta.promptHistory && selectedTaskMeta.promptHistory.length > 0) ?
|
|
4055
|
-
|
|
3678
|
+
formType !== 'http' && _h('div', { className: 'dsh-cron-form-group' },
|
|
3679
|
+
_h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '4px' } },
|
|
3680
|
+
_h('label', { style: { margin: 0 } }, AGENT_FORM_TYPES.includes(formType) ? T_KEY(t, 'form.promptLabelLlm') : T_KEY(t, 'form.promptLabelScript')),
|
|
3681
|
+
(selectedTaskMeta && selectedTaskMeta.promptHistory && selectedTaskMeta.promptHistory.length > 0) ? _h('div', { style: { display: 'flex', gap: '6px', alignItems: 'center' } },
|
|
3682
|
+
_h('span', {
|
|
4056
3683
|
style: { fontSize: '11px', padding: '1px 6px', borderRadius: '4px', background: 'var(--dsw-alias-bg-layer-3, #222)', color: 'var(--dsh-cron-info, #4af)', border: '1px solid var(--dsw-alias-border-l2, #333)' }
|
|
4057
3684
|
}, 'v' + (selectedTaskMeta.promptVersion || 1) + ' (' + (selectedTaskMeta.promptHistory[selectedTaskMeta.promptHistory.length - 1]?.successRate !== undefined ? Math.round(selectedTaskMeta.promptHistory[selectedTaskMeta.promptHistory.length - 1].successRate * 100) : 100) + '% SR)'),
|
|
4058
|
-
|
|
3685
|
+
_h('select', {
|
|
4059
3686
|
style: { fontSize: '11px', padding: '1px 4px', background: 'var(--dsw-alias-bg-base, #111)', color: 'var(--dsw-alias-label-primary, #ddd)', border: '1px solid var(--dsw-alias-border-l2, #333)', borderRadius: '4px' },
|
|
4060
3687
|
onChange: (e) => {
|
|
4061
3688
|
const targetV = Number(e.target.value);
|
|
4062
|
-
const entry = selectedTaskMeta.promptHistory.find((
|
|
3689
|
+
const entry = selectedTaskMeta.promptHistory.find((rev) => rev.version === targetV);
|
|
4063
3690
|
if (entry && entry.prompt) {
|
|
4064
3691
|
setFormPrompt(entry.prompt);
|
|
4065
3692
|
}
|
|
4066
3693
|
}
|
|
4067
3694
|
},
|
|
4068
|
-
selectedTaskMeta.promptHistory.map((
|
|
3695
|
+
selectedTaskMeta.promptHistory.map((rev) => _h('option', { key: rev.version, value: rev.version }, 'v' + rev.version + ' (' + Math.round((rev.successRate || 1) * 100) + '%)'))
|
|
4069
3696
|
)
|
|
4070
3697
|
) : null
|
|
4071
3698
|
),
|
|
4072
|
-
|
|
3699
|
+
_h('textarea', {
|
|
4073
3700
|
required: true,
|
|
4074
3701
|
rows: 9,
|
|
4075
3702
|
style: { fontFamily: 'monospace', fontSize: '12.5px', lineHeight: '1.45' },
|
|
@@ -4088,7 +3715,7 @@ placeholder: AGENT_FORM_TYPES.includes(formType)
|
|
|
4088
3715
|
onChange: (e) => setFormPrompt(e.target.value)
|
|
4089
3716
|
})
|
|
4090
3717
|
),
|
|
4091
|
-
|
|
3718
|
+
_h('div', {
|
|
4092
3719
|
style: {
|
|
4093
3720
|
background: 'var(--dsw-alias-bg-layer-3, color-mix(in srgb, var(--dsw-alias-label-primary) 2%, transparent))',
|
|
4094
3721
|
border: '1px solid var(--dsw-alias-border-l2)',
|
|
@@ -4097,31 +3724,31 @@ padding: '12px 14px',
|
|
|
4097
3724
|
marginBottom: '16px'
|
|
4098
3725
|
}
|
|
4099
3726
|
},
|
|
4100
|
-
|
|
4101
|
-
|
|
3727
|
+
_h('div', { style: { fontWeight: 500, fontSize: '13px', color: 'var(--dsw-alias-label-primary, #eee)', marginBottom: '8px', display: 'flex', alignItems: 'center', gap: '6px' } },
|
|
3728
|
+
_h('span', { style: { display: 'flex', alignItems: 'center', color: 'var(--dsh-cron-info)' }, ...iconHtml(ICON_TELEGRAM) }),
|
|
4102
3729
|
T_KEY(t, 'form.notifyTitle')
|
|
4103
3730
|
),
|
|
4104
|
-
|
|
4105
|
-
|
|
3731
|
+
_h('label', { className: 'dsh-cron-checkbox-row', style: { marginBottom: formNotifyTelegram ? '8px' : '0' } },
|
|
3732
|
+
_h('input', {
|
|
4106
3733
|
type: 'checkbox',
|
|
4107
3734
|
checked: formNotifyTelegram,
|
|
4108
3735
|
onChange: (e) => setFormNotifyTelegram(e.target.checked)
|
|
4109
3736
|
}),
|
|
4110
|
-
|
|
3737
|
+
_h('span', null, T_KEY(t, 'form.notifyTelegram'))
|
|
4111
3738
|
),
|
|
4112
|
-
(formNotifyTelegram || formChannels.length > 0) &&
|
|
4113
|
-
|
|
3739
|
+
(formNotifyTelegram || formChannels.length > 0) && _h('label', { className: 'dsh-cron-checkbox-row', style: { marginLeft: '24px', marginTop: '6px' } },
|
|
3740
|
+
_h('input', {
|
|
4114
3741
|
type: 'checkbox',
|
|
4115
3742
|
checked: formOnlyOnFailure,
|
|
4116
3743
|
onChange: (e) => setFormOnlyOnFailure(e.target.checked)
|
|
4117
3744
|
}),
|
|
4118
|
-
|
|
3745
|
+
_h('span', null, T_KEY(t, 'form.notifyOnlyFailure'))
|
|
4119
3746
|
),
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
...DELIVERY_CHANNELS.map((id) =>
|
|
4124
|
-
|
|
3747
|
+
_h('div', { style: { marginTop: '12px', paddingTop: '10px', borderTop: '1px solid var(--dsw-alias-border-l2)' } },
|
|
3748
|
+
_h('div', { style: { fontWeight: 500, fontSize: '12.5px', color: 'var(--dsw-alias-label-secondary, #aaa)', marginBottom: '8px' } }, T_KEY(t, 'form.channelsTitle')),
|
|
3749
|
+
_h('div', { className: 'dsh-cron-channel-grid' },
|
|
3750
|
+
...DELIVERY_CHANNELS.map((id) => _h('label', { key: id, className: 'dsh-cron-checkbox-row' },
|
|
3751
|
+
_h('input', {
|
|
4125
3752
|
type: 'checkbox',
|
|
4126
3753
|
checked: formChannels.indexOf(id) >= 0,
|
|
4127
3754
|
onChange: (e) => {
|
|
@@ -4132,56 +3759,56 @@ return DELIVERY_CHANNELS.filter((c) => set.has(c));
|
|
|
4132
3759
|
});
|
|
4133
3760
|
}
|
|
4134
3761
|
}),
|
|
4135
|
-
|
|
3762
|
+
_h('span', null, T_KEY(t, CHANNEL_LABEL_KEYS[id]))
|
|
4136
3763
|
))
|
|
4137
3764
|
),
|
|
4138
|
-
|
|
3765
|
+
_h('div', { className: 'dsh-cron-hint', style: { marginTop: '6px' } }, T_KEY(t, 'form.channelsHint'))
|
|
4139
3766
|
),
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
3767
|
+
_h('div', { className: 'dsh-cron-form-group', style: { marginTop: '12px', marginBottom: 0 } },
|
|
3768
|
+
_h('label', null, T_KEY(t, 'form.templateLabel')),
|
|
3769
|
+
_h('input', {
|
|
4143
3770
|
type: 'text',
|
|
4144
3771
|
value: formTemplate,
|
|
4145
3772
|
placeholder: T_KEY(t, 'form.templatePlaceholder'),
|
|
4146
3773
|
onChange: (e) => setFormTemplate(e.target.value)
|
|
4147
3774
|
}),
|
|
4148
|
-
|
|
3775
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.templateHint'))
|
|
4149
3776
|
),
|
|
4150
|
-
!AGENT_FORM_TYPES.includes(formType) &&
|
|
4151
|
-
|
|
4152
|
-
|
|
3777
|
+
!AGENT_FORM_TYPES.includes(formType) && _h('div', { className: 'dsh-cron-form-group', style: { marginTop: '12px', marginBottom: 0 } },
|
|
3778
|
+
_h('label', null, T_KEY(t, 'form.silentRuleLabel')),
|
|
3779
|
+
_h('input', {
|
|
4153
3780
|
type: 'text',
|
|
4154
3781
|
value: formSilentRule,
|
|
4155
3782
|
placeholder: T_KEY(t, 'form.silentRulePlaceholder'),
|
|
4156
3783
|
onChange: (e) => setFormSilentRule(e.target.value)
|
|
4157
3784
|
}),
|
|
4158
|
-
|
|
3785
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.silentRuleHint'))
|
|
4159
3786
|
)
|
|
4160
3787
|
),
|
|
4161
|
-
|
|
3788
|
+
_h('div', {
|
|
4162
3789
|
style: {
|
|
4163
3790
|
marginTop: '16px',
|
|
4164
3791
|
paddingTop: '14px',
|
|
4165
3792
|
borderTop: '1px solid var(--dsw-alias-border-l2)'
|
|
4166
3793
|
}
|
|
4167
3794
|
},
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
3795
|
+
_h('div', { style: { fontWeight: '600', fontSize: '13px', marginBottom: '10px' } }, T_KEY(t, 'form.reliabilityTitle')),
|
|
3796
|
+
_h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '10px' } },
|
|
3797
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3798
|
+
_h('label', null, T_KEY(t, 'form.preflightLabel')),
|
|
3799
|
+
_h('select', {
|
|
4173
3800
|
value: formPreflightType,
|
|
4174
3801
|
onChange: (e) => setFormPreflightType(e.target.value)
|
|
4175
3802
|
},
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
3803
|
+
_h('option', { value: 'none' }, T_KEY(t, 'form.preflightNone')),
|
|
3804
|
+
_h('option', { value: 'http' }, T_KEY(t, 'form.preflightHttp')),
|
|
3805
|
+
_h('option', { value: 'shell' }, T_KEY(t, 'form.preflightShell')),
|
|
3806
|
+
_h('option', { value: 'disk' }, T_KEY(t, 'form.preflightDisk'))
|
|
4180
3807
|
)
|
|
4181
3808
|
),
|
|
4182
|
-
formPreflightType !== 'none' &&
|
|
4183
|
-
|
|
4184
|
-
|
|
3809
|
+
formPreflightType !== 'none' && _h('div', { className: 'dsh-cron-form-group' },
|
|
3810
|
+
_h('label', null, T_KEY(t, 'form.preflightTargetLabel')),
|
|
3811
|
+
_h('input', {
|
|
4185
3812
|
type: 'text',
|
|
4186
3813
|
value: formPreflightTarget,
|
|
4187
3814
|
placeholder: T_KEY(t, 'form.preflightTargetPlaceholder'),
|
|
@@ -4189,19 +3816,19 @@ onChange: (e) => setFormPreflightTarget(e.target.value)
|
|
|
4189
3816
|
})
|
|
4190
3817
|
)
|
|
4191
3818
|
),
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
3819
|
+
_h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '10px' } },
|
|
3820
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3821
|
+
_h('label', null, T_KEY(t, 'form.heartbeatIntervalLabel')),
|
|
3822
|
+
_h('input', {
|
|
4196
3823
|
type: 'number',
|
|
4197
3824
|
value: formHeartbeatIntervalSeconds,
|
|
4198
3825
|
min: 0,
|
|
4199
3826
|
onChange: (e) => setFormHeartbeatIntervalSeconds(Number(e.target.value))
|
|
4200
3827
|
})
|
|
4201
3828
|
),
|
|
4202
|
-
formHeartbeatIntervalSeconds > 0 &&
|
|
4203
|
-
|
|
4204
|
-
|
|
3829
|
+
formHeartbeatIntervalSeconds > 0 && _h('div', { className: 'dsh-cron-form-group' },
|
|
3830
|
+
_h('label', null, T_KEY(t, 'form.gracePeriodLabel')),
|
|
3831
|
+
_h('input', {
|
|
4205
3832
|
type: 'number',
|
|
4206
3833
|
value: formGracePeriodSeconds,
|
|
4207
3834
|
min: 1,
|
|
@@ -4209,10 +3836,10 @@ onChange: (e) => setFormGracePeriodSeconds(Number(e.target.value))
|
|
|
4209
3836
|
})
|
|
4210
3837
|
)
|
|
4211
3838
|
),
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
3839
|
+
_h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '10px' } },
|
|
3840
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3841
|
+
_h('label', null, T_KEY(t, 'form.priorityLabel')),
|
|
3842
|
+
_h('input', {
|
|
4216
3843
|
type: 'number',
|
|
4217
3844
|
value: formPriority,
|
|
4218
3845
|
min: 1,
|
|
@@ -4220,138 +3847,138 @@ max: 10,
|
|
|
4220
3847
|
onChange: (e) => setFormPriority(Number(e.target.value))
|
|
4221
3848
|
})
|
|
4222
3849
|
),
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
3850
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3851
|
+
_h('label', null, T_KEY(t, 'form.concurrencyGroupLabel')),
|
|
3852
|
+
_h('input', {
|
|
4226
3853
|
type: 'text',
|
|
4227
3854
|
value: formConcurrencyGroup,
|
|
4228
3855
|
onChange: (e) => setFormConcurrencyGroup(e.target.value)
|
|
4229
3856
|
})
|
|
4230
3857
|
)
|
|
4231
3858
|
),
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
3859
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3860
|
+
_h('label', null, T_KEY(t, 'form.selfHealingLabel')),
|
|
3861
|
+
_h('input', {
|
|
4235
3862
|
type: 'text',
|
|
4236
3863
|
value: formSelfHealingCommand,
|
|
4237
3864
|
placeholder: T_KEY(t, 'form.selfHealingPlaceholder'),
|
|
4238
3865
|
onChange: (e) => setFormSelfHealingCommand(e.target.value)
|
|
4239
3866
|
})
|
|
4240
3867
|
),
|
|
4241
|
-
|
|
4242
|
-
|
|
3868
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', marginTop: '6px' } },
|
|
3869
|
+
_h('input', {
|
|
4243
3870
|
type: 'checkbox',
|
|
4244
3871
|
id: 'formAutoDiagnoseCheckbox',
|
|
4245
3872
|
checked: formAutoDiagnose,
|
|
4246
3873
|
onChange: (e) => setFormAutoDiagnose(e.target.checked)
|
|
4247
3874
|
}),
|
|
4248
|
-
|
|
3875
|
+
_h('label', { htmlFor: 'formAutoDiagnoseCheckbox', style: { margin: 0, fontSize: '12.5px', cursor: 'pointer' } }, T_KEY(t, 'form.autoDiagnoseLabel'))
|
|
4249
3876
|
)
|
|
4250
3877
|
),
|
|
4251
|
-
|
|
3878
|
+
_h('div', {
|
|
4252
3879
|
style: {
|
|
4253
3880
|
marginTop: '16px',
|
|
4254
3881
|
paddingTop: '14px',
|
|
4255
3882
|
borderTop: '1px solid var(--dsw-alias-border-l2)'
|
|
4256
3883
|
}
|
|
4257
3884
|
},
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
3885
|
+
_h('div', { style: { fontWeight: '600', fontSize: '13px', marginBottom: '10px' } }, '⛓️ ' + T_KEY(t, 'form.chainingTitle')),
|
|
3886
|
+
_h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '10px' } },
|
|
3887
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3888
|
+
_h('label', null, T_KEY(t, 'form.onSuccessLabel')),
|
|
3889
|
+
_h('input', {
|
|
4263
3890
|
type: 'text',
|
|
4264
3891
|
value: formOnSuccess,
|
|
4265
3892
|
placeholder: 'task-build, task-test',
|
|
4266
3893
|
onChange: (e) => setFormOnSuccess(e.target.value)
|
|
4267
3894
|
}),
|
|
4268
|
-
|
|
3895
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.onSuccessHint'))
|
|
4269
3896
|
),
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
3897
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3898
|
+
_h('label', null, T_KEY(t, 'form.onFailureLabel')),
|
|
3899
|
+
_h('input', {
|
|
4273
3900
|
type: 'text',
|
|
4274
3901
|
value: formOnFailure,
|
|
4275
3902
|
placeholder: 'task-alert',
|
|
4276
3903
|
onChange: (e) => setFormOnFailure(e.target.value)
|
|
4277
3904
|
}),
|
|
4278
|
-
|
|
3905
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.onFailureHint'))
|
|
4279
3906
|
)
|
|
4280
3907
|
),
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
3908
|
+
_h('div', { style: { display: 'grid', gridTemplateColumns: '2fr 1fr', gap: '10px', marginTop: '8px' } },
|
|
3909
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3910
|
+
_h('label', null, T_KEY(t, 'form.dependsOnLabel')),
|
|
3911
|
+
_h('input', {
|
|
4285
3912
|
type: 'text',
|
|
4286
3913
|
value: formDependsOn,
|
|
4287
3914
|
placeholder: 'task-build, task-lint',
|
|
4288
3915
|
onChange: (e) => setFormDependsOn(e.target.value)
|
|
4289
3916
|
}),
|
|
4290
|
-
|
|
3917
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.dependsOnHint'))
|
|
4291
3918
|
),
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
3919
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
3920
|
+
_h('label', null, T_KEY(t, 'form.joinPolicyLabel')),
|
|
3921
|
+
_h('select', {
|
|
4295
3922
|
value: formJoinPolicy,
|
|
4296
3923
|
onChange: (e) => setFormJoinPolicy(e.target.value)
|
|
4297
3924
|
},
|
|
4298
|
-
|
|
4299
|
-
|
|
3925
|
+
_h('option', { value: 'all_success' }, T_KEY(t, 'form.joinPolicyAll')),
|
|
3926
|
+
_h('option', { value: 'any_success' }, T_KEY(t, 'form.joinPolicyAny'))
|
|
4300
3927
|
)
|
|
4301
3928
|
)
|
|
4302
3929
|
),
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
3930
|
+
_h('div', { className: 'dsh-cron-form-group', style: { marginTop: '8px' } },
|
|
3931
|
+
_h('label', null, T_KEY(t, 'form.elseTaskLabel')),
|
|
3932
|
+
_h('input', {
|
|
4306
3933
|
type: 'text',
|
|
4307
3934
|
value: formElseTask || '',
|
|
4308
3935
|
placeholder: T_KEY(t, 'form.elseTaskPlaceholder'),
|
|
4309
3936
|
onChange: (e) => setFormElseTask(e.target.value)
|
|
4310
3937
|
}),
|
|
4311
|
-
|
|
3938
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.elseTaskHint'))
|
|
4312
3939
|
),
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
3940
|
+
_h('div', { className: 'dsh-cron-form-group', style: { marginTop: '8px' } },
|
|
3941
|
+
_h('label', { style: { display: 'flex', alignItems: 'center', gap: '8px', cursor: 'pointer' } },
|
|
3942
|
+
_h('input', {
|
|
4316
3943
|
type: 'checkbox',
|
|
4317
3944
|
checked: Boolean(formAutoHeal),
|
|
4318
3945
|
onChange: (e) => setFormAutoHeal(e.target.checked)
|
|
4319
3946
|
}),
|
|
4320
|
-
|
|
3947
|
+
_h('span', { style: { fontWeight: '600' } }, '🩺 ' + T_KEY(t, 'form.autoHealLabel'))
|
|
4321
3948
|
),
|
|
4322
|
-
|
|
3949
|
+
_h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'form.autoHealHint'))
|
|
4323
3950
|
),
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
3951
|
+
_h('div', { style: { marginTop: '12px', padding: '10px', background: 'var(--dsw-alias-bg-layer-2)', borderRadius: '6px' } },
|
|
3952
|
+
_h('label', { style: { display: 'flex', alignItems: 'center', gap: '8px', cursor: 'pointer', fontWeight: '500' } },
|
|
3953
|
+
_h('input', {
|
|
4327
3954
|
type: 'checkbox',
|
|
4328
3955
|
checked: formAdaptiveEnabled,
|
|
4329
3956
|
onChange: (e) => setFormAdaptiveEnabled(e.target.checked)
|
|
4330
3957
|
}),
|
|
4331
3958
|
T_KEY(t, 'form.adaptiveEnabled')
|
|
4332
3959
|
),
|
|
4333
|
-
|
|
4334
|
-
formAdaptiveEnabled &&
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
3960
|
+
_h('div', { className: 'dsh-cron-hint', style: { marginLeft: '24px' } }, T_KEY(t, 'form.adaptiveHint')),
|
|
3961
|
+
formAdaptiveEnabled && _h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr 1fr', gap: '8px', marginTop: '8px', marginLeft: '24px' } },
|
|
3962
|
+
_h('div', null,
|
|
3963
|
+
_h('label', { style: { fontSize: '11px' } }, 'Min'),
|
|
3964
|
+
_h('input', { type: 'text', value: formAdaptiveMinInterval, placeholder: '5m', onChange: (e) => setFormAdaptiveMinInterval(e.target.value) })
|
|
4338
3965
|
),
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
3966
|
+
_h('div', null,
|
|
3967
|
+
_h('label', { style: { fontSize: '11px' } }, 'Max'),
|
|
3968
|
+
_h('input', { type: 'text', value: formAdaptiveMaxInterval, placeholder: '2h', onChange: (e) => setFormAdaptiveMaxInterval(e.target.value) })
|
|
4342
3969
|
),
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
3970
|
+
_h('div', null,
|
|
3971
|
+
_h('label', { style: { fontSize: '11px' } }, 'Factor'),
|
|
3972
|
+
_h('input', { type: 'number', step: '0.1', value: formAdaptiveBackoffFactor, placeholder: '1.5', onChange: (e) => setFormAdaptiveBackoffFactor(e.target.value) })
|
|
4346
3973
|
),
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
3974
|
+
_h('div', null,
|
|
3975
|
+
_h('label', { style: { fontSize: '11px' } }, 'Idle Runs'),
|
|
3976
|
+
_h('input', { type: 'number', value: formAdaptiveIdleThreshold, placeholder: '3', onChange: (e) => setFormAdaptiveIdleThreshold(e.target.value) })
|
|
4350
3977
|
)
|
|
4351
3978
|
)
|
|
4352
3979
|
)
|
|
4353
3980
|
),
|
|
4354
|
-
selectedTaskMeta &&
|
|
3981
|
+
selectedTaskMeta && _h('div', {
|
|
4355
3982
|
style: {
|
|
4356
3983
|
background: 'var(--dsw-alias-bg-layer-3, color-mix(in srgb, var(--dsw-alias-label-primary) 3%, transparent))',
|
|
4357
3984
|
border: '1px solid var(--dsw-alias-border-l2)',
|
|
@@ -4365,11 +3992,11 @@ justifyContent: 'space-between',
|
|
|
4365
3992
|
alignItems: 'center'
|
|
4366
3993
|
}
|
|
4367
3994
|
},
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
3995
|
+
_h('div', null,
|
|
3996
|
+
_h('span', null, T_KEY(t, 'form.nextRunLabel')),
|
|
3997
|
+
_h('strong', { style: { color: 'var(--dsw-alias-label-primary, #eee)' } }, selectedTaskMeta.nextRunAt ? new Date(selectedTaskMeta.nextRunAt).toLocaleString() : T_KEY(t, 'form.notScheduled'))
|
|
4371
3998
|
),
|
|
4372
|
-
|
|
3999
|
+
_h('button', {
|
|
4373
4000
|
type: 'button',
|
|
4374
4001
|
className: 'dsh-cron-btn-secondary',
|
|
4375
4002
|
style: { padding: '4px 10px', fontSize: '12px' },
|
|
@@ -4379,13 +4006,13 @@ if (formId) loadTaskHistory(formId);
|
|
|
4379
4006
|
}
|
|
4380
4007
|
}, T_KEY(t, 'actions.runNow'))
|
|
4381
4008
|
),
|
|
4382
|
-
|
|
4383
|
-
|
|
4009
|
+
_h('div', { className: 'dsh-cron-modal-foot' },
|
|
4010
|
+
_h('button', {
|
|
4384
4011
|
type: 'button',
|
|
4385
4012
|
className: 'dsh-cron-btn-secondary',
|
|
4386
4013
|
onClick: closeManualModalWithConfirm
|
|
4387
4014
|
}, T_KEY(t, 'modal.cancel')),
|
|
4388
|
-
|
|
4015
|
+
_h('button', {
|
|
4389
4016
|
type: 'submit',
|
|
4390
4017
|
className: 'dsh-cron-btn-primary'
|
|
4391
4018
|
}, formId ? T_KEY(t, 'modal.save') : T_KEY(t, 'modal.create'))
|
|
@@ -4393,28 +4020,28 @@ className: 'dsh-cron-btn-primary'
|
|
|
4393
4020
|
)
|
|
4394
4021
|
)
|
|
4395
4022
|
),
|
|
4396
|
-
dryRunResult &&
|
|
4397
|
-
|
|
4023
|
+
dryRunResult && _h('div', { className: 'dsh-cron-modal-overlay', onClick: () => setDryRunResult(null) },
|
|
4024
|
+
_h('div', {
|
|
4398
4025
|
className: 'dsh-cron-modal',
|
|
4399
4026
|
style: { maxWidth: '580px' },
|
|
4400
4027
|
role: 'dialog',
|
|
4401
4028
|
'aria-modal': 'true',
|
|
4402
4029
|
onClick: (e) => e.stopPropagation()
|
|
4403
4030
|
},
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4031
|
+
_h('div', { className: 'dsh-cron-modal-head', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
4032
|
+
_h('div', { className: 'dsh-cron-modal-title', style: { margin: 0 } }, T_KEY(t, 'dryRun.title')),
|
|
4033
|
+
_h('button', {
|
|
4407
4034
|
type: 'button',
|
|
4408
4035
|
className: 'dsh-cron-icon-btn',
|
|
4409
4036
|
onClick: () => setDryRunResult(null)
|
|
4410
4037
|
}, '✕')
|
|
4411
4038
|
),
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
((dryRunResult.result && dryRunResult.result.preflight) || dryRunResult.preflight) &&
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4039
|
+
_h('div', { style: { marginTop: '12px', display: 'flex', flexDirection: 'column', gap: '8px', fontSize: '13px' } },
|
|
4040
|
+
_h('div', null, _h('strong', null, T_KEY(t, 'dryRun.status') + ': '), _h('span', { style: { color: dryRunResult.ok ? 'var(--dsh-cron-success)' : 'var(--dsh-cron-danger)' } }, dryRunResult.ok ? ((dryRunResult.result && dryRunResult.result.status) || dryRunResult.status || 'success') : 'failed')),
|
|
4041
|
+
((dryRunResult.result && dryRunResult.result.preflight) || dryRunResult.preflight) && _h('div', null, _h('strong', null, T_KEY(t, 'dryRun.preflight') + ': '), _h('span', null, (((dryRunResult.result && dryRunResult.result.preflight) || dryRunResult.preflight).passed) ? '✓ Passed' : '✗ Failed (' + ((((dryRunResult.result && dryRunResult.result.preflight) || dryRunResult.preflight).reason) || '') + ')')),
|
|
4042
|
+
_h('div', null, _h('strong', null, T_KEY(t, 'dryRun.duration') + ': '), _h('span', null, (((dryRunResult.result && dryRunResult.result.durationMs) !== undefined ? dryRunResult.result.durationMs : dryRunResult.durationMs) || 0) + 'ms')),
|
|
4043
|
+
_h('div', { style: { marginTop: '6px' } }, _h('strong', null, T_KEY(t, 'dryRun.output') + ':')),
|
|
4044
|
+
_h('pre', {
|
|
4418
4045
|
style: {
|
|
4419
4046
|
background: 'var(--dsw-alias-bg-layer-2)',
|
|
4420
4047
|
border: '1px solid var(--dsw-alias-border-l2)',
|
|
@@ -4429,8 +4056,8 @@ color: 'var(--dsw-alias-label-primary)'
|
|
|
4429
4056
|
}
|
|
4430
4057
|
}, ((dryRunResult.result && dryRunResult.result.output) !== undefined ? dryRunResult.result.output : (dryRunResult.output !== undefined ? dryRunResult.output : ((dryRunResult.result && dryRunResult.result.error) || dryRunResult.error || '(no output)'))))
|
|
4431
4058
|
),
|
|
4432
|
-
|
|
4433
|
-
|
|
4059
|
+
_h('div', { className: 'dsh-cron-modal-foot', style: { marginTop: '16px' } },
|
|
4060
|
+
_h('button', {
|
|
4434
4061
|
type: 'button',
|
|
4435
4062
|
className: 'dsh-cron-btn-primary',
|
|
4436
4063
|
onClick: () => setDryRunResult(null)
|
|
@@ -4438,29 +4065,29 @@ onClick: () => setDryRunResult(null)
|
|
|
4438
4065
|
)
|
|
4439
4066
|
)
|
|
4440
4067
|
),
|
|
4441
|
-
archiveModalOpen &&
|
|
4442
|
-
|
|
4068
|
+
archiveModalOpen && _h('div', { className: 'dsh-cron-modal-overlay', onClick: () => setArchiveModalOpen(false) },
|
|
4069
|
+
_h('div', {
|
|
4443
4070
|
className: 'dsh-cron-modal',
|
|
4444
4071
|
style: { maxWidth: '700px' },
|
|
4445
4072
|
role: 'dialog',
|
|
4446
4073
|
'aria-modal': 'true',
|
|
4447
4074
|
onClick: (e) => e.stopPropagation()
|
|
4448
4075
|
},
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4076
|
+
_h('div', { className: 'dsh-cron-modal-head', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
4077
|
+
_h('div', { className: 'dsh-cron-modal-title', style: { margin: 0 } }, T_KEY(t, 'archive.title') + (archiveTask ? ' - ' + archiveTask.title : '')),
|
|
4078
|
+
_h('button', {
|
|
4452
4079
|
type: 'button',
|
|
4453
4080
|
className: 'dsh-cron-icon-btn',
|
|
4454
4081
|
onClick: () => setArchiveModalOpen(false)
|
|
4455
4082
|
}, '✕')
|
|
4456
4083
|
),
|
|
4457
|
-
|
|
4084
|
+
_h('div', { style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #999)', margin: '4px 0 12px 0' } },
|
|
4458
4085
|
T_KEY(t, 'archive.totalRuns', { total: archiveTotal })
|
|
4459
4086
|
),
|
|
4460
|
-
archiveLoading ?
|
|
4461
|
-
archiveRuns.length === 0 ?
|
|
4462
|
-
|
|
4463
|
-
archiveRuns.map((r, idx) =>
|
|
4087
|
+
archiveLoading ? _h('div', { className: 'dsh-cron-history-empty' }, T_KEY(t, 'history.loading')) :
|
|
4088
|
+
archiveRuns.length === 0 ? _h('div', { className: 'dsh-cron-history-empty' }, T_KEY(t, 'archive.empty')) :
|
|
4089
|
+
_h('div', { style: { display: 'flex', flexDirection: 'column', gap: '8px', maxHeight: '380px', overflowY: 'auto' } },
|
|
4090
|
+
archiveRuns.map((r, idx) => _h('div', {
|
|
4464
4091
|
key: idx,
|
|
4465
4092
|
style: {
|
|
4466
4093
|
background: 'var(--dsw-alias-bg-layer-2)',
|
|
@@ -4470,21 +4097,21 @@ padding: '8px 12px',
|
|
|
4470
4097
|
fontSize: '12px'
|
|
4471
4098
|
}
|
|
4472
4099
|
},
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4100
|
+
_h('div', { style: { display: 'flex', justifyContent: 'space-between', marginBottom: '4px' } },
|
|
4101
|
+
_h('span', { style: { fontWeight: '600', color: r.status === 'success' ? 'var(--dsh-cron-success)' : 'var(--dsh-cron-danger)' } }, (r.status || 'unknown').toUpperCase()),
|
|
4102
|
+
_h('span', { style: { color: 'var(--dsw-alias-label-secondary, #888)' } }, (r.at || r.timestamp || r.startedAt) ? new Date(r.at || r.timestamp || r.startedAt).toLocaleString() : "")
|
|
4476
4103
|
),
|
|
4477
|
-
r.durationMs > 0 &&
|
|
4478
|
-
r.chainRunId &&
|
|
4479
|
-
|
|
4104
|
+
r.durationMs > 0 && _h('div', { style: { color: 'var(--dsw-alias-label-secondary, #888)', marginBottom: '4px' } }, 'Duration: ' + r.durationMs + 'ms'),
|
|
4105
|
+
r.chainRunId && _h('div', { style: { marginBottom: '4px' } },
|
|
4106
|
+
_h('button', {
|
|
4480
4107
|
type: 'button',
|
|
4481
4108
|
className: 'dsh-cron-btn-secondary',
|
|
4482
4109
|
style: { padding: '2px 8px', fontSize: '11px', display: 'inline-flex', alignItems: 'center', gap: '4px' },
|
|
4483
4110
|
onClick: () => openChainGraphModal(null, r.chainRunId)
|
|
4484
4111
|
}, '🕸️ ' + T_KEY(t, 'chainGraph.viewGraph'))
|
|
4485
4112
|
),
|
|
4486
|
-
r.error &&
|
|
4487
|
-
r.output &&
|
|
4113
|
+
r.error && _h('div', { style: { color: 'var(--dsh-cron-danger)', marginBottom: '4px' } }, 'Error: ' + r.error),
|
|
4114
|
+
r.output && _h('div', {
|
|
4488
4115
|
style: {
|
|
4489
4116
|
color: 'var(--dsw-alias-label-primary, #ccc)',
|
|
4490
4117
|
whiteSpace: 'pre-wrap',
|
|
@@ -4495,16 +4122,16 @@ overflowY: 'auto'
|
|
|
4495
4122
|
}, r.output.slice(0, 300) + (r.output.length > 300 ? '...' : ''))
|
|
4496
4123
|
))
|
|
4497
4124
|
),
|
|
4498
|
-
|
|
4499
|
-
archiveRuns.length < archiveTotal ?
|
|
4125
|
+
_h('div', { className: 'dsh-cron-modal-foot', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginTop: '16px' } },
|
|
4126
|
+
archiveRuns.length < archiveTotal ? _h('button', {
|
|
4500
4127
|
type: 'button',
|
|
4501
4128
|
className: 'dsh-cron-btn-secondary',
|
|
4502
4129
|
onClick: () => {
|
|
4503
4130
|
const nextOffset = archiveRuns.length;
|
|
4504
4131
|
if (archiveTask) openArchiveModal(archiveTask, nextOffset);
|
|
4505
4132
|
}
|
|
4506
|
-
}, T_KEY(t, 'archive.loadMore', { shown: archiveRuns.length, total: archiveTotal })) :
|
|
4507
|
-
|
|
4133
|
+
}, T_KEY(t, 'archive.loadMore', { shown: archiveRuns.length, total: archiveTotal })) : _h('div', null),
|
|
4134
|
+
_h('button', {
|
|
4508
4135
|
type: 'button',
|
|
4509
4136
|
className: 'dsh-cron-btn-primary',
|
|
4510
4137
|
onClick: () => setArchiveModalOpen(false)
|
|
@@ -4512,54 +4139,54 @@ onClick: () => setArchiveModalOpen(false)
|
|
|
4512
4139
|
)
|
|
4513
4140
|
)
|
|
4514
4141
|
),
|
|
4515
|
-
settingsModalOpen &&
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4142
|
+
settingsModalOpen && _h('div', { className: 'dsh-cron-modal-overlay', onClick: () => setSettingsModalOpen(false) },
|
|
4143
|
+
_h('div', { className: 'dsh-cron-modal dsh-cron-modal-scroll', role: 'dialog', 'aria-modal': 'true', onClick: (e) => e.stopPropagation() },
|
|
4144
|
+
_h('div', { className: 'dsh-cron-modal-head', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '18px' } },
|
|
4145
|
+
_h('div', { className: 'dsh-cron-modal-title', style: { margin: 0, display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
4146
|
+
_h('span', { style: { display: 'flex', alignItems: 'center', color: 'var(--dsh-cron-info)' }, ...iconHtml(ICON_TELEGRAM) }),
|
|
4520
4147
|
T_KEY(t, 'settings.modalTitle')
|
|
4521
4148
|
),
|
|
4522
|
-
|
|
4149
|
+
_h('button', {
|
|
4523
4150
|
type: 'button',
|
|
4524
4151
|
style: { background: 'none', border: 'none', color: 'var(--dsw-alias-label-tertiary, #888)', cursor: 'pointer', fontSize: '18px' },
|
|
4525
4152
|
onClick: () => setSettingsModalOpen(false)
|
|
4526
4153
|
}, '✕')
|
|
4527
4154
|
),
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4155
|
+
_h('form', { onSubmit: handleSaveSettings },
|
|
4156
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
4157
|
+
_h('label', null, T_KEY(t, 'settings.tokenLabel')),
|
|
4158
|
+
_h('input', {
|
|
4532
4159
|
type: 'password',
|
|
4533
4160
|
value: settingsBotToken,
|
|
4534
4161
|
placeholder: settingsHasDefault ? T_KEY(t, 'settings.tokenPlaceholderDefault') : T_KEY(t, 'settings.tokenPlaceholder'),
|
|
4535
4162
|
onChange: (e) => setSettingsBotToken(e.target.value)
|
|
4536
4163
|
}),
|
|
4537
|
-
settingsHasDefault &&
|
|
4164
|
+
settingsHasDefault && _h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'settings.defaultHint'))
|
|
4538
4165
|
),
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4166
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
4167
|
+
_h('label', null, T_KEY(t, 'settings.chatIdLabel')),
|
|
4168
|
+
_h('input', {
|
|
4542
4169
|
value: settingsChatId,
|
|
4543
4170
|
placeholder: T_KEY(t, 'settings.chatIdPlaceholder'),
|
|
4544
4171
|
onChange: (e) => setSettingsChatId(e.target.value)
|
|
4545
4172
|
})
|
|
4546
4173
|
),
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4174
|
+
_h('div', { style: { background: 'var(--dsw-alias-bg-layer-3, color-mix(in srgb, var(--dsw-alias-label-primary) 2%, transparent))', border: '1px solid var(--dsw-alias-border-l2)', borderRadius: '8px', padding: '12px 14px', marginBottom: '16px' } },
|
|
4175
|
+
_h('label', { className: 'dsh-cron-checkbox-row', style: { marginBottom: '8px' } },
|
|
4176
|
+
_h('input', {
|
|
4550
4177
|
type: 'checkbox',
|
|
4551
4178
|
checked: settingsNotifyGlobal,
|
|
4552
4179
|
onChange: (e) => setSettingsNotifyGlobal(e.target.checked)
|
|
4553
4180
|
}),
|
|
4554
|
-
|
|
4181
|
+
_h('span', null, T_KEY(t, 'settings.globalNotify'))
|
|
4555
4182
|
),
|
|
4556
|
-
|
|
4557
|
-
|
|
4183
|
+
_h('label', { className: 'dsh-cron-checkbox-row' },
|
|
4184
|
+
_h('input', {
|
|
4558
4185
|
type: 'checkbox',
|
|
4559
4186
|
checked: settingsOnlyOnFailureGlobal,
|
|
4560
4187
|
onChange: (e) => setSettingsOnlyOnFailureGlobal(e.target.checked)
|
|
4561
4188
|
}),
|
|
4562
|
-
|
|
4189
|
+
_h('span', null, T_KEY(t, 'settings.globalOnlyFailure'))
|
|
4563
4190
|
)
|
|
4564
4191
|
),
|
|
4565
4192
|
...renderDeliverySettings({
|
|
@@ -4570,8 +4197,8 @@ onChannelTemplate: updateChannelTemplate,
|
|
|
4570
4197
|
sections: settingsSections,
|
|
4571
4198
|
onToggleSection: toggleDeliverySection,
|
|
4572
4199
|
}),
|
|
4573
|
-
|
|
4574
|
-
|
|
4200
|
+
_h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '14px' } },
|
|
4201
|
+
_h('button', {
|
|
4575
4202
|
type: 'button',
|
|
4576
4203
|
className: 'dsh-cron-btn-secondary',
|
|
4577
4204
|
style: { display: 'inline-flex', alignItems: 'center', gap: '6px' },
|
|
@@ -4579,17 +4206,17 @@ disabled: testStatus?.loading,
|
|
|
4579
4206
|
onClick: handleTestTelegram
|
|
4580
4207
|
}, testStatus?.loading ? T_KEY(t, 'settings.sending') : T_KEY(t, 'settings.testTelegram'))
|
|
4581
4208
|
),
|
|
4582
|
-
testStatus && testStatus.message &&
|
|
4209
|
+
testStatus && testStatus.message && _h('div', {
|
|
4583
4210
|
className: 'dsh-cron-status-banner',
|
|
4584
4211
|
'data-type': testStatus.success ? 'success' : 'error'
|
|
4585
4212
|
}, testStatus.message),
|
|
4586
|
-
|
|
4587
|
-
|
|
4213
|
+
_h('div', { className: 'dsh-cron-modal-foot' },
|
|
4214
|
+
_h('button', {
|
|
4588
4215
|
type: 'button',
|
|
4589
4216
|
className: 'dsh-cron-btn-secondary',
|
|
4590
4217
|
onClick: () => setSettingsModalOpen(false)
|
|
4591
4218
|
}, T_KEY(t, 'modal.cancel')),
|
|
4592
|
-
|
|
4219
|
+
_h('button', {
|
|
4593
4220
|
type: 'submit',
|
|
4594
4221
|
className: 'dsh-cron-btn-primary'
|
|
4595
4222
|
}, T_KEY(t, 'settings.save'))
|
|
@@ -4597,12 +4224,12 @@ className: 'dsh-cron-btn-primary'
|
|
|
4597
4224
|
)
|
|
4598
4225
|
)
|
|
4599
4226
|
),
|
|
4600
|
-
importDoc &&
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
importSummary &&
|
|
4605
|
-
|
|
4227
|
+
importDoc && _h('div', { className: 'dsh-cron-modal-overlay', onClick: () => !transferBusy && setImportDoc(null) },
|
|
4228
|
+
_h('div', { className: 'dsh-cron-modal', role: 'dialog', 'aria-modal': 'true', onClick: (e) => e.stopPropagation() },
|
|
4229
|
+
_h('div', { className: 'dsh-cron-modal-title' }, T_KEY(t, 'transfer.importTitleModal')),
|
|
4230
|
+
_h('div', { className: 'dsh-cron-hint', style: { marginBottom: '10px' } }, T_KEY(t, 'transfer.importHint')),
|
|
4231
|
+
importSummary && _h('div', null,
|
|
4232
|
+
_h('div', { style: { fontSize: '13px', marginBottom: '12px' } },
|
|
4606
4233
|
T_KEY(t, 'transfer.summary', {
|
|
4607
4234
|
total: (importSummary.add || 0) + (importSummary.replace || 0) + (importSummary.skip || 0),
|
|
4608
4235
|
add: importSummary.add || 0,
|
|
@@ -4610,26 +4237,26 @@ replace: importSummary.replace || 0,
|
|
|
4610
4237
|
skip: importSummary.skip || 0
|
|
4611
4238
|
})
|
|
4612
4239
|
),
|
|
4613
|
-
|
|
4614
|
-
...['add', 'replace', 'skip'].map((mode) =>
|
|
4615
|
-
|
|
4240
|
+
_h('div', { style: { display: 'flex', flexDirection: 'column', gap: '8px', marginBottom: '14px' } },
|
|
4241
|
+
...['add', 'replace', 'skip'].map((mode) => _h('label', { key: mode, className: 'dsh-cron-checkbox-row' },
|
|
4242
|
+
_h('input', {
|
|
4616
4243
|
type: 'radio',
|
|
4617
4244
|
name: 'dsh-cron-import-strategy',
|
|
4618
4245
|
checked: importStrategy === mode,
|
|
4619
4246
|
onChange: () => setImportStrategy(mode)
|
|
4620
4247
|
}),
|
|
4621
|
-
|
|
4248
|
+
_h('span', null, T_KEY(t, mode === 'add' ? 'transfer.strategyAdd' : mode === 'replace' ? 'transfer.strategyReplace' : 'transfer.strategySkip'))
|
|
4622
4249
|
))
|
|
4623
4250
|
)
|
|
4624
4251
|
),
|
|
4625
|
-
|
|
4626
|
-
|
|
4252
|
+
_h('div', { className: 'dsh-cron-modal-foot' },
|
|
4253
|
+
_h('button', {
|
|
4627
4254
|
type: 'button',
|
|
4628
4255
|
className: 'dsh-cron-btn-secondary',
|
|
4629
4256
|
disabled: transferBusy,
|
|
4630
4257
|
onClick: () => setImportDoc(null)
|
|
4631
4258
|
}, T_KEY(t, 'modal.cancel')),
|
|
4632
|
-
|
|
4259
|
+
_h('button', {
|
|
4633
4260
|
type: 'button',
|
|
4634
4261
|
className: 'dsh-cron-btn-primary',
|
|
4635
4262
|
disabled: transferBusy || !importSummary,
|
|
@@ -4638,13 +4265,13 @@ onClick: handleImportConfirm
|
|
|
4638
4265
|
)
|
|
4639
4266
|
)
|
|
4640
4267
|
),
|
|
4641
|
-
dshModalOpen &&
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4268
|
+
dshModalOpen && _h('div', { className: 'dsh-cron-modal-overlay', onClick: () => !dshLoading && setDshModalOpen(false) },
|
|
4269
|
+
_h('div', { className: 'dsh-cron-modal', role: 'dialog', 'aria-modal': 'true', onClick: (e) => e.stopPropagation() },
|
|
4270
|
+
_h('div', { className: 'dsh-cron-modal-title' }, T_KEY(t, 'dsh.modalTitle')),
|
|
4271
|
+
_h('div', { className: 'dsh-cron-form-group' },
|
|
4272
|
+
_h('label', null, T_KEY(t, 'dsh.descLabel')),
|
|
4273
|
+
_h('div', { className: 'dsh-cron-chat-box' },
|
|
4274
|
+
_h('textarea', {
|
|
4648
4275
|
className: 'dsh-cron-chat-input',
|
|
4649
4276
|
rows: 4,
|
|
4650
4277
|
autoFocus: true,
|
|
@@ -4659,22 +4286,22 @@ handleStartWithDSH();
|
|
|
4659
4286
|
},
|
|
4660
4287
|
onChange: (e) => setDshPrompt(e.target.value)
|
|
4661
4288
|
}),
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4289
|
+
_h('div', { className: 'dsh-cron-chat-foot' },
|
|
4290
|
+
_h('span', { className: 'dsh-cron-chat-hint' }, T_KEY(t, 'dsh.sendHint')),
|
|
4291
|
+
_h('button', {
|
|
4665
4292
|
type: 'button',
|
|
4666
4293
|
className: 'dsh-cron-send-btn',
|
|
4667
4294
|
disabled: dshLoading || !dshPrompt.trim(),
|
|
4668
4295
|
title: T_KEY(t, 'dsh.sendTitle'),
|
|
4669
4296
|
onClick: handleStartWithDSH
|
|
4670
4297
|
},
|
|
4671
|
-
|
|
4298
|
+
_h('span', svgProps(ICON_SEND))
|
|
4672
4299
|
)
|
|
4673
4300
|
)
|
|
4674
4301
|
)
|
|
4675
4302
|
),
|
|
4676
|
-
|
|
4677
|
-
|
|
4303
|
+
_h('div', { className: 'dsh-cron-modal-foot' },
|
|
4304
|
+
_h('button', {
|
|
4678
4305
|
type: 'button',
|
|
4679
4306
|
className: 'dsh-cron-btn-secondary',
|
|
4680
4307
|
disabled: dshLoading,
|
|
@@ -4885,15 +4512,15 @@ setTestInfo({ success: false, message: T_KEY(t, 'settings.kanbanFail', { error:
|
|
|
4885
4512
|
}
|
|
4886
4513
|
};
|
|
4887
4514
|
if (loadState !== 'ready') {
|
|
4888
|
-
return
|
|
4889
|
-
|
|
4890
|
-
|
|
4515
|
+
return _h('div', { className: 'dsh-cron-card' },
|
|
4516
|
+
_h('div', { className: 'dsh-cron-card-title' }, T_KEY(t, 'settings.cardTitle')),
|
|
4517
|
+
_h('div', {
|
|
4891
4518
|
className: 'dsh-cron-status-banner',
|
|
4892
4519
|
'data-type': loadState === 'error' ? 'error' : 'info',
|
|
4893
4520
|
style: { marginTop: '10px', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '10px' }
|
|
4894
4521
|
},
|
|
4895
|
-
|
|
4896
|
-
loadState === 'error' &&
|
|
4522
|
+
_h('span', null, loadState === 'error' ? T_KEY(t, 'settings.unavailable') : T_KEY(t, 'settings.loading')),
|
|
4523
|
+
loadState === 'error' && _h('button', {
|
|
4897
4524
|
type: 'button',
|
|
4898
4525
|
className: 'dsh-cron-btn-secondary',
|
|
4899
4526
|
onClick: () => setReloadTick(x => x + 1)
|
|
@@ -4902,88 +4529,88 @@ onClick: () => setReloadTick(x => x + 1)
|
|
|
4902
4529
|
);
|
|
4903
4530
|
}
|
|
4904
4531
|
if (props && props.view === 'summary') {
|
|
4905
|
-
return
|
|
4532
|
+
return _h('span', { className: 'dsh-cron-card-desc' }, T_KEY(t, 'settings.cardDesc'));
|
|
4906
4533
|
}
|
|
4907
4534
|
const page = !!(props && props.view === 'page');
|
|
4908
|
-
return
|
|
4909
|
-
|
|
4535
|
+
return _h('div', { className: page ? 'dsh-cron-page' : 'dsh-cron-card' },
|
|
4536
|
+
_h('button', {
|
|
4910
4537
|
type: 'button',
|
|
4911
4538
|
className: 'dsh-cron-card-head-btn',
|
|
4912
4539
|
style: page ? { display: 'none' } : undefined,
|
|
4913
4540
|
'aria-expanded': (page || cardOpen) ? 'true' : 'false',
|
|
4914
4541
|
onClick: () => setCardOpen(!cardOpen)
|
|
4915
4542
|
},
|
|
4916
|
-
|
|
4917
|
-
|
|
4543
|
+
_h('span', { className: 'dsh-cron-card-title' }, T_KEY(t, 'settings.cardTitle')),
|
|
4544
|
+
_h('span', { className: 'dsh-cron-chev' + (cardOpen ? ' dsh-cron-chev-open' : '') }, chevronNode())
|
|
4918
4545
|
),
|
|
4919
|
-
(page || cardOpen) &&
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4546
|
+
(page || cardOpen) && _h('div', { className: 'dsh-cron-card-body' },
|
|
4547
|
+
_h('div', { className: 'dsh-cron-card-desc' }, T_KEY(t, 'settings.cardDesc')),
|
|
4548
|
+
_h('div', { style: { display: 'flex', justifyContent: 'flex-end', marginBottom: '12px' } },
|
|
4549
|
+
_h('button', {
|
|
4923
4550
|
type: 'button',
|
|
4924
4551
|
className: 'dsh-cron-btn-primary',
|
|
4925
4552
|
onClick: () => { if (toggle) toggle.set(true); }
|
|
4926
4553
|
}, T_KEY(t, 'settings.openPanel'))
|
|
4927
4554
|
),
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4555
|
+
_h('form', { onSubmit: saveSettings, style: { display: 'flex', flexDirection: 'column', gap: '12px' } },
|
|
4556
|
+
_h('div', { className: 'dsh-cron-form-group', style: { marginBottom: 0 } },
|
|
4557
|
+
_h('label', null, T_KEY(t, 'settings.tokenLabel')),
|
|
4558
|
+
_h('input', {
|
|
4932
4559
|
type: 'password',
|
|
4933
4560
|
value: token,
|
|
4934
4561
|
placeholder: hasDefault ? T_KEY(t, 'settings.tokenPlaceholderDefault') : T_KEY(t, 'settings.tokenPlaceholder'),
|
|
4935
4562
|
onChange: (e) => setToken(e.target.value)
|
|
4936
4563
|
}),
|
|
4937
|
-
hasDefault &&
|
|
4564
|
+
hasDefault && _h('div', { className: 'dsh-cron-hint' }, T_KEY(t, 'settings.defaultHint'))
|
|
4938
4565
|
),
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4566
|
+
_h('div', { className: 'dsh-cron-form-group', style: { marginBottom: 0 } },
|
|
4567
|
+
_h('label', null, T_KEY(t, 'settings.chatIdLabel')),
|
|
4568
|
+
_h('input', {
|
|
4942
4569
|
value: chatId,
|
|
4943
4570
|
placeholder: T_KEY(t, 'settings.chatIdPlaceholder'),
|
|
4944
4571
|
onChange: (e) => setChatId(e.target.value)
|
|
4945
4572
|
})
|
|
4946
4573
|
),
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4574
|
+
_h('div', { className: 'dsh-cron-form-group', style: { marginBottom: 0 } },
|
|
4575
|
+
_h('label', null, T_KEY(t, 'settings.kanbanUrlLabel')),
|
|
4576
|
+
_h('input', {
|
|
4950
4577
|
value: kanbanUrl,
|
|
4951
4578
|
placeholder: 'http://127.0.0.1:3000',
|
|
4952
4579
|
onChange: (e) => setKanbanUrl(e.target.value)
|
|
4953
4580
|
})
|
|
4954
4581
|
),
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4582
|
+
_h('div', { style: { background: 'var(--dsw-alias-bg-layer-3, color-mix(in srgb, var(--dsw-alias-label-primary) 2%, transparent))', border: '1px solid var(--dsw-alias-border-l2)', borderRadius: '6px', padding: '10px 12px', display: 'flex', flexDirection: 'column', gap: '8px' } },
|
|
4583
|
+
_h('label', { className: 'dsh-cron-checkbox-row' },
|
|
4584
|
+
_h('input', {
|
|
4958
4585
|
type: 'checkbox',
|
|
4959
4586
|
checked: notify,
|
|
4960
4587
|
onChange: (e) => setNotify(e.target.checked)
|
|
4961
4588
|
}),
|
|
4962
|
-
|
|
4589
|
+
_h('span', null, T_KEY(t, 'settings.globalNotify'))
|
|
4963
4590
|
),
|
|
4964
|
-
|
|
4965
|
-
|
|
4591
|
+
_h('label', { className: 'dsh-cron-checkbox-row' },
|
|
4592
|
+
_h('input', {
|
|
4966
4593
|
type: 'checkbox',
|
|
4967
4594
|
checked: onlyFailure,
|
|
4968
4595
|
onChange: (e) => setOnlyFailure(e.target.checked)
|
|
4969
4596
|
}),
|
|
4970
|
-
|
|
4597
|
+
_h('span', null, T_KEY(t, 'settings.globalOnlyFailure'))
|
|
4971
4598
|
),
|
|
4972
|
-
|
|
4973
|
-
|
|
4599
|
+
_h('label', { className: 'dsh-cron-checkbox-row' },
|
|
4600
|
+
_h('input', {
|
|
4974
4601
|
type: 'checkbox',
|
|
4975
4602
|
checked: llmActionsEnabled,
|
|
4976
4603
|
onChange: (e) => setLlmActionsEnabled(e.target.checked)
|
|
4977
4604
|
}),
|
|
4978
|
-
|
|
4605
|
+
_h('span', null, 'Enable Structured LLM Actions (trigger tasks, notify, create issues)')
|
|
4979
4606
|
),
|
|
4980
|
-
|
|
4981
|
-
|
|
4607
|
+
_h('label', { className: 'dsh-cron-checkbox-row' },
|
|
4608
|
+
_h('input', {
|
|
4982
4609
|
type: 'checkbox',
|
|
4983
4610
|
checked: enableDynamicCredentials,
|
|
4984
4611
|
onChange: (e) => setEnableDynamicCredentials(e.target.checked)
|
|
4985
4612
|
}),
|
|
4986
|
-
|
|
4613
|
+
_h('span', null, T_KEY(t, 'settings.dynamicCredentials'))
|
|
4987
4614
|
)
|
|
4988
4615
|
),
|
|
4989
4616
|
...renderDeliverySettings({
|
|
@@ -5004,12 +4631,12 @@ return Object.assign({}, prev, { channelTemplates: templates });
|
|
|
5004
4631
|
sections,
|
|
5005
4632
|
onToggleSection: (key) => setSections((prev) => Object.assign({}, prev, { [key]: !prev[key] })),
|
|
5006
4633
|
}),
|
|
5007
|
-
testInfo && testInfo.message &&
|
|
4634
|
+
testInfo && testInfo.message && _h('div', {
|
|
5008
4635
|
className: 'dsh-cron-status-banner',
|
|
5009
4636
|
'data-type': testInfo.success ? 'success' : 'error',
|
|
5010
4637
|
style: { margin: 0, padding: '8px 12px' }
|
|
5011
4638
|
}, testInfo.message),
|
|
5012
|
-
|
|
4639
|
+
_h('div', {
|
|
5013
4640
|
className: 'dsh-cron-form-group',
|
|
5014
4641
|
style: {
|
|
5015
4642
|
background: 'var(--dsw-alias-bg-layer-2, color-mix(in srgb, var(--dsw-alias-label-primary) 3%, transparent))',
|
|
@@ -5019,19 +4646,19 @@ padding: '14px',
|
|
|
5019
4646
|
marginBottom: '16px'
|
|
5020
4647
|
}
|
|
5021
4648
|
},
|
|
5022
|
-
|
|
4649
|
+
_h('div', {
|
|
5023
4650
|
style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8px' }
|
|
5024
4651
|
},
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
4652
|
+
_h('div', { style: { fontWeight: '600', fontSize: '14px' } }, `🚀 ${T_KEY(t, 'updater.title')}`),
|
|
4653
|
+
_h('div', { style: { display: 'flex', gap: '8px' } },
|
|
4654
|
+
_h('button', {
|
|
5028
4655
|
type: 'button',
|
|
5029
4656
|
className: 'dsh-cron-btn-secondary',
|
|
5030
4657
|
style: { padding: '4px 10px', fontSize: '12px' },
|
|
5031
4658
|
disabled: updateState.checking || updateState.updating,
|
|
5032
4659
|
onClick: checkUpdates
|
|
5033
4660
|
}, updateState.checking ? T_KEY(t, 'updater.checking') : T_KEY(t, 'updater.btnCheck')),
|
|
5034
|
-
updateState.updateAvailable ?
|
|
4661
|
+
updateState.updateAvailable ? _h('button', {
|
|
5035
4662
|
type: 'button',
|
|
5036
4663
|
className: 'dsh-cron-btn-primary',
|
|
5037
4664
|
style: { padding: '4px 10px', fontSize: '12px' },
|
|
@@ -5040,39 +4667,39 @@ onClick: runUpdate
|
|
|
5040
4667
|
}, updateState.updating ? T_KEY(t, 'updater.updating') : T_KEY(t, 'updater.btnUpdate', { version: updateState.latestVersion })) : null
|
|
5041
4668
|
)
|
|
5042
4669
|
),
|
|
5043
|
-
|
|
4670
|
+
_h('div', {
|
|
5044
4671
|
style: { fontSize: '12px', color: 'var(--dsw-alias-label-secondary, #999)', marginBottom: '8px' }
|
|
5045
4672
|
}, T_KEY(t, 'updater.desc')),
|
|
5046
|
-
|
|
4673
|
+
_h('div', {
|
|
5047
4674
|
style: { display: 'flex', alignItems: 'center', gap: '12px', fontSize: '13px' }
|
|
5048
4675
|
},
|
|
5049
|
-
|
|
4676
|
+
_h('span', { style: { color: 'var(--dsw-alias-label-secondary, #aaa)' } },
|
|
5050
4677
|
updateState.currentVersion ? T_KEY(t, 'updater.current', { version: updateState.currentVersion }) : ''
|
|
5051
4678
|
),
|
|
5052
|
-
updateState.checking ?
|
|
5053
|
-
updateState.updateAvailable ?
|
|
5054
|
-
updateState.currentVersion && !updateState.error && !updateState.checking ?
|
|
4679
|
+
updateState.checking ? _h('span', { className: 'dsh-cron-badge dsh-cron-badge-info' }, T_KEY(t, 'updater.checking')) :
|
|
4680
|
+
updateState.updateAvailable ? _h('span', { className: 'dsh-cron-badge dsh-cron-badge-warn' }, T_KEY(t, 'updater.available', { version: updateState.latestVersion })) :
|
|
4681
|
+
updateState.currentVersion && !updateState.error && !updateState.checking ? _h('span', { className: 'dsh-cron-badge dsh-cron-badge-ok' }, `✓ ${T_KEY(t, 'updater.upToDate')}`) : null
|
|
5055
4682
|
),
|
|
5056
|
-
updateState.notice ?
|
|
4683
|
+
updateState.notice ? _h('div', {
|
|
5057
4684
|
style: { marginTop: '8px', color: 'var(--dsw-alias-success)', fontSize: '12px' }
|
|
5058
4685
|
}, updateState.notice) : null,
|
|
5059
|
-
updateState.error ?
|
|
4686
|
+
updateState.error ? _h('div', {
|
|
5060
4687
|
style: { marginTop: '8px', color: 'var(--dsw-alias-error)', fontSize: '12px' }
|
|
5061
4688
|
}, updateState.error) : null
|
|
5062
4689
|
),
|
|
5063
|
-
|
|
5064
|
-
|
|
4690
|
+
_h('div', { style: { display: 'flex', gap: '8px', alignItems: 'center', flexWrap: 'wrap', marginTop: '4px' } },
|
|
4691
|
+
_h('button', {
|
|
5065
4692
|
type: 'submit',
|
|
5066
4693
|
className: 'dsh-cron-btn-primary',
|
|
5067
4694
|
style: { minWidth: '140px' }
|
|
5068
4695
|
}, saved ? T_KEY(t, 'settings.saved') : T_KEY(t, 'settings.save')),
|
|
5069
|
-
|
|
4696
|
+
_h('button', {
|
|
5070
4697
|
type: 'button',
|
|
5071
4698
|
className: 'dsh-cron-btn-secondary',
|
|
5072
4699
|
onClick: testTelegram,
|
|
5073
4700
|
disabled: testInfo?.loading
|
|
5074
4701
|
}, T_KEY(t, 'settings.testTelegram')),
|
|
5075
|
-
|
|
4702
|
+
_h('button', {
|
|
5076
4703
|
type: 'button',
|
|
5077
4704
|
className: 'dsh-cron-btn-secondary',
|
|
5078
4705
|
onClick: testKanban,
|
|
@@ -5297,9 +4924,9 @@ container.setAttribute('data-dsh-plugin', 'dsh-cron');
|
|
|
5297
4924
|
column.appendChild(container);
|
|
5298
4925
|
if (ReactDOM && typeof ReactDOM.createRoot === 'function') {
|
|
5299
4926
|
root = ReactDOM.createRoot(container);
|
|
5300
|
-
root.render(
|
|
4927
|
+
root.render(_h(ErrorBoundary, null, _h(CronScreen, { ctx, toggle, onClose: () => toggle.set(false), t: translate })));
|
|
5301
4928
|
} else if (ReactDOM && typeof ReactDOM.render === 'function') {
|
|
5302
|
-
ReactDOM.render(
|
|
4929
|
+
ReactDOM.render(_h(CronScreen, { ctx, toggle, onClose: () => toggle.set(false), t: translate }), container);
|
|
5303
4930
|
}
|
|
5304
4931
|
};
|
|
5305
4932
|
const applyActive = () => {
|
|
@@ -5367,7 +4994,7 @@ translate = ctx.locale.bind(NS);
|
|
|
5367
4994
|
}
|
|
5368
4995
|
const toggle = createToggle();
|
|
5369
4996
|
function SettingsCardWithBoundary(props) {
|
|
5370
|
-
return
|
|
4997
|
+
return _h(ErrorBoundary, null, CronSettingsCard(props));
|
|
5371
4998
|
}
|
|
5372
4999
|
const itemOk = registerIntoMount(ctx, 'plugins.item', {
|
|
5373
5000
|
name: 'plugins.item',
|
|
@@ -5406,7 +5033,7 @@ const cardSlot = cardOk ? 'settings.plugin.item' : undefined;
|
|
|
5406
5033
|
const chipSlot = chipOk ? 'conversation.session.header.utilities' : undefined;
|
|
5407
5034
|
function CronChip(props) {
|
|
5408
5035
|
const chipT = props.t || translate;
|
|
5409
|
-
return
|
|
5036
|
+
return _h('button', {
|
|
5410
5037
|
type: 'button',
|
|
5411
5038
|
style: { background: 'none', border: 'none', color: 'var(--dsw-alias-label-secondary, #999)', cursor: 'pointer', padding: '4px', display: 'inline-flex', alignItems: 'center' },
|
|
5412
5039
|
title: T_KEY(chipT, 'chip.title'),
|