-
Notifications
You must be signed in to change notification settings - Fork 235
feat: add Premium Geo DB addon to project settings #2981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
470b047
5954b75
7e73d36
0e53210
66e615e
afb13fc
13b0478
0cba797
6fc000f
304142c
67566db
e5a62c5
a54c530
4376702
da68f75
0889ace
6fbdd43
1ba8ebd
f8d2816
afecbd2
60838e0
279737d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -295,10 +295,6 @@ | |
| }; | ||
|
|
||
| // addons (additional members, projects, etc.) | ||
| const billingAddonNames: Record<string, string> = { | ||
| addon_baa: 'HIPAA BAA' | ||
| }; | ||
|
|
||
| const addons = (currentAggregation?.resources || []) | ||
| .filter( | ||
| (r) => | ||
|
|
@@ -315,8 +311,8 @@ | |
| ? 'Additional members' | ||
| : addon.resourceId === 'projects' | ||
| ? 'Additional projects' | ||
| : (billingAddonNames[addon.resourceId] ?? | ||
| `${addon.resourceId} overage (${formatNum(addon.value)})`), | ||
| : addon.name || | ||
| `${addon.resourceId} overage (${formatNum(addon.value)})`, | ||
| usage: '', | ||
| price: formatCurrency(addon.amount) | ||
| }, | ||
|
|
@@ -462,6 +458,18 @@ | |
| priceFormatter: ({ amount }) => formatCurrency(amount), | ||
| includeProgress: false | ||
| }), | ||
| ...resources | ||
| .filter((r) => r.resourceId?.startsWith('addon_') && (r.amount ?? 0) > 0) | ||
| .map((addon) => | ||
| createRow({ | ||
| id: `addon-${addon.resourceId}`, | ||
| label: addon.name || addon.resourceId, | ||
| resource: addon, | ||
| usageFormatter: ({ value }) => formatNum(value), | ||
| priceFormatter: ({ amount }) => formatCurrency(amount), | ||
| includeProgress: false | ||
| }) | ||
| ), | ||
|
Comment on lines
+461
to
+472
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The top-level Before shipping, confirm whether the cloud billing API places project-level addon charges exclusively in |
||
| createRow({ | ||
| id: 'usage-details', | ||
| label: `<a href="${base}/project-${String(projectData.region || 'default')}-${projectData.$id}/settings/usage" style="text-decoration: underline; color: var(--fgcolor-accent-neutral);">Usage details</a>`, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.