Campaigns | Electric Cherry
{#if loadError}{/if} {#if loading}
Loading…
{:else}

Active

{active.length}
{#if active.length === 0} {:else}
{#each active as d (d.id)} {@render deployRow(d)} {/each}
{/if}

History

{history.length}
{#if history.length === 0} {:else} {#each historyByDay as [day, rows] (day)}
{day}
{#each rows as d (d.id)} {@render deployRow(d)} {/each}
{/each} {/if}
saveContext()} label="campaigns" /> {/if}
{#snippet deployRow(d: Deployment)}
{#if flash && flashId === d.id}
{flash}
{/if}
{d.action} campaign {d.id} {#if d.action === 'promote' || d.action === 'rollback'} {scriptSummary(d)} {/if} {#if d.rolled_back_by} Rolled back {/if}
{#if d.action === 'promote' && !d.rolled_back_by && d.servers.some(server => !server.server_deleted_at)} {/if} {ago(d.started_at)}
{#each d.servers as s (s.server)} {s.players !== null && s.players > 0 ? ` (${s.players} players at last check)` : ''} {/each}
{d.id}
{#each ['done','pending','failed','held','manual'] as state} {@const n = d.servers.filter((s) => s.restart_state === state).length} {#if n > 0} {n} {/if} {/each}
{/snippet}