feat: F健康cron来源标记+开发原则横幅——pipelines加source字段(hermes/system_crontab),扫描系统crontab的MoFin任务标红'系统cron(违规)',顶部横幅'禁止系统crontab部署自动任务统一hermes'+违规统计
This commit is contained in:
@@ -347,7 +347,16 @@ function renderPipelineTable(pipelines) {
|
||||
['monitor', '🩺 监控运维层', '健康检查/审计/备份/推送/自修复'],
|
||||
];
|
||||
const selStyle = 'background:#21262d;color:#c9d1d9;border:1px solid #30363d;border-radius:4px;padding:5px 8px;font-size:12px';
|
||||
let html = '<div style="display:flex;gap:8px;margin-bottom:8px;align-items:center">';
|
||||
// 2026-08-12 系统 crontab 违规统计(老莫:显著提示)
|
||||
const sysCnt = pipelines.filter(p => p.source === 'system_crontab').length;
|
||||
let html = '';
|
||||
// 显著横幅:开发原则——禁止系统 crontab 部署自动任务,统一 hermes
|
||||
html += `<div style="background:#3d1f1f;border:1px solid #f85149;border-left:4px solid #f85149;border-radius:6px;padding:10px 14px;margin-bottom:12px">` +
|
||||
`<div style="font-weight:bold;color:#f85149;font-size:14px">🚫 开发原则(强制):自动任务必须部署在 hermes(position-analyst),严禁使用系统 crontab</div>` +
|
||||
`<div style="color:#d29922;font-size:12px;margin-top:4px">来源标记:✅ hermes(合规)| ⚠️ 系统cron(违规,需迁移)。当前检测到 <strong>${sysCnt}</strong> 个系统 crontab 部署的 MoFin 任务。</div>` +
|
||||
(sysCnt > 0 ? `<div style="color:#f85149;font-size:12px;margin-top:2px">⚠️ 存在违规系统 cron,请迁移到 hermes 后从系统 crontab 移除(统一体系,避免新旧一起跑)。</div>` : `<div style="color:#3fb950;font-size:12px;margin-top:2px">✅ 无违规系统 cron,体系统一。</div>`) +
|
||||
`</div>`;
|
||||
html += '<div style="display:flex;gap:8px;margin-bottom:8px;align-items:center">';
|
||||
html += '<input class="search-box" id="pipeSearch" placeholder="搜索流程..." oninput="filterPipes()" style="flex:1">';
|
||||
html += `<select id="pipeLayer" onchange="filterPipes()" style="${selStyle}">`;
|
||||
html += '<option value="all">全部层</option><option value="collect">📥 采集层</option><option value="process">⚙️ 加工层</option><option value="use">📊 使用层</option><option value="monitor">🩺 监控层</option></select>';
|
||||
@@ -367,10 +376,16 @@ function renderPipelineTable(pipelines) {
|
||||
const tagCls = p.status==='ok'?'ok':p.status==='error'?'error':'warn';
|
||||
const statusDisplay = p.last_run ? p.status : '待首次运行';
|
||||
const profileBadge = p.profile==='position-analyst' ? '📋' : '📦';
|
||||
// 2026-08-12 cron来源标记:系统 crontab 违规用红色警告(老莫要求显著提示)
|
||||
const isSys = p.source === 'system_crontab';
|
||||
const srcBadge = isSys
|
||||
? '<span style="color:#f85149;font-weight:bold">⚠️ 系统cron(违规)</span>'
|
||||
: '<span style="color:#3fb950">✅ hermes</span>';
|
||||
const rowStyle = isSys ? ' style="background:#2d1515;border-left:3px solid #f85149"' : '';
|
||||
const encName = encodeURIComponent(p.name || '');
|
||||
const encScript = encodeURIComponent(p.script || '');
|
||||
html += `<tr class="pipe-row" data-profile="${p.profile||'default'}" data-layer="${p.layer||'use'}" data-name="${(p.name||'').toLowerCase()}"><td>${p.name||p.script||'LLM'}</td>`;
|
||||
html += `<td style="font-size:11px">${profileBadge} ${p.profile||'?'}</td>`;
|
||||
html += `<tr class="pipe-row" data-profile="${p.profile||'default'}" data-layer="${p.layer||'use'}" data-name="${(p.name||'').toLowerCase()}"${rowStyle}><td>${p.name||p.script||'LLM'}</td>`;
|
||||
html += `<td style="font-size:11px">${srcBadge} <span style="color:#8b949e">${profileBadge}${p.profile||'?'}</span></td>`;
|
||||
html += `<td style="font-size:11px">${p.script||'LLM'}</td>`;
|
||||
html += `<td><span class="cron-tag ${tagCls}">${p.type||'cron'}</span></td>`;
|
||||
html += `<td style="font-size:11px">${p.schedule||'-'}</td>`;
|
||||
|
||||
Reference in New Issue
Block a user