INNER CODE UNIT · JavaScript
failureLine
rootSunc/CNEquity · frontend/src/main.js:136
function failureLine(message) {
const line = String(message || "").split("\n")[0];
const cut = line.indexOf(" For more information check:");
return cut === -1 ? line : line.slice(0, cut).trimEnd();
}
// --- overview ---------------------------------------------------------------
const kpi = (n, label, note = "", tone = "") =>
`<article class="metric-card${tone ? ` metric-card-${tone}` : ""}"><div class="metric-label">${label}</div>
<div class="metric-value">${n}</div>${note ? `<div class="metric-note">${note}</div>` : ""}</article>`;
/** One tone map for every status word the API hands the console.
*
* Batch statuses, dataset freshness and audit severities were being coloured
* by three separate inline ternaries that had already drifted: `failed` was
* orange as a pill and red as a chip, in the same table row. They are one
* vocabulary; keep one table. An unlisted word falls through to the neutral