mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 00:48:00 +00:00
fix(ui): status pie — drop center number, carve clean donut hole
- remove the total-req number drawn in the pie center - carve a center hole (donut) with the card background for a cleaner look; total still shown in the card header caption and legend - deployed (bak .bak.20260811o), server active
This commit is contained in:
@ -979,14 +979,11 @@ function drawStatusChart(rows) {
|
|||||||
ctx.fill();
|
ctx.fill();
|
||||||
a0 += sweep;
|
a0 += sweep;
|
||||||
});
|
});
|
||||||
// center label = total
|
// carve a clean center hole (donut) instead of a solid pie with a number
|
||||||
ctx.fillStyle = 'var(--fg)';
|
ctx.beginPath();
|
||||||
ctx.font = '700 16px ui-monospace,Menlo,Consolas,monospace';
|
ctx.arc(cx, cy, Math.max(r * 0.45, 1), 0, Math.PI * 2);
|
||||||
ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
|
ctx.fillStyle = 'var(--card)';
|
||||||
ctx.fillText(fmtN(total), cx, cy - 7);
|
ctx.fill();
|
||||||
ctx.fillStyle = 'var(--muted)';
|
|
||||||
ctx.font = '10px ui-monospace,Menlo,Consolas,monospace';
|
|
||||||
ctx.fillText(t('thReqs'), cx, cy + 9);
|
|
||||||
}
|
}
|
||||||
function paintKeyTable(rows, keyNames) {
|
function paintKeyTable(rows, keyNames) {
|
||||||
const el = $('#tb-key'); if (!el) return;
|
const el = $('#tb-key'); if (!el) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user