diff --git a/src/routes/(console)/(migration-wizard)/resource-form.svelte b/src/routes/(console)/(migration-wizard)/resource-form.svelte index da3de89161..1c7d76953b 100644 --- a/src/routes/(console)/(migration-wizard)/resource-form.svelte +++ b/src/routes/(console)/(migration-wizard)/resource-form.svelte @@ -1,12 +1,9 @@ - -
- Good to know -
-
- -
-
-

Project settings are not imported

-

You will need to set service and project settings manually

-
-
-
-
- -
-
-

Keep your organization plan's limits in mind

-

- Make sure to have enough storage in your organization plan when importing files. -

-
-
- {#if $provider.provider === 'firebase'} -
-
- -
-
-

Possible charges by Firebase

-

- Appwrite does not impose charges for importing data, but please note that - Firebase may have its own pricing for this service -

-
-
- {:else} -
-
- -
-
-

Transfer is free of charge

-

You won't be charged for Appwrite bandwidth usage for importing data

-
-
- {/if} -
-
- -{#if report && !isVersionAtLeast(version, '1.4.0') && $provider.provider === 'appwrite'} -
- p - 1); - } - } - ]}> + + {#if report && !isVersionAtLeast(version, '1.4.0') && $provider.provider === 'appwrite'} + Functions not available for import To migrate your functions, update the version of the Appwrite instance you're importing from to a version newer than 1.4 - -
-{/if} + + {/if} -{#if error} -
- p - 1); - } - } - ]}> - Request failed + {#if error} + Please check if your credentials are filled in correctly in the previous step - -
-{/if} - - + + + + + + + + - + diff --git a/src/routes/(console)/project-[project]/settings/migrations/+page.svelte b/src/routes/(console)/project-[project]/settings/migrations/+page.svelte index f73714455a..0cf5707f78 100644 --- a/src/routes/(console)/project-[project]/settings/migrations/+page.svelte +++ b/src/routes/(console)/project-[project]/settings/migrations/+page.svelte @@ -32,21 +32,9 @@ import { Click, trackEvent } from '$lib/actions/analytics'; export let data; - let migration: Models.Migration = null; let showExport = false; let showMigration = false; - - const getStatus = (status: string) => { - if (status === 'failed') { - return 'failed'; - } else if (status === 'completed') { - return 'complete'; - } else if (status === 'processing') { - return 'processing'; - } - - return 'pending'; - }; + let migration: Models.Migration = null; onMount(async () => { sdk.forConsole.client.subscribe(['project', 'console'], (response) => { @@ -134,6 +122,23 @@ showMigration = true; migration = m; } + + function getTypedStatus(entry: Models.Migration) { + // migration > pending, processing, failed, completed + // status component = waiting, ready, processing, pending, failed, complete + switch (entry.status) { + case 'completed': + return 'complete'; + case 'processing': + return 'processing'; + case 'failed': + return 'failed'; + case 'pending': + return 'pending'; + default: + return 'waiting'; + } + } @@ -162,7 +167,7 @@ {#each data.migrations as entry} - {@const status = getStatus(entry.status)} + {@const status = getTypedStatus(entry.status)} {#if isSameDay(new Date(), new Date(entry.$createdAt))} Today diff --git a/src/routes/(console)/project-[project]/settings/migrations/details.svelte b/src/routes/(console)/project-[project]/settings/migrations/details.svelte index d26f392098..d91951a723 100644 --- a/src/routes/(console)/project-[project]/settings/migrations/details.svelte +++ b/src/routes/(console)/project-[project]/settings/migrations/details.svelte @@ -7,7 +7,7 @@ import { formatNum } from '$lib/helpers/string'; import type { Models } from '@appwrite.io/console'; import { ResourcesFriendly } from '$lib/stores/migration'; - import { Card, Layout, Typography, Code } from '@appwrite.io/pink-svelte'; + import { Card, Layout, Typography, Code, Spinner, Tag } from '@appwrite.io/pink-svelte'; export let migration: Models.Migration = null; export let show = false; @@ -44,6 +44,7 @@ }; let tab = 'details' as 'details' | 'logs'; + let logs = JSON.stringify(migration, null, 2); {#if tab === 'logs'} - + {:else if tab === 'details'} @@ -94,14 +95,12 @@
{#each Object.keys(statusCounters) as entity} {@const entityCounter = statusCounters[entity]} -
+
{#if hasError(entityCounter)} {:else if isLoading(entityCounter)} -
- -
+ {:else if hasSucceeded(entityCounter)} {:else} @@ -114,9 +113,10 @@ >{total(Object.values(entityCounter)) > 1 ? ResourcesFriendly[entity].plural : ResourcesFriendly[entity].singular} - {totalItems(entityCounter)} + + {totalItems(entityCounter)}
-
+ {/each}
{/if} @@ -127,7 +127,7 @@ .box { padding: 0; - > div { + > :global(div) { padding: 1.25rem; &:not(:last-child) { @@ -142,10 +142,10 @@ width: 1.5rem; height: 1.5rem; - > * { - position: absolute; + > :global(*) { top: 50%; left: 50%; + position: absolute; transform: translate(-50%, -50%); } diff --git a/src/routes/(console)/project-[project]/settings/migrations/exportModal.svelte b/src/routes/(console)/project-[project]/settings/migrations/exportModal.svelte index f299631c2d..b01504b853 100644 --- a/src/routes/(console)/project-[project]/settings/migrations/exportModal.svelte +++ b/src/routes/(console)/project-[project]/settings/migrations/exportModal.svelte @@ -1,14 +1,17 @@ - - API key creation - By initiating the transfer, an API key will be automatically generated in the background, which - you can delete after completion - - - { - if (!submitted) return; - handleInvalid(e); - }} /> - - -

Share your feedback: why our self-hosted solution works better for you

-

- We appreciate your continued support and we understand that our self-hosted solution - might better fit your needs. To help us improve our Cloud solution, please share why it - works better for you. Your feedback is important to us and we'll use it to make our - services better. -

-
- -
-
- -
- You will be redirected to your self-hosted instance - - -
+ + + API key creation + By initiating the transfer, an API key will be automatically generated in the background, + which you can delete after completion + + + + + + + + Share your feedback: why our self-hosted solution works better for you + + + We appreciate your continued support and we understand that our self-hosted solution + might better fit your needs. To help us improve our Cloud solution, please share why + it works better for you. Your feedback is important to us and we'll use it to make + our services better. + + + + + + + + You will be redirected to your self-hosted instance + + +