update: reactivity updates.

This commit is contained in:
ItzNotABug
2024-10-10 20:10:37 +05:30
parent 81f1713b99
commit 8eb52603aa
4 changed files with 23 additions and 4 deletions
+1
View File
@@ -184,6 +184,7 @@ export type OrganizationUsage = {
deploymentsStorageTotal: number;
executionsMBSecondsTotal: number;
buildsMBSecondsTotal: number;
backupsStorageTotal: number;
storageTotal: number;
users: Array<Models.Metric>;
usersTotal: number;
@@ -283,7 +283,7 @@
<Heading tag="h6" size="7">Storage</Heading>
<p class="text">
Calculated for all your files, deployments, builds and databases. While in beta, only
Calculated for all your files, deployments, builds, databases and backups. While in beta, only
file storage is counted against your plan limits.
</p>
@@ -301,6 +301,14 @@
label: `${Math.round(bytesToSize(data.organizationUsage.filesStorageTotal, 'GB') * 100) / 100}GB`
}
},
{
size: bytesToSize(data.organizationUsage.backupsStorageTotal, 'GB'),
color: '#FF6F61',
tooltip: {
title: 'Backups storage',
label: `${Math.round(bytesToSize(data.organizationUsage.backupsStorageTotal, 'GB') * 100) / 100}MB`
}
},
{
size: bytesToSize(data.organizationUsage.deploymentsStorageTotal, 'GB'),
color: '#7C67FE',
@@ -353,7 +361,7 @@
{#if data.organizationUsage.storageTotal}
{@const totalGbHours = mbSecondsToGBHours(
data.organizationUsage.executionsMBSecondsTotal +
data.organizationUsage.buildsMBSecondsTotal
data.organizationUsage.buildsMBSecondsTotal
)}
{@const progressBarStorageDate = [
{
@@ -22,6 +22,7 @@ export const load: PageLoad = async ({ params, parent }) => {
filesStorageTotal: null,
buildsStorageTotal: null,
deploymentsStorageTotal: null,
backupsStorageTotal: null,
executions: null,
executionsTotal: null,
projects: null,
@@ -31,7 +31,8 @@
$: storage =
data.usage.filesStorageTotal +
data.usage.deploymentsStorageTotal +
data.usage.buildsStorageTotal;
data.usage.buildsStorageTotal +
data.usage.backupsStorageTotal;
const tier = data?.currentInvoice?.plan ?? $organization?.billingPlan;
const plan = tierToPlan(tier).name;
@@ -267,7 +268,7 @@
<Heading tag="h6" size="7">Storage</Heading>
<p class="text">
Calculated for all your files, deployments, builds and databases. While in beta, only
Calculated for all your files, deployments, builds, databases and backups. While in beta, only
file storage is counted against your plan limits.
</p>
@@ -283,6 +284,14 @@
label: `${Math.round(bytesToSize(data.usage.filesStorageTotal, 'MB') * 100) / 100}MB`
}
},
{
size: bytesToSize(data.usage.backupsStorageTotal, 'MB'),
color: '#FF6F61',
tooltip: {
title: 'Backups storage',
label: `${Math.round(bytesToSize(data.usage.backupsStorageTotal, 'MB') * 100) / 100}MB`
}
},
{
size: bytesToSize(data.usage.deploymentsStorageTotal, 'MB'),
color: '#7C67FE',