Skip to content

Commit

Permalink
Add links to workflow counts on list workflows page (#2315)
Browse files Browse the repository at this point in the history
* Add links to workflow counts on list workflows page

* Update link structure
  • Loading branch information
KATIETOLER authored Sep 11, 2024
1 parent 7e73a9d commit 83abb85
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/lib/components/workflow/workflow-counts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { page } from '$app/stores';
import Link from '$lib/holocene/link.svelte';
import Skeleton from '$lib/holocene/skeleton/index.svelte';
import { workflowStatuses } from '$lib/models/workflow-status';
import { fetchWorkflowCountByExecutionStatus } from '$lib/services/workflow-counts';
Expand Down Expand Up @@ -121,13 +122,18 @@
<div class="flex min-h-[24px] flex-wrap items-center gap-2">
{#each statusGroups as { count, status } (status)}
{#if !loading}
<WorkflowCountStatus
{status}
{count}
newCount={newStatusGroups.find((g) => g.status === status)
? newStatusGroups.find((g) => g.status === status).count - count
: 0}
/>
<Link
href={`/namespaces/${namespace}/workflows?query=%60ExecutionStatus%60%3D"${status}"`}
role="button"
>
<WorkflowCountStatus
{status}
{count}
newCount={newStatusGroups.find((g) => g.status === status)
? newStatusGroups.find((g) => g.status === status).count - count
: 0}
/>
</Link>
{:else}
<Skeleton class="h-6 w-24 rounded" />
{/if}
Expand Down

0 comments on commit 83abb85

Please sign in to comment.