<div class="row">
    <div class="col-md-12">
        <h1><span class="glyphicon glyphicon-lock" aria-hidden="true"></span> Security</h1>
    </div>
</div>

<div class="row">
    <div class="col-md-12">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            {{> securitymenu}}
        </ul>

        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="overview">

                <p>&nbsp;</p>

                <table class="table table-responsive">
                    <thead>
                        <tr>
                            <th>
                                Environment
                            </th>
                            <th>
                                Action
                            </th>
                            <th>
                                Result
                            </th>
                            <th>
                                IP
                            </th>
                            <th>
                                Session
                            </th>
                            <th>
                                Time
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        {{#if results}}

                            {{#each results}}
                                <tr>
                                    <td>
                                        {{protocol}}
                                    </td>
                                    <td>


                                        {{#if asp}}
                                            <div class="pull-right">
                                                <strong>{{asp.name}}</strong>
                                            </div>
                                        {{/if}}

                                        {{action}}

                                        ({{events}})
                                    </td>
                                    <td>
                                        {{#if label}}
                                            <span class="label label-{{label}}">{{result}}</span>
                                        {{else}}
                                            {{result}}
                                        {{/if}}
                                    </td>
                                    <td>
                                        {{ip}}
                                    </td>
                                    <td>
                                        {{#if sess}}
                                            <em>{{sessStr}}</em>
                                        {{else}}
                                            –
                                        {{/if}}
                                    </td>
                                    <td class="datestring-fixed text-right" title="{{created}}">
                                        {{created}}
                                    </td>
                                </tr>
                            {{/each}}
                        {{else}}
                            <tr>
                                <td colspan="6">
                                    <em>No events found</em>
                                </td>
                            </tr>
                        {{/if}}
                    </tbody>
                </table>

                <nav aria-label="nav">
                    <ul class="pager">
                        {{#if previousCursor}}
                            <li class="previous"><a href="/account/security/events?previous={{previousCursor}}&amp;page={{previousPage}}"><span aria-hidden="true">&larr;</span> Newer</a></li>
                        {{else}}
                            <li class="previous disabled"><a href="#"><span aria-hidden="true">&larr;</span> Newer</a></li>
                        {{/if}}

                        {{#if nextCursor}}
                            <li class="next"><a href="/account/security/events?next={{nextCursor}}&amp;page={{nextPage}}">Older <span aria-hidden="true">&rarr;</span></a></li>
                        {{else}}
                            <li class="next disabled"><a href="#">Older <span aria-hidden="true">&rarr;</span></a></li>
                        {{/if}}
                    </ul>
                </nav>

            </div>
        </div>
    </div>
</div>
