This commit is contained in:
2026-06-27 14:31:45 +08:00
parent 1df4010acc
commit 9828b1d44c
16 changed files with 323 additions and 23 deletions

View File

@@ -147,7 +147,7 @@ const App = {
const chips = (run.metrics || [])
.map((m) => {
const val = run.metric_means ? run.metric_means[m] : null;
const cls = App.scoreClass(val);
const cls = App.scoreClass(m, val);
const text = val === null || val === undefined ? "n/a" : val.toFixed(2);
return `<span class="metric-chip" title="${App.escape(m)}">${App.escape(App.shortMetric(m))} <b class="${cls}">${text}</b></span>`;
})
@@ -174,11 +174,8 @@ const App = {
if (btn) btn.disabled = false;
},
scoreClass(value) {
if (value === null || value === undefined) return "na";
if (value >= 0.8) return "good";
if (value >= 0.65) return "warn";
return "bad";
scoreClass(metricName, value) {
return MetricPresenter.scoreClass(metricName, value);
},
shortMetric(name) {