Merge branch 'main' into ser-399-fix-duration-filter

This commit is contained in:
Darshan
2025-09-23 15:43:41 +05:30
committed by GitHub
9 changed files with 54 additions and 11 deletions
+7 -4
View File
@@ -21,13 +21,16 @@ export const timer: Action<HTMLElement, Props> = (node, props) => {
}
function step() {
const diffInSeconds = Math.floor((new Date().getTime() - startDate.getTime()) / 1000);
const minutes = Math.floor(diffInSeconds / 60);
const elapsedSeconds = Math.max(
0,
Math.floor((new Date().getTime() - startDate.getTime()) / 1000)
);
const minutes = Math.floor(elapsedSeconds / 60);
if (minutes > 0) {
const seconds = diffInSeconds % 60;
const seconds = elapsedSeconds % 60;
node.textContent = `${minutes}m ${seconds}s`;
} else {
node.textContent = calculateTime(diffInSeconds);
node.textContent = calculateTime(elapsedSeconds);
}
frame = window.requestAnimationFrame(step);
}
+10 -1
View File
@@ -62,7 +62,7 @@
if (isSuccess) {
await invalidate(Dependencies.ROWS);
$spreadsheetRenderKey = hash(Date.now().toString());
spreadsheetRenderKey.set(hash(Date.now().toString()));
}
}
@@ -90,6 +90,15 @@
}
}
if (tableId && tableName === null) {
importItems.update((items) => {
const next = new Map(items);
next.delete(importData.$id);
return next;
});
return;
}
importItems.update((items) => {
const existing = items.get(importData.$id);
+1 -1
View File
@@ -44,7 +44,7 @@ export const testimonials: Testimonial[] = [
{
id: 'phil-majikkids',
logo: Phil,
headline: 'Just like a Swiss Army Knife - choose and use the tools you need',
headline: 'With Appwrite, Majik Kids built an entire app with one developer.',
blurb: 'Just like a Swiss Army Knife you can choose and use the tools that you need with Appwrite.',
name: 'Phil McCluskey',
title: 'App Manager, Majik Kids',
@@ -89,25 +89,34 @@
id="address"
label="Street address"
placeholder="Enter street address"
autocomplete
required />
<InputText
bind:value={address2}
id="address2"
label="Address line 2"
autocomplete
placeholder="Unit number, floor, etc." />
<InputText
bind:value={city}
id="city"
label="City or suburb"
placeholder="Enter your city"
autocomplete
required />
<InputText
bind:value={state}
id="state"
label="State"
placeholder="Enter your state"
autocomplete
required />
<InputText bind:value={zip} id="zip" label="Postal code" placeholder="Enter postal code" />
<InputText
bind:value={zip}
id="zip"
label="Postal code"
placeholder="Enter postal code"
autocomplete />
<svelte:fragment slot="footer">
<Button text on:click={() => (show = false)}>Cancel</Button>
@@ -21,6 +21,7 @@
import { Copy } from '$lib/components';
import { logStatusConverter } from './store';
import { LogsRequest, LogsResponse } from '$lib/components/logs';
import { timer } from '$lib/actions/timer';
export let selectedLogId: string;
export let logs: Models.Execution[];
@@ -139,7 +140,11 @@
Duration
</Typography.Text>
<Typography.Text variant="m-400">
{calculateTime(selectedLog.duration)}
{#if ['processing', 'waiting'].includes(selectedLog.status)}
<span use:timer={{ start: selectedLog.$createdAt }}></span>
{:else}
{calculateTime(selectedLog.duration)}
{/if}
</Typography.Text>
</Layout.Stack>
@@ -25,6 +25,7 @@
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
import { Button } from '$lib/elements/forms';
import { timer } from '$lib/actions/timer';
export let columns: Column[];
export let executions: Models.ExecutionList;
@@ -121,7 +122,11 @@
</span>
</Tooltip>
{:else if column.id === 'duration'}
{calculateTime(log.duration)}
{#if ['processing', 'waiting'].includes(log.status)}
<span use:timer={{ start: log.$createdAt }}></span>
{:else}
{calculateTime(log.duration)}
{/if}
{/if}
</Table.Cell>
{/each}
@@ -19,6 +19,7 @@
import { Copy } from '$lib/components';
import { LogsRequest, LogsResponse } from '$lib/components/logs';
import { site } from '../store';
import { timer } from '$lib/actions/timer';
export let open = false;
export let selectedLogId: string;
@@ -112,7 +113,12 @@
Duration
</Typography.Text>
<Typography.Text variant="m-400">
{calculateTime(selectedLog.duration)}
{#if ['processing', 'waiting'].includes(selectedLog.status)}
<span use:timer={{ start: selectedLog.$createdAt }}
></span>
{:else}
{calculateTime(selectedLog.duration)}
{/if}
</Typography.Text>
</Layout.Stack>
<Layout.Stack gap="xs" inline>
@@ -14,6 +14,7 @@
import { calculateTime } from '$lib/helpers/timeConversion';
import { getBadgeTypeFromStatusCode } from '$lib/helpers/httpStatus';
import { Button } from '$lib/elements/forms';
import { timer } from '$lib/actions/timer';
export let columns: Column[];
export let logs: Models.ExecutionList;
@@ -83,7 +84,11 @@
{log.requestMethod}
</Typography.Code>
{:else if column.id === 'duration'}
{calculateTime(log.duration)}
{#if ['processing', 'waiting'].includes(log.status)}
<span use:timer={{ start: log.$createdAt }}></span>
{:else}
{calculateTime(log.duration)}
{/if}
{:else if column.id === 'responseStatusCode'}
<div>
<Badge
@@ -130,6 +130,7 @@
placeholder="Your name"
autofocus
required
autocomplete
bind:value={name} />
<InputEmail
id="email"