Merge branch 'main' of https://github.com/appwrite/appwrite-console-poc into feat-analytics

This commit is contained in:
Torsten Dittmann
2022-11-14 21:30:40 +01:00
11 changed files with 58 additions and 40 deletions
+14 -14
View File
@@ -10,8 +10,8 @@
"dependencies": {
"@analytics/google-analytics": "^1.0.5",
"@aw-labs/appwrite-console": "^11.0.0",
"@aw-labs/icons": "0.0.0-76",
"@aw-labs/ui": "0.0.0-76",
"@aw-labs/icons": "0.0.0-77",
"@aw-labs/ui": "0.0.0-77",
"@popperjs/core": "^2.11.6",
"@sentry/svelte": "^7.19.0",
"@sentry/tracing": "^7.19.0",
@@ -155,14 +155,14 @@
}
},
"node_modules/@aw-labs/icons": {
"version": "0.0.0-76",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-76.tgz",
"integrity": "sha512-i22WHSl3aYCKqaEt87OKUmOZ9Q/LDUeqDJ7eab4dhey1+W3dqt+nF21YR38iRVtV08+0KniiwPxagBjjSSrmlg=="
"version": "0.0.0-77",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-77.tgz",
"integrity": "sha512-z/gH6B//qShnlJbf1sxv0ltSbRvJha1El0pl4jACAWDD+orgh2hzBrv6YdgPi1AVBTacu2GWWTcyobItghbpgA=="
},
"node_modules/@aw-labs/ui": {
"version": "0.0.0-76",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-76.tgz",
"integrity": "sha512-Cfik0wm2dDKnLTxWSdNkaw76HqoKD1JNjfKzkBT+Hertl2Gae0C/ykc8MjCHsO8lu6FulVQ6uqSLqfiKR1T6zQ==",
"version": "0.0.0-77",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-77.tgz",
"integrity": "sha512-y/7cbPFcK+jUnarsn9X1arrIB69RVMPWMjjIiiaX7uSa0rq9ZN1agBZxfA63meyh23kdIK4K5CcJhatShMMsYg==",
"dependencies": {
"@aw-labs/icons": "*",
"normalize.css": "^8.0.1",
@@ -7756,14 +7756,14 @@
}
},
"@aw-labs/icons": {
"version": "0.0.0-76",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-76.tgz",
"integrity": "sha512-i22WHSl3aYCKqaEt87OKUmOZ9Q/LDUeqDJ7eab4dhey1+W3dqt+nF21YR38iRVtV08+0KniiwPxagBjjSSrmlg=="
"version": "0.0.0-77",
"resolved": "https://registry.npmjs.org/@aw-labs/icons/-/icons-0.0.0-77.tgz",
"integrity": "sha512-z/gH6B//qShnlJbf1sxv0ltSbRvJha1El0pl4jACAWDD+orgh2hzBrv6YdgPi1AVBTacu2GWWTcyobItghbpgA=="
},
"@aw-labs/ui": {
"version": "0.0.0-76",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-76.tgz",
"integrity": "sha512-Cfik0wm2dDKnLTxWSdNkaw76HqoKD1JNjfKzkBT+Hertl2Gae0C/ykc8MjCHsO8lu6FulVQ6uqSLqfiKR1T6zQ==",
"version": "0.0.0-77",
"resolved": "https://registry.npmjs.org/@aw-labs/ui/-/ui-0.0.0-77.tgz",
"integrity": "sha512-y/7cbPFcK+jUnarsn9X1arrIB69RVMPWMjjIiiaX7uSa0rq9ZN1agBZxfA63meyh23kdIK4K5CcJhatShMMsYg==",
"requires": {
"@aw-labs/icons": "*",
"normalize.css": "^8.0.1",
+2 -2
View File
@@ -22,8 +22,8 @@
"@analytics/google-analytics": "^1.0.5",
"analytics": "^0.8.1",
"@aw-labs/appwrite-console": "^11.0.0",
"@aw-labs/icons": "0.0.0-76",
"@aw-labs/ui": "0.0.0-76",
"@aw-labs/icons": "0.0.0-77",
"@aw-labs/ui": "0.0.0-77",
"@popperjs/core": "^2.11.6",
"@sentry/svelte": "^7.19.0",
"@sentry/tracing": "^7.19.0",
+1 -1
View File
@@ -21,5 +21,5 @@
{#if status}
<span class="status-icon" />
{/if}
<span class="text u-margin-inline-end-16"><slot /></span>
<span class="text"><slot /></span>
</div>
+1 -1
View File
@@ -48,7 +48,7 @@
on:dragleave|preventDefault={() => (hovering = false)}>
<div class="u-flex u-main-center u-cross-center u-gap-32">
<div class="avatar is-size-large">
<span class="icon-upload" aria-hidden="true" />
<span class="icon-folder" aria-hidden="true" />
</div>
<div class="u-grid u-gap-16">
<p>Drag and drop files here to upload</p>
+6 -1
View File
@@ -79,7 +79,12 @@
<div>Size: {size.value} {size.unit}</div>
</div>
<div class="status u-margin-inline-start-auto">
<Status status={$log.data.status}>{$log.data.status}</Status>
<div class="u-flex u-flex-vertical u-cross-end">
<Status status={$log.data.status}>{$log.data.status}</Status>
<p class="text">
{calculateTime($log.data.buildTime)}
</p>
</div>
</div>
</div>
<div class="tabs u-margin-block-start-48 u-sep-block-end">
@@ -1,5 +1,5 @@
<svelte:head>
<title>Database - Appwrite</title>
<title>Databases - Appwrite</title>
</svelte:head>
<slot />
@@ -38,6 +38,7 @@
import { sdkForConsole } from '$lib/stores/sdk';
import { page } from '$app/stores';
import Output from '$lib/components/output.svelte';
import { calculateTime } from '$lib/helpers/timeConversion';
export let data: PageData;
@@ -119,10 +120,14 @@
<p>Updated at: {toLocaleDateTime($func.$updatedAt)}</p>
<p>Entrypoint: {activeDeployment?.entrypoint}</p>
</div>
<Status status={activeDeployment.status}>
{activeDeployment.status}
</Status>
<div class="u-flex u-flex-vertical u-cross-end">
<Status status={activeDeployment.status}>
{activeDeployment.status}
</Status>
<p class="text">
{calculateTime(activeDeployment.buildTime)}
</p>
</div>
</div>
</svelte:fragment>
@@ -184,7 +189,7 @@
<TableCellText title="Build Time">
{#if deployment.status === 'ready'}
{deployment.buildTime}s
{calculateTime(deployment.buildTime)}
{/if}
</TableCellText>
@@ -9,7 +9,7 @@
TableCellHead,
TableCell,
TableCellText,
TableRowButton
TableRow
} from '$lib/elements/table';
import { toLocaleDateTime } from '$lib/helpers/date';
import { calculateTime } from '$lib/helpers/timeConversion';
@@ -51,25 +51,22 @@
{#if data.executions.total}
<Table>
<TableHeader>
<TableCellHead>Execution ID</TableCellHead>
<TableCellHead width={90}>Execution ID</TableCellHead>
<TableCellHead width={140}>Created</TableCellHead>
<TableCellHead width={110}>Status</TableCellHead>
<TableCellHead width={90}>Trigger</TableCellHead>
<TableCellHead width={100}>Duration</TableCellHead>
<TableCellHead width={40} />
</TableHeader>
<TableBody>
{#each data.executions.executions as execution}
<TableRowButton
on:click={() => {
$log.show = true;
$log.func = $func;
$log.data = execution;
}}>
<TableRow>
<TableCell title="Execution ID">
<Copy value={execution.$id}>
<Pill button
><span class="icon-duplicate" aria-hidden="true" />
<span class="text u-trim">{execution.$id}</span></Pill>
<Pill button trim>
<span class="icon-duplicate" aria-hidden="true" />
<span class="text u-trim">{execution.$id}</span>
</Pill>
</Copy>
</TableCell>
<TableCellText title="Created">
@@ -87,7 +84,18 @@
</TableCellText>
<TableCellText title="Duration">
{calculateTime(execution.duration)}</TableCellText>
</TableRowButton>
<TableCell>
<Button
secondary
on:click={() => {
$log.show = true;
$log.func = $func;
$log.data = execution;
}}>
Logs
</Button>
</TableCell>
</TableRow>
{/each}
</TableBody>
</Table>
@@ -44,7 +44,7 @@
<Copy value={$func?.$id} event="function">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
ID Details
Function ID
</Pill>
</Copy>
</svelte:fragment>
@@ -27,7 +27,7 @@
export let data: PageData;
const projectId = $page.params.project;
const target = import.meta.env?.VITE_APP_DOMAIN_TARGET?.toString() ?? '';
const target = window?.location.hostname ?? '';
let showDelete = false;
let selectedDomain: Models.Domain;
let isVerifying = {};
@@ -12,7 +12,7 @@
} from '$lib/elements/table';
import { domain } from './store';
const target = import.meta.env?.VITE_APP_DOMAIN_TARGET?.toString() ?? '';
const target = window?.location.hostname ?? '';
$: parts = $domain.domain.split('.');
$: registerable = [parts[parts.length - 2], parts[parts.length - 1]].join('.');
$: cnameValue = $domain.domain.replace('.' + registerable, '');