update 2026-09-10 13:32
This commit is contained in:
1 parent
65ab3a9ae2
commit
feb3517b1a
6 files changed
+64
-45
No files matched your search
+13
-3
@@ -148,14 +148,16 @@
|
||||
const state = stage.state || 'wait';
|
||||
const total = Number(stage.total || 0);
|
||||
const current = Number(stage.current || 0);
|
||||
const pct = total > 0 ? Math.min(100, Math.round((current / total) * 100)) : (state === 'ok' ? 100 : 0);
|
||||
const known = total > 0;
|
||||
const pct = known ? Math.min(100, Math.round((current / total) * 100)) : (state === 'ok' ? 100 : 0);
|
||||
const progressText = known ? `${current}/${total} · ${pct}%` : '实际计数未提供';
|
||||
return `
|
||||
<div class="stage-item">
|
||||
<div class="stage-head">
|
||||
<div class="stage-name">${label}</div>
|
||||
${statusTag(state)}
|
||||
</div>
|
||||
<div class="muted">${state === 'ok' ? '耗时' : '已用'}: ${fmtSeconds(stage.elapsed_seconds || 0)} · ${current}/${total || 1}</div>
|
||||
<div class="muted">${state === 'ok' ? '耗时' : '已用'}: ${fmtSeconds(stage.elapsed_seconds || 0)} · ${progressText}</div>
|
||||
<div class="percent-line"><div class="percent-fill" style="width:${pct}%"></div></div>
|
||||
</div>
|
||||
`;
|
||||
@@ -180,6 +182,14 @@
|
||||
state: data.pending_github ? 'running' : 'wait',
|
||||
meta: `累计 ${summary.github_total || 0} 批 · 已提交 ${summary.github_submitted || 0} · 已消费 ${summary.github_consumed || 0}`
|
||||
});
|
||||
const details = (data.probe_details || []).map(item => {
|
||||
const candidate = item.candidate || {};
|
||||
const result = item.result || {};
|
||||
const resultText = result.count == null ? '暂无回传' : `${result.count} 条结果 · ${result.status || '未知'}`;
|
||||
const progress = item.progress || {};
|
||||
const progressText = progress.total ? `处理中 ${progress.processed}/${progress.total},剩余 ${progress.remaining},${progress.status}` : '暂无处理中进度';
|
||||
return `<div class="muted" style="margin-top:6px">${item.label}: ${progressText}<br>候选 ${candidate.count || 0} 条 · ${resultText}<br>候选批次 ${candidate.batch_id || '-'} · 回传批次 ${result.batch_id || '-'}<br>结果更新时间 ${result.mtime || '暂无'} · 进度更新时间 ${progress.updated_at || '暂无'}</div>`;
|
||||
}).join('');
|
||||
return items.map(item => `
|
||||
<div class="probe-item">
|
||||
<div class="probe-head">
|
||||
@@ -188,7 +198,7 @@
|
||||
</div>
|
||||
<div class="muted" style="margin-top:8px">${item.value}</div>
|
||||
<div class="muted">${item.extra}</div>
|
||||
<div class="muted" style="margin-top:6px; color:#2d6cdf; font-weight:600">${item.meta}</div>
|
||||
<div class="muted" style="margin-top:6px; color:#2d6cdf; font-weight:600">${item.meta}</div>${details}
|
||||
</div>
|
||||
`).join('');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user