diff --git a/package.json b/package.json index 428927dc57..348f13dbee 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "1.4.7", + "@appwrite.io/console": "1.5.1", "@appwrite.io/pink": "0.25.0", "@appwrite.io/pink-icons": "0.25.0", "@popperjs/core": "^2.11.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a31a13a9ef..911bb0c01e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@appwrite.io/console': - specifier: 1.4.7 - version: 1.4.7 + specifier: 1.5.1 + version: 1.5.1 '@appwrite.io/pink': specifier: 0.25.0 version: 0.25.0 @@ -199,8 +199,8 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@1.4.7': - resolution: {integrity: sha512-5zx+c5nWRm/UJNxgtOi4vj1pYW+wusfnOX2hqEGDLLuNZRc1rViYRefNuezosp5SPtjClCIYn9TGuFlz/XLwhw==} + '@appwrite.io/console@1.5.1': + resolution: {integrity: sha512-H0fkBprsxXjOhbrE+MqXt1e4Gx4QeRdHuvMs7UxqGr2fAVEqh4ez2yk40A0ZSQvvN+rqLduoItMHQFl+sCPbtQ==} '@appwrite.io/pink-icons@0.25.0': resolution: {integrity: sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q==} @@ -3834,7 +3834,7 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@1.4.7': {} + '@appwrite.io/console@1.5.1': {} '@appwrite.io/pink-icons@0.25.0': {} diff --git a/src/lib/charts/bar.svelte b/src/lib/charts/bar.svelte index a447492d27..9d19e36053 100644 --- a/src/lib/charts/bar.svelte +++ b/src/lib/charts/bar.svelte @@ -13,7 +13,6 @@ {formatted} series={series.map((s) => { s.type = 'bar'; - s.stack = 'total'; s.barMaxWidth = 6; s.itemStyle = { borderRadius: [10, 10, 0, 0] diff --git a/src/lib/charts/index.ts b/src/lib/charts/index.ts index c73108a134..488756ecb5 100644 --- a/src/lib/charts/index.ts +++ b/src/lib/charts/index.ts @@ -1,2 +1,3 @@ export { default as BarChart } from './bar.svelte'; export { default as LineChart } from './line.svelte'; +export { default as Legend, type LegendData } from './legend.svelte'; diff --git a/src/lib/charts/legend.svelte b/src/lib/charts/legend.svelte new file mode 100644 index 0000000000..f8ddc63558 --- /dev/null +++ b/src/lib/charts/legend.svelte @@ -0,0 +1,23 @@ + + + + +
Total {title.toLocaleLowerCase()}
+ + +No data to show
@@ -193,6 +198,67 @@ ++ The total number of database reads and writes across all projects in your organization. +
+No data to show
+@@ -430,6 +498,7 @@ {/if}
diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts
index 4138acfa16..90d64d7d12 100644
--- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts
+++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts
@@ -29,7 +29,11 @@ export const load: PageLoad = async ({ params, parent }) => {
executionsMBSecondsTotal: null,
buildsMBSecondsTotal: null,
authPhoneTotal: null,
- authPhoneEstimate: null
+ authPhoneEstimate: null,
+ databasesReads: null,
+ databasesWrites: null,
+ databasesReadsTotal: null,
+ databasesWritesTotal: null
}
};
}
diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte
index 8542fe75c5..7bd50227c2 100644
--- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte
+++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte
@@ -15,14 +15,26 @@
import type { OrganizationUsage } from '$lib/sdk/billing';
import { base } from '$app/paths';
import { canSeeProjects } from '$lib/stores/roles';
+ import { onMount } from 'svelte';
+
+ type Metric =
+ | 'users'
+ | 'storage'
+ | 'bandwidth'
+ | 'executions'
+ | 'authPhoneTotal'
+ | 'databasesReads'
+ | 'databasesWrites';
- type Metric = 'users' | 'storage' | 'bandwidth' | 'executions' | 'authPhoneTotal';
type Estimate = 'authPhoneEstimate';
+ type DatabaseOperationMetric = Extract Total database reads and writes in your project. No data to show