mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 17:07:59 +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();
|
||||
a0 += sweep;
|
||||
});
|
||||
// center label = total
|
||||
ctx.fillStyle = 'var(--fg)';
|
||||
ctx.font = '700 16px ui-monospace,Menlo,Consolas,monospace';
|
||||
ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
|
||||
ctx.fillText(fmtN(total), cx, cy - 7);
|
||||
ctx.fillStyle = 'var(--muted)';
|
||||
ctx.font = '10px ui-monospace,Menlo,Consolas,monospace';
|
||||
ctx.fillText(t('thReqs'), cx, cy + 9);
|
||||
// carve a clean center hole (donut) instead of a solid pie with a number
|
||||
ctx.beginPath();
|
||||
ctx.arc(cx, cy, Math.max(r * 0.45, 1), 0, Math.PI * 2);
|
||||
ctx.fillStyle = 'var(--card)';
|
||||
ctx.fill();
|
||||
}
|
||||
function paintKeyTable(rows, keyNames) {
|
||||
const el = $('#tb-key'); if (!el) return;
|
||||
|
||||
Reference in New Issue
Block a user