Skip to content

Show usage against the plan limit for the current billing period #8185

Description

@talissoncosta

Goal. Someone opening Usage can tell where they stand against their plan, in the period they are billed on, without doing any arithmetic.

Problem. The page reports totals for whichever window you picked. It never says which billing period you are in, when it resets, or how close you are to the plan limit.

Scope

  • default to the current billing period, showing its range and the reset date
  • "% of plan consumed" as the headline, and as a tile
  • the usage bar, with the notification markers on it
  • cumulative usage against the plan limit, with the limit drawn as a ceiling
  • the slot under the meter for the line that explains the numbers. Its wording is a projection (Show projected end-of-period usage #8188), an overage consequence (Build the over-limit and restricted states for the usage page #8187) or a grace note, so this issue builds the slot rather than the sentences

This covers the healthy and approaching states. Over limit and restricted are #8187.

Two cases to settle before it ships

  • free plans have no billing term
  • self-hosted has no billing data at all, so there is no limit to divide by

Neither should render a fraction with a missing denominator.

Done when

  • the page opens on the current billing period and names its reset date
  • an organisation under its limit sees its percentage, the limit line and the marker positions
  • free and self-hosted degrade to something sensible rather than breaking

Depends on the API returning the resolved period, which is not raised yet.

Image

Metadata

Metadata

Assignees

Labels

front-endIssue related to the React Front End Dashboard

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions