MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / normalizeStatus

Function normalizeStatus

static/js/selfcheck.js:21–30  ·  view source on GitHub ↗
(status)

Source from the content-addressed store, hash-verified

19}
20
21function normalizeStatus(status) {
22 const text = String(status || '').toLowerCase();
23 if (text === 'completed' || text === 'pass') return { cls: 'completed', text: '通过' };
24 if (text === 'running') return { cls: 'running', text: '运行中' };
25 if (text === 'pending') return { cls: 'pending', text: '等待中' };
26 if (text === 'warn') return { cls: 'warning', text: '警告' };
27 if (text === 'fail' || text === 'failed') return { cls: 'failed', text: '失败' };
28 if (text === 'skip') return { cls: 'disabled', text: '跳过' };
29 return { cls: 'disabled', text: text || '-' };
30}
31
32function statusBadge(status) {
33 const normalized = normalizeStatus(status);

Callers 3

statusBadgeFunction · 0.85
renderRuntimeFunction · 0.85
renderRunDetailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected