fix(webui): exclude disabled accounts from quota stats and charts

- Update data-store.js to filter out disabled accounts in computeQuotaRows()
- Update data-store.js to filter out disabled accounts in getUnfilteredQuotaData()
- Ensures Global Quota average and Account Distribution only reflect active accounts

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Haxe18
2026-01-25 20:00:27 +01:00
parent 683ca41480
commit 4a9bb3440f

View File

@@ -237,6 +237,7 @@ document.addEventListener('alpine:init', () => {
let minResetTime = null; let minResetTime = null;
this.accounts.forEach(acc => { this.accounts.forEach(acc => {
if (acc.enabled === false) return;
if (this.filters.account !== 'all' && acc.email !== this.filters.account) return; if (this.filters.account !== 'all' && acc.email !== this.filters.account) return;
const limit = acc.limits?.[modelId]; const limit = acc.limits?.[modelId];
@@ -352,6 +353,7 @@ document.addEventListener('alpine:init', () => {
const quotaInfo = []; const quotaInfo = [];
// Use ALL accounts (no account filter) // Use ALL accounts (no account filter)
this.accounts.forEach(acc => { this.accounts.forEach(acc => {
if (acc.enabled === false) return;
const limit = acc.limits?.[modelId]; const limit = acc.limits?.[modelId];
if (!limit) return; if (!limit) return;
const pct = limit.remainingFraction !== null ? Math.round(limit.remainingFraction * 100) : 0; const pct = limit.remainingFraction !== null ? Math.round(limit.remainingFraction * 100) : 0;