Campaigns | Electric Cherry
{#if filtered}{/if}
{#if loadError}{/if} {#if loading}
Loading campaigns…
{:else}
{#if active.length}

Active {active.length}

{@render campaignTable(active, true)}
{:else}

{filtered ? 'No active campaigns match these filters.' : 'No active campaigns.'}

{/if}

History {historyTotal}

{#if history.length} {@render campaignTable(history)} {#if historyTotal > 25} {/if} {:else} {/if}
{/if}
{#snippet campaignTable(rows: Deployment[], showProgress = false)}
{#each rows as campaign (campaign.id)} {@const outcome = campaignOutcome(campaign)} {/each}
{showProgress ? 'Active campaigns' : 'Campaign history'}
CampaignServersStatusStarted
{campaignTitle(campaign)} {campaign.servers.length}
{outcome.label} {#if showProgress}{/if}
{/snippet}