+
{template.name}
{#each displayed as runtime}
{@const icon = getIconFromRuntime(runtime.name)}
{#if icon}
- -
+
-
+ -
+{hidden.length}
@@ -287,3 +291,18 @@
+
+
diff --git a/src/routes/(console)/project-[project]/functions/templates/template-[template]/+page.svelte b/src/routes/(console)/project-[project]/functions/templates/template-[template]/+page.svelte
index 1137cf318..e07244345 100644
--- a/src/routes/(console)/project-[project]/functions/templates/template-[template]/+page.svelte
+++ b/src/routes/(console)/project-[project]/functions/templates/template-[template]/+page.svelte
@@ -22,9 +22,10 @@
- -
-
- Use cases {$template.useCases.length}
+
-
+
+ Use cases
+ {$template.useCases.length}
{#each $template.useCases as useCase}
@@ -32,9 +33,10 @@
{/each}
- -
-
- Runtimes {$template.runtimes.length}
+
-
+
+ Runtimes
+ {$template.runtimes.length}
{#each $template.runtimes as runtime}
@@ -42,12 +44,12 @@
{/each}
- -
+
-
Published by
@@ -58,7 +60,7 @@
-
+
+
+
diff --git a/src/routes/(console)/project-[project]/functions/wizard/step1.svelte b/src/routes/(console)/project-[project]/functions/wizard/step1.svelte
index 26b97c118..d8c08dd1e 100644
--- a/src/routes/(console)/project-[project]/functions/wizard/step1.svelte
+++ b/src/routes/(console)/project-[project]/functions/wizard/step1.svelte
@@ -52,6 +52,7 @@
{:else}
{:else}
-
+
{/if}
diff --git a/src/routes/(console)/project-[project]/messaging/topicsModal.svelte b/src/routes/(console)/project-[project]/messaging/topicsModal.svelte
index a2aad2b57..9c1e7e218 100644
--- a/src/routes/(console)/project-[project]/messaging/topicsModal.svelte
+++ b/src/routes/(console)/project-[project]/messaging/topicsModal.svelte
@@ -3,7 +3,7 @@
import { Button, FormList, InputCheckbox, InputSearch } from '$lib/elements/forms';
import { Table, TableBody, TableCell, TableRow } from '$lib/elements/table';
import { sdk } from '$lib/stores/sdk';
- import { Query, type Models, MessagingProviderType } from '@appwrite.io/console';
+ import { MessagingProviderType, type Models, Query } from '@appwrite.io/console';
import { createEventDispatcher } from 'svelte';
import { getTotal } from './wizard/store';
import ProviderType from './providerType.svelte';
@@ -22,6 +22,8 @@
let selected: Record = {};
let hasSelection = false;
+ let emptyTopicsExists = false;
+
function reset() {
offset = 0;
search = '';
@@ -36,16 +38,22 @@
if (!show) return;
const queries = [Query.limit(5), Query.offset(offset)];
- if (providerType === MessagingProviderType.Email) {
- queries.push(Query.greaterThan('emailTotal', 0));
- } else if (providerType === MessagingProviderType.Sms) {
- queries.push(Query.greaterThan('smsTotal', 0));
- } else if (providerType === MessagingProviderType.Push) {
- queries.push(Query.greaterThan('pushTotal', 0));
- }
-
const response = await sdk.forProject.messaging.listTopics(queries, search || undefined);
+ if (response.total !== 0) {
+ switch (providerType) {
+ case MessagingProviderType.Email:
+ emptyTopicsExists = response.topics.every((topic) => topic.emailTotal === 0);
+ break;
+ case MessagingProviderType.Sms:
+ emptyTopicsExists = response.topics.every((topic) => topic.smsTotal === 0);
+ break;
+ case MessagingProviderType.Push:
+ emptyTopicsExists = response.topics.every((topic) => topic.pushTotal === 0);
+ break;
+ }
+ }
+
totalResults = response.total;
topicResultsById = {};
response.topics.forEach((topic) => {
@@ -94,7 +102,9 @@
Select existing topics you want to send this message to its targets. The message will be
- sent only to targets.
+ sent only to
+
+ targets.
- {#if Object.keys(topicResultsById).length > 0}
+ {#if Object.keys(topicResultsById).length > 0 && !emptyTopicsExists}
@@ -155,9 +165,12 @@
Documentation
+ text
+ >Documentation
+
(search = '')}
- >Clear search
+ >Clear search
+
@@ -166,15 +179,19 @@
- You have no topics. Create a topic to see them here.
+ You have no topics{emptyTopicsExists
+ ? ` with ${providerType.toUpperCase()} targets`
+ : ''}. Create a topic to see them here.
- Need a hand? Learn more in our documentation .
+ >documentation
+
+ .
diff --git a/src/routes/(console)/project-[project]/messaging/wizard/emailFormList.svelte b/src/routes/(console)/project-[project]/messaging/wizard/emailFormList.svelte
index 693d209fb..b4568b02d 100644
--- a/src/routes/(console)/project-[project]/messaging/wizard/emailFormList.svelte
+++ b/src/routes/(console)/project-[project]/messaging/wizard/emailFormList.svelte
@@ -10,7 +10,7 @@
InputTextarea
} from '$lib/elements/forms';
import { Pill } from '$lib/elements';
- import { Modal } from '$lib/components';
+ import { CustomId, Modal } from '$lib/components';
import { user } from '$lib/stores/user';
import { clickOnEnter } from '$lib/helpers/a11y';
import { ID, MessagingProviderType } from '@appwrite.io/console';
@@ -113,5 +113,12 @@
Message ID
+ {:else}
+
{/if}
diff --git a/src/routes/(console)/project-[project]/messaging/wizard/pushFormList.svelte b/src/routes/(console)/project-[project]/messaging/wizard/pushFormList.svelte
index dc8a5b02a..3316183d1 100644
--- a/src/routes/(console)/project-[project]/messaging/wizard/pushFormList.svelte
+++ b/src/routes/(console)/project-[project]/messaging/wizard/pushFormList.svelte
@@ -38,7 +38,7 @@
Label
} from '$lib/elements/forms';
import { Pill } from '$lib/elements';
- import { Modal } from '$lib/components';
+ import { CustomId, Modal } from '$lib/components';
import { user } from '$lib/stores/user';
import { clickOnEnter } from '$lib/helpers/a11y';
import { ID, MessagingProviderType } from '@appwrite.io/console';
@@ -232,6 +232,13 @@
Message ID
+ {:else}
+
{/if}
+ {:else}
+
{/if}
diff --git a/src/routes/(console)/project-[project]/settings/GitDisconnectModal.svelte b/src/routes/(console)/project-[project]/settings/GitDisconnectModal.svelte
index b414f37bd..fa12b9e3b 100644
--- a/src/routes/(console)/project-[project]/settings/GitDisconnectModal.svelte
+++ b/src/routes/(console)/project-[project]/settings/GitDisconnectModal.svelte
@@ -51,11 +51,6 @@
bind:show={showGitDisconnect}
onSubmit={handleSubmit}
size="big">
-
- Are you sure you want to disconnect this git installation? This will affect future
- deployments to the following functions:
-
-
{#await loadFunctions()}
@@ -64,6 +59,10 @@
{:then functions}
{#if functions.total}
+
+ Are you sure you want to disconnect this git installation? This will affect future
+ deployments to the following functions:
+
{#each functions.functions as func}
@@ -73,7 +72,9 @@
{func.name}
-
+
Last deployed: {toLocaleDateTime(func.$updatedAt)}
diff --git a/src/routes/(console)/project-[project]/settings/GitInstallationModal.svelte b/src/routes/(console)/project-[project]/settings/GitInstallationModal.svelte
index 06e4fcae6..c846ff6a7 100644
--- a/src/routes/(console)/project-[project]/settings/GitInstallationModal.svelte
+++ b/src/routes/(console)/project-[project]/settings/GitInstallationModal.svelte
@@ -19,7 +19,7 @@
- Select a provider to import an existing git repositories.
+ Select a provider to import an existing git repository.
diff --git a/src/routes/(console)/project-[project]/settings/domains/+page.ts b/src/routes/(console)/project-[project]/settings/domains/+page.ts
index 16a598b51..77aa1f174 100644
--- a/src/routes/(console)/project-[project]/settings/domains/+page.ts
+++ b/src/routes/(console)/project-[project]/settings/domains/+page.ts
@@ -8,7 +8,7 @@ export const load: PageLoad = async ({ depends, url }) => {
return {
rules: await sdk.forProject.proxy.listRules([
- Query.equal('resourceType', ResourceType.Api)
+ Query.equal('resourceType', ResourceType.Site)
]),
create: url.searchParams.get('create') !== null
};
diff --git a/src/routes/(console)/project-[project]/settings/migrations/+page.svelte b/src/routes/(console)/project-[project]/settings/migrations/+page.svelte
index 919c19510..1e7034cf3 100644
--- a/src/routes/(console)/project-[project]/settings/migrations/+page.svelte
+++ b/src/routes/(console)/project-[project]/settings/migrations/+page.svelte
@@ -191,7 +191,7 @@
{capitalize(status)}
-
+
showDetails(entry)}
>Details
diff --git a/src/routes/(console)/project-[project]/settings/updateInstallations.svelte b/src/routes/(console)/project-[project]/settings/updateInstallations.svelte
index aaabb6fba..690a1da2b 100644
--- a/src/routes/(console)/project-[project]/settings/updateInstallations.svelte
+++ b/src/routes/(console)/project-[project]/settings/updateInstallations.svelte
@@ -3,6 +3,7 @@
import { page } from '$app/stores';
import {
Alert,
+ Arrow,
AvatarGroup,
CardGrid,
DropList,
@@ -89,7 +90,7 @@
{#if total > 0}
-
+
-
-
- Installation ID
- Repository
- Updated
-
-
-
- {#each installations as installation, i}
-
-
- {installation.$id}
-
-
-
-
-
+
+
+
+ Installation ID
+ Repository
+ Updated
+
+
+
+ {#each installations as installation, i}
+
+
+ {installation.$id}
+
+
+
+
+
+
+
+ {installation.organization}
-
- {installation.organization}
-
-
-
- {dayjs().to(installation.$updatedAt)}
-
+
+
+ {dayjs().to(installation.$updatedAt)}
+
-
-
-
- (showInstallationDropdown[i] =
- !showInstallationDropdown[i])}>
-
-
-
- {
- showInstallationDropdown[i] = false;
- }}>
- Configure
-
- {
- showInstallationDropdown[i] = false;
- showGitDisconnect = true;
- selectedInstallation = installation;
- }}>
- Disconnect
-
-
-
-
-
- {/each}
-
-
+
+
+
+ (showInstallationDropdown[i] =
+ !showInstallationDropdown[i])}>
+
+
+
+ {
+ showInstallationDropdown[i] = false;
+ }}>
+ Configure
+
+ {
+ showInstallationDropdown[i] = false;
+ showGitDisconnect = true;
+ selectedInstallation = installation;
+ }}>
+ Disconnect
+
+
+
+
+
+ {/each}
+
+
+
Total installations: {total}
@@ -201,8 +206,12 @@
-
-
+
+
+
@@ -225,3 +234,9 @@
{#if showGitDisconnect}
{/if}
+
+
diff --git a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
index cc2ac064b..d7666f5bc 100644
--- a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
+++ b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
@@ -4,11 +4,10 @@
import {
TableBody,
TableCell,
- TableCellLink,
TableCellHead,
TableHeader,
- TableRow,
- Table
+ Table,
+ TableRowLink
} from '$lib/elements/table';
import { showUsageRatesModal, tierToPlan, upgradeURL } from '$lib/stores/billing';
import { organization } from '$lib/stores/organization';
@@ -225,27 +224,26 @@
}
]} />
{#if data.usage.executionsBreakdown.length > 0}
-
+
- Function
+ Function
Usage
-
+
{#each data.usage.executionsBreakdown as func}
-
+
{func.name ?? func.resourceId}
{formatNum(func.value)} executions
-
- View function
-
-
+
+
+
+
{/each}
diff --git a/src/routes/(console)/project-[project]/sites/(components)/deploymentSource.svelte b/src/routes/(console)/project-[project]/sites/(components)/deploymentSource.svelte
index c1bb30049..caca20106 100644
--- a/src/routes/(console)/project-[project]/sites/(components)/deploymentSource.svelte
+++ b/src/routes/(console)/project-[project]/sites/(components)/deploymentSource.svelte
@@ -12,8 +12,6 @@
import { ActionMenu, Layout, Popover, Icon } from '@appwrite.io/pink-svelte';
export let deployment: Models.Deployment;
-
- $: console.log(deployment);
{#if deployment.type === 'vcs'}
@@ -40,13 +38,14 @@
{deployment.providerBranch}
{#if deployment?.providerCommitMessage && deployment?.providerCommitHash && deployment?.providerCommitUrl}
+
{deployment?.providerCommitHash?.substring(0, 7)}
- {deployment.providerCommitMessage}
+ {deployment.providerCommitMessage.substring(0, 15)}...
{/if}
diff --git a/src/routes/(console)/project-[project]/sites/(components)/logs.svelte b/src/routes/(console)/project-[project]/sites/(components)/logs.svelte
index 869e3c77a..86d9a930e 100644
--- a/src/routes/(console)/project-[project]/sites/(components)/logs.svelte
+++ b/src/routes/(console)/project-[project]/sites/(components)/logs.svelte
@@ -14,8 +14,8 @@
import ansicolor from 'ansicolor';
import { onMount } from 'svelte';
- export let deployment: Models.Deployment;
export let site: Models.Site;
+ export let deployment: Models.Deployment;
let { status, buildLogs } = deployment;
@@ -26,12 +26,10 @@
`sites.${deployment.resourceId}.deployments.${deployment.$id}.update`
)
) {
- console.log(response.payload);
- // buildLogs = response.payload.logs;
- // status = response.payload.status;
- const payload = response.payload as Models.Deployment;
- buildLogs = payload.buildLogs;
- status = payload.status;
+ status = response.payload.status;
+ // Models.Deployment has no `logs`, the payload sends `logs` though
+ buildLogs = response.payload.logs;
+
if (status === 'ready') {
goto(
`${base}/project-${$page.params.project}/sites/create-site/finish?site=${site.$id}`
@@ -81,20 +79,21 @@
lightCyan: [133, 219, 216]
};
- function formatLogs(logs: { timestamp: string; content: string }[]) {
+ // TODO: Fix the buildLogs to return object, currently its a string.
+ function formatLogs(logs: { timestamp: string; content: string }[] = []) {
let output = '';
- const sum = logs.map((n) => n.content).join('');
+ const sum = logs.map((n) => `${n.timestamp} ${n.content}`).join('\n');
const iterator = ansicolor.parse(sum);
- for (const element of iterator) {
+ for (const element of iterator.spans) {
if (element.color && !element.color.name) output += `${element.text}`;
- else output += `${element.text}`;
+ else output += `${element.text}`;
}
return output;
}
async function cancelDeployment() {
try {
- await sdk.forProject.functions.updateDeploymentBuild(
+ await sdk.forProject.sites.updateDeploymentBuild(
deployment.resourceId,
deployment.$id
);
@@ -133,12 +132,14 @@
- {@html formatLogs(buildLogs)}
+
+ {formatLogs(buildLogs)}
+
- {#if status !== 'ready'}
+ {#if ['processing', 'building'].includes(status)}
Cancel deployment
{/if}
diff --git a/src/routes/(console)/project-[project]/sites/(components)/siteCard.svelte b/src/routes/(console)/project-[project]/sites/(components)/siteCard.svelte
index 5cffd5b8b..b763cae61 100644
--- a/src/routes/(console)/project-[project]/sites/(components)/siteCard.svelte
+++ b/src/routes/(console)/project-[project]/sites/(components)/siteCard.svelte
@@ -17,6 +17,8 @@
export let proxyRuleList: Models.ProxyRuleList = { total: 0, rules: [] };
let show = false;
+ const siteUrl =
+ deployment.domain ?? (proxyRuleList.total > 0 ? proxyRuleList.rules[0].domain : undefined);
$: totalSize = humanFileSize((deployment?.buildSize ?? 0) + (deployment?.size ?? 0));
@@ -53,7 +55,10 @@
{/if}
- (show = true)}>
+ {#if siteUrl}
+ (show = true)}
+ >
+ {/if}
{#if proxyRuleList?.total}
@@ -112,6 +117,6 @@
-{#if show && deployment.domain}
-
+{#if show && siteUrl}
+
{/if}
diff --git a/src/routes/(console)/project-[project]/sites/create-site/deploying/+page.svelte b/src/routes/(console)/project-[project]/sites/create-site/deploying/+page.svelte
index 0d141f98b..27ee5db1d 100644
--- a/src/routes/(console)/project-[project]/sites/create-site/deploying/+page.svelte
+++ b/src/routes/(console)/project-[project]/sites/create-site/deploying/+page.svelte
@@ -8,8 +8,6 @@
import Logs from '../../(components)/logs.svelte';
export let data;
-
- $: console.log(data.deployment);
@@ -216,12 +224,13 @@
{#if connectBehaviour === 'now'}
{#if hasInstallations}
-
- Use cases {$template.useCases.length} +
+ Use cases + {$template.useCases.length}
- Runtimes {$template.runtimes.length} +
+ Runtimes + {$template.runtimes.length}
Published by
Select existing topics you want to send this message to its targets. The message will be
- sent only to
Total installations: {total}
@@ -201,8 +206,12 @@{@html formatLogs(buildLogs)}
+
+ {formatLogs(buildLogs)}
+