-
- If you exceed the limits of the Starter plan, services for your projects may be
- disrupted. Upgrade for greater capacity.
-
+ {#if $organization.billingPlan === 'tier-2'}
+
+ On the Scale plan, you'll be charged only for any usage that exceeds the thresholds
+ per resource listed below.
+
+ {:else}
+
+ If you exceed the limits of the {tier} plan, services for your projects may be disrupted.
+ .
+
+ {/if}
Usage period:
@@ -51,16 +51,23 @@
-
+
+
Users
The total number of users across all projects in your organization.
-
+
@@ -75,7 +82,7 @@
+ used={data.organizationUsage.executions} />
@@ -87,20 +94,10 @@
-
-
-
-
-
- Realtime connections
-
-
- Calculated for all realtime concurrent connections and messages sent to all projects in
- your organization.
-
-
-
-
+
@@ -108,3 +105,5 @@
Metrics are estimates updated every 24 hours and may not accurately reflect your invoice.
+
+
diff --git a/src/routes/console/organization-[organization]/usage/[[period]]/+page.ts b/src/routes/console/organization-[organization]/usage/[[period]]/+page.ts
index 7273b97b7..52cbd4460 100644
--- a/src/routes/console/organization-[organization]/usage/[[period]]/+page.ts
+++ b/src/routes/console/organization-[organization]/usage/[[period]]/+page.ts
@@ -5,6 +5,6 @@ export const load: PageLoad = async ({ params }) => {
const usage = await sdk.forConsole.billing.listUsage(params.organization);
console.log(usage);
return {
- aggregationList: usage
+ organizationUsage: usage
};
};
diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte
index 1783fdd66..5189d0eee 100644
--- a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte
+++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.svelte
@@ -57,10 +57,7 @@
const projectId = $page.params.project;
const bucketId = $page.params.bucket;
- const totalStorage = data.aggregationList.aggregations.reduce((acc, curr) => {
- acc += curr.usageStorage;
- return acc;
- }, 0);
+ const usedStorage = data.oraganizationUsage.storage;
const getPreview = (fileId: string) =>
sdk.forProject.storage.getFilePreview(bucketId, fileId, 32, 32).toString() + '&mode=admin';
@@ -96,7 +93,7 @@
title="Files"
serviceId="storage"
isFlex={false}
- total={totalStorage}
+ total={usedStorage}
buttonDisabled={$readOnly.storage}>
@@ -127,7 +124,7 @@
- You are limited to {limit} of storage on the {tier} plan.
+ You are limited to {limit} GB of storage on the {tier} plan.
diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.ts b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.ts
index 27a355cab..a2ead3698 100644
--- a/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.ts
+++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/+page.ts
@@ -4,7 +4,7 @@ import { getLimit, getPage, getSearch, pageToOffset } from '$lib/helpers/load';
import { Dependencies, PAGE_LIMIT } from '$lib/constants';
import type { PageLoad } from './$types';
import { isCloud } from '$lib/system';
-import type { AggregationList } from '$lib/sdk/billing';
+import type { OrganizationUsage } from '$lib/sdk/billing';
import { organization } from '$lib/stores/organization';
import { get } from 'svelte/store';
@@ -14,9 +14,9 @@ export const load: PageLoad = async ({ params, depends, url, route }) => {
const search = getSearch(url);
const limit = getLimit(url, route, PAGE_LIMIT);
const offset = pageToOffset(page, limit);
- let aggregationList: AggregationList = null;
+ let oraganizationUsage: OrganizationUsage = null;
if (isCloud && get(organization)) {
- aggregationList = await sdk.forConsole.billing.listUsage(get(organization)?.$id);
+ oraganizationUsage = await sdk.forConsole.billing.listUsage(get(organization)?.$id);
}
return {
@@ -28,6 +28,6 @@ export const load: PageLoad = async ({ params, depends, url, route }) => {
[Query.limit(limit), Query.offset(offset), Query.orderDesc('')],
search
),
- aggregationList
+ oraganizationUsage
};
};
diff --git a/src/routes/console/wizard/cloudOrganizationChangeTier/step1.svelte b/src/routes/console/wizard/cloudOrganizationChangeTier/step1.svelte
index c4506f966..eeb51b388 100644
--- a/src/routes/console/wizard/cloudOrganizationChangeTier/step1.svelte
+++ b/src/routes/console/wizard/cloudOrganizationChangeTier/step1.svelte
@@ -30,9 +30,9 @@
}
async function checkOverUsage() {
- const aggregationList = await sdk.forConsole.billing.listUsage($organization.$id);
+ const oraganizationUsage = await sdk.forConsole.billing.listUsage($organization.$id);
- console.log(aggregationList);
+ console.log(oraganizationUsage);
}
onMount(async () => {