diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a7a13379f1..384b4a4dc6 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -39,8 +39,10 @@ "svelte-chartjs": "^3.1.0", "svelte-dnd-action": "^0.9.22", "svelte-exmarkdown": "^2.1.0", + "svelte-infinite-loading": "^1.3.8", "svelte-portal": "^2.2.0", "svelte-timezone-picker": "^2.0.3", + "svelte-tiny-virtual-list": "^2.0.5", "tailwind-merge": "^1.13.2", "vscode-ws-jsonrpc": "3.0.0", "windmill-parser-wasm": "^1.154.3", @@ -8762,6 +8764,11 @@ "svelte": "^3.19.0 || ^4.0.0-next.0" } }, + "node_modules/svelte-infinite-loading": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/svelte-infinite-loading/-/svelte-infinite-loading-1.3.8.tgz", + "integrity": "sha512-hn4o848LKd2Q+M11hiMWnfFxM1GHKVDi92HPZ1FYvfed4bEeRZL+QvFAQzhy1SACq6Si0CAJcQFUZpIYmAEnpQ==" + }, "node_modules/svelte-multiselect": { "version": "8.6.2", "resolved": "https://registry.npmjs.org/svelte-multiselect/-/svelte-multiselect-8.6.2.tgz", @@ -8899,6 +8906,11 @@ "svelte": "^3.25.0" } }, + "node_modules/svelte-tiny-virtual-list": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/svelte-tiny-virtual-list/-/svelte-tiny-virtual-list-2.0.5.tgz", + "integrity": "sha512-xg9ckb8UeeIme4/5qlwCrl2QNmUZ8SCQYZn3Ji83cUsoASqRNy3KWjpmNmzYvPDqCHSZjruBBsoB7t5hwuzw5g==" + }, "node_modules/svelte2tsx": { "version": "0.6.19", "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.6.19.tgz", @@ -16039,6 +16051,11 @@ "dev": true, "requires": {} }, + "svelte-infinite-loading": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/svelte-infinite-loading/-/svelte-infinite-loading-1.3.8.tgz", + "integrity": "sha512-hn4o848LKd2Q+M11hiMWnfFxM1GHKVDi92HPZ1FYvfed4bEeRZL+QvFAQzhy1SACq6Si0CAJcQFUZpIYmAEnpQ==" + }, "svelte-multiselect": { "version": "8.6.2", "resolved": "https://registry.npmjs.org/svelte-multiselect/-/svelte-multiselect-8.6.2.tgz", @@ -16113,6 +16130,11 @@ "compute-scroll-into-view": "^1.0.16" } }, + "svelte-tiny-virtual-list": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/svelte-tiny-virtual-list/-/svelte-tiny-virtual-list-2.0.5.tgz", + "integrity": "sha512-xg9ckb8UeeIme4/5qlwCrl2QNmUZ8SCQYZn3Ji83cUsoASqRNy3KWjpmNmzYvPDqCHSZjruBBsoB7t5hwuzw5g==" + }, "svelte2tsx": { "version": "0.6.19", "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.6.19.tgz", diff --git a/frontend/package.json b/frontend/package.json index f12e7a9e51..552a77a28f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -103,8 +103,10 @@ "svelte-chartjs": "^3.1.0", "svelte-dnd-action": "^0.9.22", "svelte-exmarkdown": "^2.1.0", + "svelte-infinite-loading": "^1.3.8", "svelte-portal": "^2.2.0", "svelte-timezone-picker": "^2.0.3", + "svelte-tiny-virtual-list": "^2.0.5", "tailwind-merge": "^1.13.2", "vscode-ws-jsonrpc": "3.0.0", "windmill-parser-wasm": "^1.154.3", diff --git a/frontend/src/lib/components/runs/RunRow.svelte b/frontend/src/lib/components/runs/RunRow.svelte index 8f8a1c0c10..8bbe885d86 100644 --- a/frontend/src/lib/components/runs/RunRow.svelte +++ b/frontend/src/lib/components/runs/RunRow.svelte @@ -6,8 +6,7 @@ import Icon from 'svelte-awesome' import { Badge, Button } from '../common' import ScheduleEditor from '../ScheduleEditor.svelte' - import Row from '../table/Row.svelte' - import Cell from '../table/Cell.svelte' + import { Calendar, Check, @@ -21,12 +20,16 @@ import { createEventDispatcher } from 'svelte' import TimeAgo from '../TimeAgo.svelte' import { forLater } from '$lib/forLater' + import { twMerge } from 'tailwind-merge' + import Portal from 'svelte-portal' const dispatch = createEventDispatcher() const SMALL_ICON_SCALE = 0.7 export let job: Job export let selectedId: string | undefined = undefined + export let containerWidth: number = 0 + let scheduleEditor: ScheduleEditor function endedDate(started_at: string, duration_ms: number): string { @@ -40,48 +43,55 @@ } - goto('/schedules')} bind:this={scheduleEditor} /> + + goto('/schedules')} bind:this={scheduleEditor} /> + - +
{ selectedId = job.id dispatch('select') }} > - -
- {#if 'success' in job && job.success} - {#if job.is_skipped} - - - - {:else} - - - - {/if} - {:else if 'success' in job} - - - - {:else if 'running' in job && job.running} - - - - {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} - - +
+ {#if 'success' in job && job.success} + {#if job.is_skipped} + + {:else} - - + + {/if} -
- - + {:else if 'success' in job} + + + + {:else if 'running' in job && job.running} + + + + {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} + + + + {:else} + + + + {/if} +
+ +
{#if job} {#if 'started_at' in job && job.started_at} @@ -103,9 +113,9 @@ {/if} {/if}
- +
- +
{#if job === undefined} No job found @@ -114,7 +124,9 @@
{#if job.script_path}
- {job.script_path} + + {job.script_path} +
+
{#if job && job.schedule_path}
@@ -184,7 +198,9 @@
{:else}
- {job.created_by} +
+ {job.created_by} +
{/if} - - +
+
diff --git a/frontend/src/lib/components/runs/RunsTable.svelte b/frontend/src/lib/components/runs/RunsTable.svelte index f7a2dc35d5..81627547f1 100644 --- a/frontend/src/lib/components/runs/RunsTable.svelte +++ b/frontend/src/lib/components/runs/RunsTable.svelte @@ -1,9 +1,9 @@ - (nbOfJobs += loadMoreQuantity)} -> - - - Timestamp - Path - Triggered by - +
+
+
+
Timestamp
+
Path
+
Triggered by
+
- - {#each Object.entries(groupedJobs) as [date, jobsByDay]} - - - {date} - - - {#each jobsByDay as job (job.id)} - - {/each} - {/each} - - {#if jobs.length == 0} - - -
No jobs found for the selected filters.
- - - {/if} - + +
+ {@const jobOrDate = flatJobs[index]} + + {#if jobOrDate} + {#if jobOrDate?.type === 'date'} +
+ {jobOrDate.date} +
+ {:else} +
+ +
+ {/if} + {:else} + {JSON.stringify(jobOrDate)} + {/if} +
+
+ +
+
+ Reached the limit of {MAX_ITEMS} jobs. Please refine your search using filters. +
+
+
+
+
+
+{#if jobs.length == 0} + + +
No jobs found for the selected filters.
+ + +{/if} diff --git a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte index 27284a3274..faffc3e2c7 100644 --- a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte @@ -382,7 +382,16 @@ cancelAllJobs = false }} /> -
+ + + + {#if selectedId} + + {/if} + + + +