Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Nov 14, 2022
2 parents ca59298 + 2ff85b2 commit 133c9dd
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/status.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion src/lib/elements/forms/inputFile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
7 changes: 6 additions & 1 deletion src/lib/layout/logs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -184,7 +189,7 @@

<TableCellText title="Build Time">
{#if deployment.status === 'ready'}
{deployment.buildTime}s
{calculateTime(deployment.buildTime)}
{/if}
</TableCellText>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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">
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<Copy value={$func?.$id}>
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
ID Details
Function ID
</Pill>
</Copy>
</svelte:fragment>
Expand Down

1 comment on commit 133c9dd

@vercel
Copy link

@vercel vercel bot commented on 133c9dd Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.