Skip to content

Commit

Permalink
Add count of workers (#1601)
Browse files Browse the repository at this point in the history
* Add count of workers

* Remove total text

* Add count badge

Co-authored-by: Laura Whitaker <[email protected]>

* Add Badge import

* Fix import order.

---------

Co-authored-by: Laura Whitaker <[email protected]>
  • Loading branch information
Alex-Tideman and laurakwhit authored Aug 30, 2023
1 parent a7248ac commit 082a1d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/components/workers-list.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import Badge from '$lib/holocene/badge.svelte';
import CompatibilityBadge from '$lib/holocene/compatibility-badge.svelte';
import EmptyState from '$lib/holocene/empty-state.svelte';
import Icon from '$lib/holocene/icon/icon.svelte';
Expand Down Expand Up @@ -36,7 +37,6 @@
{translate('task-queue')}:
<span class="select-all font-normal">{taskQueue}</span>
</h2>

{#if versionSets?.length}
<h2 class="text-base font-medium" data-testid="version-sets">
{translate('workers', 'version-sets')}
Expand Down Expand Up @@ -83,8 +83,14 @@
{/each}
</Table>
{/if}
<h2 class="text-base font-medium" data-testid="workers">
<h2
class="text-base font-medium flex items-center gap-2"
data-testid="workers"
>
{translate('workers', 'workers')}
<Badge type="count" class="rounded-sm"
>{workers?.pollers?.length || 0}</Badge
>
</h2>
<Table class="mb-6 w-full min-w-[600px] table-fixed">
<caption class="sr-only" slot="caption"
Expand Down

0 comments on commit 082a1d0

Please sign in to comment.