nit runs page reset

This commit is contained in:
Ruben Fiszel
2025-09-24 19:05:35 +00:00
parent 6e58897f82
commit 5298056c08
3 changed files with 12 additions and 2 deletions
@@ -19,6 +19,7 @@
lightMode?: boolean
item?: MenubarMenuElements['item'] | undefined
class?: string
onclick?: (ev: MouseEvent) => any
}
let {
@@ -31,7 +32,8 @@
disabled = false,
lightMode = false,
item = undefined,
class: classNames = ''
class: classNames = '',
onclick = undefined
}: Props = $props()
let isSelected = $state(false)
@@ -56,6 +58,7 @@
goto(href)
}
}}
{onclick}
class={twMerge(
'group flex items-center px-2 py-2 text-sm font-light rounded-md h-8 gap-3',
isSelected
@@ -172,7 +172,12 @@
href: `${base}/runs`,
icon: Play,
aiId: 'sidebar-menu-link-runs',
aiDescription: 'Button to navigate to runs'
aiDescription: 'Button to navigate to runs',
onclick: () => {
setTimeout(() => {
window.dispatchEvent(new Event('popstate'))
}, 100)
}
},
{
label: 'Variables',
@@ -66,6 +66,7 @@
let allowWildcards: boolean = $state(page.url.searchParams.get('allow_wildcards') == 'true')
let concurrencyKey: string | null = $state(page.url.searchParams.get('concurrency_key'))
let tag: string | null = $state(page.url.searchParams.get('tag'))
// Rest of filters handled by RunsFilter
let success: 'running' | 'suspended' | 'waiting' | 'success' | 'failure' | undefined = $state(
(page.url.searchParams.get('success') ?? undefined) as
@@ -350,6 +351,7 @@
}
function reset() {
path = page.params.path ?? null
minTs = undefined
maxTs = undefined
jobs = undefined