(hasClickFocus = true)} use:clickOutside={{ onClickOutside: () => (hasClickFocus = false) }} bind:clientWidth={containerWidth} >
{#if manualSelectionMode} {@const allSelected = selectedIds.length === selectableJobs?.length}
allSelected, () => (selectedIds = allSelected ? [] : (selectableJobs.map((j) => j.id) ?? [])) } />
{/if}
{#if showExternalJobs && externalJobs.length > 0}
{jobs ? jobCountString(jobs.length + externalJobs.length, lastFetchWentToEnd) : ''}{externalJobs.length} jobs obscured
{:else if $workspaceStore !== 'admins' && omittedObscuredJobs}
{jobs ? jobCountString(jobs.length, lastFetchWentToEnd) : ''} {#snippet text()} Too specific filtering may have caused the omission of obscured jobs. This is done for security reasons. To see obscured jobs, try removing some filters. {/snippet}
{:else} {@const jobCount = jobs ? jobCountString(jobs.length, lastFetchWentToEnd, selectedIds.length >= 2) : ''} {selectedIds.length >= 2 ? `${selectedIds.length}/` : ''} {jobCount} {/if}
Duration
Path
{#if containsLabel}
Label
{/if}
Triggered by
{#if showTag}
Tag
{/if}
{#if jobs?.length == 0 && (!showExternalJobs || externalJobs?.length == 0)}
No jobs found for the selected filters.
{:else}
{ e.preventDefault() rightClickPopover?.open(e) }} > {#snippet header()}{/snippet} {#snippet item({ index, style })}
{#if flatJobs} {@const jobOrDate = flatJobs[index]} {#if jobOrDate} {#if jobOrDate?.type === 'date'}
{jobOrDate.date}
{:else} {@const selected = jobOrDate.job.id !== '-' && selectedIds.includes(jobOrDate.job.id)} {@const nonSelectable = !jobIsSelectable(jobOrDate.job)}
{ const jobId = jobOrDate.job.id if (keysPressed.Shift && selectedIds.length > 0) { if (nonSelectable) return const lastSelectedId = selectedIds[selectedIds.length - 1] const lastSelectedIndex = flatJobs?.findIndex( (jobOrDate) => jobOrDate.type === 'job' && jobOrDate.job.id === lastSelectedId ) if (lastSelectedIndex != undefined && flatJobs) { const [start, end] = index < lastSelectedIndex ? [index, lastSelectedIndex] : [lastSelectedIndex, index] const newSelectedIds = flatJobs .slice(start, end + 1) .filter((jobOrDate) => jobOrDate.type === 'job') .map((jobOrDate) => jobOrDate.job.id) selectedIds = Array.from(new Set([...selectedIds, ...newSelectedIds])) } } else if ( keysPressed.Control || keysPressed.Meta || manualSelectionMode ) { if (nonSelectable) return if (selectedIds.includes(jobOrDate.job.id)) { selectedIds = selectedIds.filter((id) => id != jobId) } else { selectedIds.push(jobId) selectedIds = selectedIds } } else { if (batchRerunOptionsIsOpen) batchRerunOptionsIsOpen = false if ( selectedIds.length !== 1 || selectedIds[0] !== jobOrDate.job.id || selectedWorkspace !== jobOrDate.job.workspace_id ) { selectedWorkspace = jobOrDate.job.workspace_id selectedIds = [jobOrDate.job.id] dispatch('select') } else { selectedIds = [] selectedWorkspace = undefined dispatch('select') } } }} {activeLabel} on:filterByLabel on:filterByPath on:filterByUser on:filterByFolder on:filterByConcurrencyKey on:filterBySchedule on:filterByWorker {containerWidth} />
{/if} {:else} {JSON.stringify(jobOrDate)} {/if} {:else}
...
...
...
...
{/if}
{/snippet} {#snippet footer()}
{#if !lastFetchWentToEnd && jobs && jobs.length >= perPage} {/if}
{/snippet}
{/if}
rightClickPopover?.close()} items={dropdownActions} />