shadcn.io is not affiliated with official shadcn/ui
API Usage Dashboard Block for React
A month's 10M-call quota as a segmented bar by consumer and a running total against an even pace, with the projected run-out day and a cap field per consumer that moves it.
Installation
Overview
See who is burning the quota and when it runs out, with this API usage panel for React with Base UI. A hairline frame with a plus mark on each corner opens with a segmented bar of the month's 10M calls by consumer (Web app, Mobile app, Partner feed, Nightly sync and Others) in foreground weights, then a running-total chart against a straight pace line, a dashed projection and a diamond on the day the quota is reached. Each consumer row has a Number Input for a monthly cap that reads "No cap" until you set one: a cap stops that consumer's projection at its limit and moves the date. A Native Select in the header switches between October, which is open, and September, which is closed and only reads, and a Shine Button saves the caps. It's built from Number Input, Native Select, Button, Shine Button and Guides. For developer consoles and metering pages.
FAQ
How do I fill it with my usage?
Edit CONSUMERS and the periods. Each period has daily: calls made by each consumer on each elapsed day, the number of days in the month, a month and whether it is open. The bar, the chart, the shares, the projection and the header sentence are all worked out from those, and QUOTA is the plan's allowance.
How is the run-out day projected?
For each consumer, the mean of its last seven days is held flat for every remaining day. A consumer with a cap stops adding calls once it reaches the cap. The projection sums them day by day and reports the first day the total reaches the quota, or says the quota holds to month end. The note under the chart says the same thing.
Do the caps do anything?
They change the projection and nothing else: set a cap on the Partner feed and the dashed line bends, the month-end figure for that row drops and the run-out day moves later. Save caps keeps them in this page and says so; nothing is enforced. Caps are typed as whole calls, and anything else is tidied when the field loses focus.
Related
- Pro
A sunset readiness panel for an old API version: a countdown bar, a three-condition gate worked out from the data, the consumers still calling v1 with a Migrated switch each, and a Confirm sunset button that stays inert until the gate passes.
- Pro
Eight endpoints against six probe locations as a matrix of pass, slow and fail cells, with a slider for how many locations must fail before an endpoint counts as down, and a reading for the chosen one.
- Pro
Nine endpoints ranked by p50, p95 or p99 with a range bar on one 0 to 1,000 ms scale, an SLO slider that marks the ones over it, and a histogram of the chosen endpoint's requests.
- Pro
A heatmap of eight endpoints by the last 12 hours in a five-step ramp with the average ms in each cell, an SLA slider that rings the cells over it, and a list of the slow endpoints with their trend.
- Pro
Errors per hour as a row of 24 selectable columns with a line at 60 an hour, the chosen hour's six error groups ranked by count with a Mute and Undo for each, and a sample stack trace for the group you pick.
- Pro
A day of gateway calls as 24 stacked hourly columns by status family, a toggle to show any combination of 2xx, 3xx, 4xx and 5xx, totals with the change on yesterday, and the top endpoints for the families on.