{{!< default}}

{{! Grab 1st coreName value (it will be same value for entire set).}}
{{#if alerts.0.coreName}}
    <h2>Alerts from Particle Core: {{alerts.0.coreName}} </h2>
{{else}}
    <h2>Alerts from Particle Core: {{alerts.0.coreId}} </h2>
{{/if}}

<table class="table table-striped">
    <thead>
        <tr>
            <th>Timestamp</th>
            <th>Status</th>
        </tr>
    </thead>
    <tbody>
        {{#each alerts}}
            <tr>
                <td>{{this.published_at}}</td>
                <td>{{this.status}}</td>
            </tr>
        {{/each}}
    </tbody>
</table>

<script>
    setTimeout(
        function() {
            location.reload();
        }, 10000
    );
</script>