You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Savings History KPI units wrong ($/hr vs $/mo) + add Hourly/Monthly/Yearly dropdown #750
On the Purchases page "Savings History" widget, the three KPIs display with inconsistent and seemingly-wrong units:
Period Savings: $1.15 (no unit suffix)
Avg Hourly Savings: $1.15/hr
Peak Savings: $1.15/hr
Two issues:
Peak Savings is labeled /hr but the underlying value is monthly. With the single committed purchase being a t4g.nano AWS ec2 reservation, the monthly saving is ~$1.15/month. $1.15/hr would be ~$840/month -- not what's actually happening. So the unit label is wrong.
Avg Hourly Savings is also labeled /hr but is likely the same monthly number. Same coincidence of value as Peak.
Feature ask
Add a dropdown on the Savings History widget to switch the view between Hourly / Monthly / Yearly, and have all three KPIs (Period / Avg / Peak) re-render in the selected unit.
Acceptance criteria
Peak Savings shows the correct unit suffix matching the underlying value (likely /mo for the current data).
Avg savings shows the correct unit suffix matching the underlying value.
A dropdown lets the user switch all three KPIs to Hourly / Monthly / Yearly consistently.
The chart period selector (currently 7d / 30d / 90d / All) is independent of this unit selector.
Files likely involved
frontend/src/modules/savings-history.ts (KPI rendering + period selector)
internal/api/analytics_postgres.go or wherever the Period / Avg / Peak values are computed -- confirm whether the API already returns multiple unit variants or only one.
Verified shipped: PR #758 (commit 82b5d38, merged 2026-05-27) is in feat/multicloud-web-frontend. savings-history.ts now shows $/mo units and adds Hourly/Monthly/Yearly toggle; tests added in savings-history.test.ts.
Activity
cristim
cristim commentedon May 28, 2026
Verified shipped: PR #758 (commit 82b5d38, merged 2026-05-27) is in feat/multicloud-web-frontend. savings-history.ts now shows $/mo units and adds Hourly/Monthly/Yearly toggle; tests added in savings-history.test.ts.