mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-07 08:02:20 +00:00
fix: only show if_skipped runs if filter is set to it
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
<JobsLoader
|
||||
bind:jobs
|
||||
path={runnableId}
|
||||
isSkipped={false}
|
||||
showSkipped={false}
|
||||
jobKinds={getJobKinds(runnableType)}
|
||||
user={null}
|
||||
label={null}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
|
||||
import { Button } from '$lib/components/common'
|
||||
import {
|
||||
InputService,
|
||||
@@ -22,16 +21,14 @@
|
||||
import Skeleton from './common/skeleton/Skeleton.svelte'
|
||||
import SaveInputsButton from './SaveInputsButton.svelte'
|
||||
|
||||
|
||||
|
||||
interface Props {
|
||||
scriptHash?: string | null;
|
||||
scriptPath?: string | null;
|
||||
flowPath?: string | null;
|
||||
canSaveInputs?: boolean;
|
||||
scriptHash?: string | null
|
||||
scriptPath?: string | null
|
||||
flowPath?: string | null
|
||||
canSaveInputs?: boolean
|
||||
// Are the current Inputs valid and able to be saved?
|
||||
isValid: boolean;
|
||||
args: object;
|
||||
isValid: boolean
|
||||
args: object
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -41,7 +38,7 @@
|
||||
canSaveInputs = true,
|
||||
isValid,
|
||||
args
|
||||
}: Props = $props();
|
||||
}: Props = $props()
|
||||
|
||||
interface EditableInput extends Input {
|
||||
isEditing?: boolean
|
||||
@@ -57,14 +54,9 @@
|
||||
|
||||
let runnableId = $derived(scriptHash || scriptPath || flowPath || undefined)
|
||||
|
||||
let runnableType: RunnableType | undefined = $derived(scriptHash
|
||||
? 'ScriptHash'
|
||||
: scriptPath
|
||||
? 'ScriptPath'
|
||||
: flowPath
|
||||
? 'FlowPath'
|
||||
: undefined)
|
||||
|
||||
let runnableType: RunnableType | undefined = $derived(
|
||||
scriptHash ? 'ScriptHash' : scriptPath ? 'ScriptPath' : flowPath ? 'FlowPath' : undefined
|
||||
)
|
||||
|
||||
let hasAlreadyFailed = false
|
||||
async function loadInputHistory() {
|
||||
@@ -131,11 +123,11 @@
|
||||
$effect(() => {
|
||||
if ($workspaceStore && (scriptHash || scriptPath || flowPath)) {
|
||||
untrack(() => {
|
||||
loadInputHistory()
|
||||
loadSavedInputs()
|
||||
loadInputHistory()
|
||||
loadSavedInputs()
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
let previewArgs: any = $state(undefined)
|
||||
|
||||
@@ -162,7 +154,7 @@
|
||||
<JobsLoader
|
||||
bind:jobs
|
||||
path={runnableId}
|
||||
isSkipped={false}
|
||||
showSkipped={false}
|
||||
jobKindsCat="all"
|
||||
user={null}
|
||||
label={null}
|
||||
|
||||
@@ -6,10 +6,7 @@
|
||||
type CompletedJob,
|
||||
type ExtendedJobs,
|
||||
ConcurrencyGroupsService,
|
||||
type ObscuredJob,
|
||||
|
||||
|
||||
|
||||
type ObscuredJob
|
||||
} from '$lib/gen'
|
||||
|
||||
import { sendUserToast } from '$lib/toast'
|
||||
@@ -26,7 +23,6 @@
|
||||
folder: string | null
|
||||
path: string | null
|
||||
success?: 'success' | 'suspended' | 'waiting' | 'failure' | 'running' | undefined
|
||||
isSkipped?: boolean
|
||||
showSchedules?: boolean
|
||||
showFutureJobs?: boolean
|
||||
argFilter: string | undefined
|
||||
@@ -43,6 +39,7 @@
|
||||
externalJobs?: Job[] | undefined
|
||||
concurrencyKey: string | null
|
||||
tag: string | null
|
||||
showSkipped?: boolean
|
||||
extendedJobs?: ExtendedJobs | undefined
|
||||
argError?: string
|
||||
resultError?: string
|
||||
@@ -64,7 +61,7 @@
|
||||
folder,
|
||||
path,
|
||||
success = undefined,
|
||||
isSkipped = false,
|
||||
showSkipped = false,
|
||||
showSchedules = true,
|
||||
showFutureJobs = true,
|
||||
argFilter,
|
||||
@@ -142,7 +139,7 @@
|
||||
let minQueueTs: string | undefined = undefined
|
||||
let minCompletedTs: string | undefined = undefined
|
||||
|
||||
let cursor = 0
|
||||
let cursor = 0
|
||||
|
||||
while (jobs && cursor < jobs?.length) {
|
||||
cursor++
|
||||
@@ -150,7 +147,7 @@
|
||||
if (job.type == 'CompletedJob') {
|
||||
minCompletedTs = job.completed_at
|
||||
break
|
||||
} else if (job.type == 'QueuedJob' && minQueueTs == undefined) {
|
||||
} else if (job.type == 'QueuedJob' && minQueueTs == undefined) {
|
||||
minQueueTs = job.created_at
|
||||
}
|
||||
}
|
||||
@@ -158,7 +155,7 @@
|
||||
const ts = minCompletedTs ?? minQueueTs
|
||||
|
||||
if (!ts) {
|
||||
sendUserToast("No jobs to load from")
|
||||
sendUserToast('No jobs to load from')
|
||||
return false
|
||||
}
|
||||
// const minCreated = lastJob?.created_at
|
||||
@@ -198,7 +195,7 @@
|
||||
: success == 'waiting'
|
||||
? false
|
||||
: undefined,
|
||||
isSkipped: isSkipped ? true : undefined,
|
||||
isSkipped: showSkipped ? undefined : false,
|
||||
// isFlowStep: jobKindsCat != 'all' ? false : undefined,
|
||||
hasNullParent: jobKindsCat != 'all' ? true : undefined,
|
||||
label: label === null || label === '' ? undefined : label,
|
||||
@@ -254,7 +251,7 @@
|
||||
jobKinds: jobKindsCat == 'all' || jobKinds == '' ? undefined : jobKinds,
|
||||
success: success == 'success' ? true : success == 'failure' ? false : undefined,
|
||||
running: success == 'running' ? true : undefined,
|
||||
isSkipped: isSkipped ? true : undefined,
|
||||
isSkipped: showSkipped ? undefined : false,
|
||||
isFlowStep: jobKindsCat != 'all' ? false : undefined,
|
||||
label: label === null || label === '' ? undefined : label,
|
||||
tag: tag === null || tag === '' ? undefined : tag,
|
||||
@@ -325,7 +322,7 @@
|
||||
jobs = sortMinDate(minTs, newJobs)
|
||||
externalJobs = []
|
||||
} else {
|
||||
extendedJobs = await fetchExtendedJobs(concurrencyKey, maxTs, extendedMinTs)
|
||||
extendedJobs = await fetchExtendedJobs(concurrencyKey, maxTs, extendedMinTs)
|
||||
const newJobs = extendedJobs.jobs
|
||||
const newExternalJobs = extendedJobs.obscured_jobs
|
||||
|
||||
@@ -429,14 +426,13 @@
|
||||
queueTs = lastQueueTs
|
||||
}
|
||||
|
||||
|
||||
loading = true
|
||||
let newJobs: Job[]
|
||||
if (concurrencyKey == null || concurrencyKey === '') {
|
||||
newJobs = await fetchJobs(maxTs, minTs ?? completedTs, queueTs)
|
||||
} else {
|
||||
// Obscured jobs have no ids, so we have to do the full request
|
||||
extendedJobs = await fetchExtendedJobs(concurrencyKey, maxTs, minTs ?? completedTs)
|
||||
extendedJobs = await fetchExtendedJobs(concurrencyKey, maxTs, minTs ?? completedTs)
|
||||
externalJobs = computeExternalJobs(extendedJobs.obscured_jobs)
|
||||
|
||||
// Filter on minTs here and not in the backend
|
||||
@@ -548,7 +544,7 @@
|
||||
label,
|
||||
success,
|
||||
worker,
|
||||
isSkipped,
|
||||
showSkipped,
|
||||
jobKinds,
|
||||
concurrencyKey,
|
||||
tag,
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
worker?: string | null
|
||||
tag?: string | null
|
||||
success?: 'running' | 'waiting' | 'suspended' | 'queued' | 'success' | 'failure' | undefined
|
||||
isSkipped?: boolean | undefined
|
||||
showSkipped?: boolean | undefined
|
||||
argFilter: string
|
||||
argError: string
|
||||
resultFilter: string
|
||||
@@ -63,7 +63,7 @@
|
||||
worker = $bindable(null),
|
||||
tag = $bindable(null),
|
||||
success = $bindable(undefined),
|
||||
isSkipped = $bindable(undefined),
|
||||
showSkipped = $bindable(undefined),
|
||||
argFilter = $bindable(),
|
||||
argError = $bindable(),
|
||||
resultFilter = $bindable(),
|
||||
@@ -950,7 +950,7 @@
|
||||
|
||||
<Label label="Show skipped flows">
|
||||
<div class="flex flex-row gap-1 items-center">
|
||||
<Toggle size="sm" bind:checked={isSkipped} />
|
||||
<Toggle size="sm" bind:checked={showSkipped} />
|
||||
</div>
|
||||
{#snippet header()}
|
||||
<Tooltip>Skipped flows are flows that did an early break</Tooltip>
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
| 'failure'
|
||||
| undefined
|
||||
)
|
||||
let isSkipped: boolean | undefined = $state(
|
||||
page.url.searchParams.get('is_skipped') != undefined
|
||||
? page.url.searchParams.get('is_skipped') == 'true'
|
||||
let showSkipped: boolean | undefined = $state(
|
||||
page.url.searchParams.get('show_skipped') != undefined
|
||||
? page.url.searchParams.get('show_skipped') == 'true'
|
||||
: false
|
||||
)
|
||||
|
||||
@@ -131,9 +131,9 @@
|
||||
| 'success'
|
||||
| 'failure'
|
||||
| undefined
|
||||
isSkipped =
|
||||
page.url.searchParams.get('is_skipped') != undefined
|
||||
? page.url.searchParams.get('is_skipped') == 'true'
|
||||
showSkipped =
|
||||
page.url.searchParams.get('show_skipped') != undefined
|
||||
? page.url.searchParams.get('show_skipped') == 'true'
|
||||
: false
|
||||
|
||||
showSchedules =
|
||||
@@ -241,10 +241,10 @@
|
||||
searchParams.delete('success')
|
||||
}
|
||||
|
||||
if (isSkipped) {
|
||||
searchParams.set('is_skipped', isSkipped.toString())
|
||||
if (showSkipped) {
|
||||
searchParams.set('show_skipped', showSkipped.toString())
|
||||
} else {
|
||||
searchParams.delete('is_skipped')
|
||||
searchParams.delete('show_skipped')
|
||||
}
|
||||
|
||||
if (showSchedules) {
|
||||
@@ -524,7 +524,7 @@
|
||||
: success == 'waiting'
|
||||
? false
|
||||
: undefined,
|
||||
isSkipped: isSkipped ? undefined : false,
|
||||
isSkipped: showSkipped ? undefined : false,
|
||||
// isFlowStep: jobKindsCat != 'all' ? false : undefined,
|
||||
hasNullParent:
|
||||
path != undefined || path != undefined || jobKindsCat != 'all' ? true : undefined,
|
||||
@@ -735,7 +735,7 @@
|
||||
folder,
|
||||
path,
|
||||
success !== undefined,
|
||||
isSkipped,
|
||||
showSkipped,
|
||||
showSchedules,
|
||||
showFutureJobs,
|
||||
argFilter,
|
||||
@@ -818,7 +818,7 @@
|
||||
{worker}
|
||||
{label}
|
||||
{success}
|
||||
{isSkipped}
|
||||
{showSkipped}
|
||||
{argFilter}
|
||||
{resultFilter}
|
||||
{showSchedules}
|
||||
@@ -1025,7 +1025,7 @@
|
||||
<div class="flex flex-row gap-2">
|
||||
<RunsFilter
|
||||
bind:allowWildcards
|
||||
bind:isSkipped
|
||||
bind:showSkipped
|
||||
bind:user
|
||||
bind:folder
|
||||
bind:label
|
||||
|
||||
Reference in New Issue
Block a user