Merge pull request #1305 from appwrite/feat-1.6-last-minute

Separate build and deployment sizes
This commit is contained in:
Arman
2024-08-21 09:25:16 +02:00
committed by GitHub
7 changed files with 3359 additions and 4016 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
"e2e:ui": "playwright test tests/e2e --ui"
},
"dependencies": {
"@appwrite.io/console": "npm:matej-appwrite-console@0.6.13",
"@appwrite.io/console": "npm:matej-appwrite-console@0.6.17",
"@appwrite.io/pink": "0.25.0",
"@appwrite.io/pink-icons": "0.25.0",
"@popperjs/core": "^2.11.8",
+3290 -4004
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -16,7 +16,7 @@
let step = 1;
let error = '';
async function addAuthenticator(): Promise<URL> {
async function addAuthenticator(): Promise<string> {
type = await sdk.forConsole.account.createMfaAuthenticator(AuthenticatorType.Totp);
trackEvent(Submit.AccountAuthenticatorCreate);
@@ -58,7 +58,7 @@
style:background-repeat="no-repeat"
style:background-position="center"
style:background-size="contain">
<img alt="MFA QR Code" class="code" src={qr.toString()} />
<img alt="MFA QR Code" class="code" src={qr} />
</div>
<span class="with-separators eyebrow-heading-3">or</span>
@@ -77,7 +77,7 @@
title: 'Build time',
type: 'integer',
show: true,
width: 80,
width: 90,
elements: [
{
value: 15,
@@ -96,10 +96,10 @@
},
{
id: 'size',
title: 'Size',
title: 'Deployment size',
type: 'integer',
show: true,
width: 80,
width: 140,
elements: [
{
value: 2 * 1000 * 1000,
@@ -114,6 +114,14 @@
label: 'more than 50MB'
}
]
},
{
id: 'buildSize',
title: 'Build size',
type: 'integer',
show: false,
filter: false,
width: 80
}
]);
@@ -9,6 +9,7 @@
import DeploymentSource from './deploymentSource.svelte';
import DeploymentDomains from './deploymentDomains.svelte';
import { tooltip } from '$lib/actions/tooltip';
export let deployment: Models.Deployment;
</script>
@@ -28,7 +29,9 @@
</div>
<svelte:fragment slot="aside">
{@const status = deployment.status}
{@const fileSize = humanFileSize(deployment.size)}
{@const deploymentSize = humanFileSize(deployment.size)}
{@const buildSize = humanFileSize(deployment.buildSize)}
{@const totalSize = humanFileSize(deployment.buildSize + deployment.size)}
<ul class="stats-grid-box u-gap-16">
<li class="u-flex-vertical u-gap-4">
<p class="u-color-text-offline">Status</p>
@@ -51,9 +54,27 @@
</p>
</li>
<li class="u-flex-vertical u-gap-4">
<p class="u-color-text-offline">Build size</p>
<p class="u-color-text-offline">Total size</p>
<p class="u-line-height-2">
{fileSize.value + fileSize.unit}
{totalSize.value + totalSize.unit}
<button
type="button"
on:click|preventDefault
class="tooltip"
aria-label="input tooltip"
use:tooltip={{
content: `
<p><b>Deployment size:</b> ${deploymentSize.value + deploymentSize.unit}</p>
<p><b>Build size:</b> ${buildSize.value + buildSize.unit}</p>
`,
allowHTML: true,
appendTo: 'parent'
}}>
<span
class="icon-info"
aria-hidden="true"
style="font-size: var(--icon-size-small)" />
</button>
</p>
</li>
<li class="u-flex-vertical u-gap-4">
@@ -353,10 +353,34 @@
</p>
</li>
<li class="u-flex-vertical u-gap-8">
<p class="u-color-text-offline">Size</p>
<p class="u-color-text-offline">Total size</p>
<p>
{humanFileSize(deployment.size).value +
humanFileSize(deployment.size).unit}
{humanFileSize(deployment.size + deployment.buildSize).value +
humanFileSize(deployment.size + deployment.buildSize).unit}
<button
type="button"
on:click|preventDefault
class="tooltip"
aria-label="input tooltip"
use:tooltip={{
content: `
<p><b>Deployment size:</b> ${
humanFileSize(deployment.size).value +
humanFileSize(deployment.size).unit
}</p>
<p><b>Build size:</b> ${
humanFileSize(deployment.buildSize).value +
humanFileSize(deployment.buildSize).unit
}</p>
`,
allowHTML: true,
appendTo: 'parent'
}}>
<span
class="icon-info"
aria-hidden="true"
style="font-size: var(--icon-size-small)" />
</button>
</p>
</li>
</ul>
@@ -109,6 +109,10 @@
<TableCellText width={column.width} title={column.title}>
{calculateSize(deployment.size)}
</TableCellText>
{:else if column.id === 'buildSize'}
<TableCellText width={column.width} title={column.title}>
{calculateSize(deployment.buildSize)}
</TableCellText>
{/if}
{/if}
{/each}