Files
llmapikey/components/admin/admin-stats-header.js
tiennm99 616f133989 feat: add gated admin console for api_keys registry (list/search/filter/revoke/mint)
- env-allowlist authz via ADMIN_GITHUB_USER_IDS on numeric provider_id (no migration)
- server-side re-gated revoke + manual-mint actions
- parameterized search/filter/paginate queries
- shared mint-key extraction (DRY) from generate-key
- notFound() for non-admins (404 never leaks route existence)
- 3 unit-test suites (authz/queries/integration)
2026-06-13 21:16:57 +07:00

23 lines
612 B
JavaScript

/**
* Registry summary header. `total`/`active`/`pending` are global counts (not
* scoped to the current search) so the header stays a stable overview while the
* table below reflects the active filter.
*
* @param {{ total: number, active: number, pending: number }} props
*/
export function AdminStatsHeader({ total, active, pending }) {
return (
<div className="panel stats">
<span>
<strong>{total}</strong> total
</span>
<span>
<strong>{active}</strong> active
</span>
<span>
<strong>{pending}</strong> pending
</span>
</div>
);
}