fix: 功能树只显示position-analyst(知微)的cron,default(莫荷)的cron不混入
This commit is contained in:
@@ -48,7 +48,7 @@ td.wrap{white-space:normal;font-size:11px;max-width:200px}
|
||||
<div class="summary" id="summary">加载中...</div>
|
||||
<div class="tabs">
|
||||
<div class="tab active" onclick="switchTab(0)">🌳 功能树</div>
|
||||
<div class="tab" onclick="switchTab(1)">🔧 全部流程/Cron (77)</div>
|
||||
<div class="tab" onclick="switchTab(1)">🔧 全部流程/Cron</div>
|
||||
<div class="tab" onclick="switchTab(2)">🗃️ 数据实体</div>
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,7 @@ function switchTab(idx) {
|
||||
}
|
||||
|
||||
function renderFeatureTree(tree) {
|
||||
let html = '<table><thead><tr><th style="width:50%">功能模块</th><th>类型</th><th>调度</th><th>状态</th><th>最后运行</th></tr></thead><tbody>';
|
||||
let html = '<table><thead><tr><th style="width:40%">功能模块</th><th>来源</th><th>类型</th><th>调度</th><th>状态</th><th>最后运行</th></tr></thead><tbody>';
|
||||
function walk(node, depth) {
|
||||
const indent = 'style="padding-left:'+(depth*20+8)+'px"';
|
||||
const cls = node.status || 'ok';
|
||||
@@ -76,17 +76,19 @@ function renderFeatureTree(tree) {
|
||||
if (pipes.length === 0) {
|
||||
// 无对应cron的功能节点
|
||||
html += `<tr><td ${indent}><span class="badge ${cls}"></span><strong>${node.label}</strong><span class="cron-detail">(纯逻辑节点)</span></td>`;
|
||||
html += `<td>-</td><td>-</td><td class="pipeline-${cls==='ok'?'ok':'warn'}">${cls}</td><td>-</td></tr>`;
|
||||
html += `<td>-</td><td>-</td><td>-</td><td class="pipeline-${cls==='ok'?'ok':'warn'}">${cls}</td><td>-</td></tr>`;
|
||||
} else {
|
||||
// 有对应cron的节点
|
||||
pipes.forEach((p, i) => {
|
||||
const indent2 = i===0 ? indent : 'style="padding-left:'+(depth*20+32)+'px"';
|
||||
const tagCls = p.status==='ok'?'ok':p.status==='error'?'error':'warn';
|
||||
const profileBadge = p.profile==='position-analyst' ? '📋' : '📦';
|
||||
if (i===0) {
|
||||
html += `<tr><td ${indent2}><span class="badge ${cls}"></span><strong>${node.label}</strong></td>`;
|
||||
} else {
|
||||
html += `<tr><td ${indent2}><span style="color:#30363d">└</span> ${p.name||p.script||'LLM'}</td>`;
|
||||
}
|
||||
html += `<td style="font-size:11px">${profileBadge} ${p.profile||'?'}</td>`;
|
||||
html += `<td><span class="cron-tag ${tagCls}">${p.type||'LLM'}</span></td>`;
|
||||
html += `<td style="font-size:11px">${p.schedule||'-'}</td>`;
|
||||
html += `<td class="pipeline-${tagCls}">${p.status}</td>`;
|
||||
@@ -103,13 +105,15 @@ function renderFeatureTree(tree) {
|
||||
|
||||
function renderPipelineTable(pipelines) {
|
||||
let html = '<input class="search-box" id="pipeSearch" placeholder="搜索流程..." oninput="filterPipes()">';
|
||||
html += '<table><thead><tr><th>名称</th><th>脚本/LLM</th><th>类型</th><th>调度</th><th>状态</th><th>最后运行</th></tr></thead><tbody id="pipeBody">';
|
||||
html += '<table><thead><tr><th>名称</th><th>来源</th><th>脚本/LLM</th><th>类型</th><th>调度</th><th>状态</th><th>最后运行</th></tr></thead><tbody id="pipeBody">';
|
||||
pipelines.forEach(p => {
|
||||
const tagCls = p.status==='ok'?'ok':p.status==='error'?'error':'warn';
|
||||
const statusDisplay = p.last_run ? p.status : '待首次运行';
|
||||
const profileBadge = p.profile==='position-analyst' ? '📋' : '📦';
|
||||
html += `<tr class="pipe-row"><td>${p.name||p.script||'LLM'}</td>`;
|
||||
html += `<td style="font-size:11px">${profileBadge} ${p.profile||'?'}</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><span class="cron-tag ${tagCls}">${p.type||'cron'}</span></td>`;
|
||||
html += `<td style="font-size:11px">${p.schedule||'-'}</td>`;
|
||||
html += `<td class="pipeline-${tagCls}">${statusDisplay}</td>`;
|
||||
html += `<td style="font-size:11px">${p.last_run||'-'}</td></tr>`;
|
||||
|
||||
Reference in New Issue
Block a user