|
1 | 1 | <script lang="ts"> |
2 | | - import { to } from '$lib/paths'; |
| 2 | + import { openRow, to } from '$lib/paths'; |
3 | 3 | import WorkflowIcon from '@lucide/svelte/icons/workflow'; |
4 | 4 | import LayersIcon from '@lucide/svelte/icons/layers'; |
5 | | - import { goto } from '$app/navigation'; |
6 | 5 | import type { JobKind, Trigger } from '$lib/api'; |
7 | 6 | import AppTopbar from '$lib/components/app-topbar.svelte'; |
8 | 7 | import ChoiceFilter from '$lib/components/list/choice-filter.svelte'; |
|
113 | 112 | <tbody> |
114 | 113 | {#each filtered as j (j.key)} |
115 | 114 | {@const jobTriggers = j.triggerIds.map((id) => triggerById.get(id)).filter((t) => t !== undefined)} |
116 | | - <tr onclick={() => goto(to(`/jobs/${j.key}`))}> |
| 115 | + <tr onclick={(e) => openRow(e, `/jobs/${j.key}`)}> |
117 | 116 | <td> |
118 | 117 | <div class="cell-name"> |
119 | 118 | {#if j.kind === 'group'}<LayersIcon size={15} strokeWidth={1.75} />{:else}<WorkflowIcon size={15} strokeWidth={1.75} />{/if} |
120 | 119 | <div class="min-w-0"> |
121 | | - <a href={to(`/jobs/${j.key}`)} onclick={(e) => e.stopPropagation()}>{j.key}</a> |
| 120 | + <a href={to(`/jobs/${j.key}`)}>{j.key}</a> |
122 | 121 | <div class="cell-desc">{j.description}</div> |
123 | 122 | </div> |
124 | 123 | </div> |
|
153 | 152 | aria-label="{t.state === 'running' ? 'Pause' : 'Turn on'} {t.name}" |
154 | 153 | ></button> |
155 | 154 | </span> |
156 | | - <a class:muted={t.state === 'paused'} href={to(`/triggers/${t.id}`)} title={t.cadence} onclick={(e) => e.stopPropagation()}>{t.name}</a> |
| 155 | + <a class:muted={t.state === 'paused'} href={to(`/triggers/${t.id}`)} title={t.cadence}>{t.name}</a> |
157 | 156 | </div> |
158 | 157 | {/each} |
159 | 158 | </div> |
|
162 | 161 | {#if showOwner}<td class="muted">{j.owner ?? '—'}</td>{/if} |
163 | 162 | <td> |
164 | 163 | {#if j.lastRun} |
165 | | - <a class="last-run" href={to(`/runs/${j.lastRun.id}`)} onclick={(e) => e.stopPropagation()}> |
| 164 | + <a class="last-run" href={to(`/runs/${j.lastRun.id}`)}> |
166 | 165 | <StatusLabel tone={runStatusTone[j.lastRun.status]} label={runStatusLabel[j.lastRun.status]} /> |
167 | 166 | {#if j.lastRun.startedAt}<RelativeTime value={formatAgo(j.lastRun.startedAt, app.now)} exact={formatStamp(j.lastRun.startedAt)} />{/if} |
168 | 167 | </a> |
|
0 commit comments