{% extends 'ftp_deploy/base.html' %}

{% block title %}
   <h2>Log</h2> 
{% endblock title %}

{% block content %}
    <br>
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">Filter</div>
                <div class="panel-body">
                    <div class="row">
                        <form action="{% url 'ftpdeploy_log' %}" method="post" id="log-filter" class="form-horizontal"> 
                            <div class="col-sm-5">
                                {% csrf_token %}
                                <select name="services" class="form-control" placeholder="Select Service">
                                    <option></option>
                                    {% for service in service_list %}
                                        <option value="{{service.pk}}">{{service.repo_name}}</option>
                                    {% endfor %}
                                </select>
                            </div>
                            <div class="col-sm-6">
                                <input type="checkbox" name="status" id="status"> <label for="status" class="control-label">Fails only</label>
                                
                            </div>
                        </form>
                    </div>
                </div>
                
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
           <table class="table table-hover">
                <thead>
                    <tr>
                        <th>Service</th>
                        <th>Branch</th>
                        <th>Date</th>
                        <th>Commits</th>
                        <th>User</th>
                        <th>Status</th>
                    </tr>
                </thead>
                <tbody id="log-list">
                    {% include "ftp_deploy/log/list.html" %}
                </tbody>
            </table>
            {% include "ftp_deploy/pagination.html" %}
        </div>
    </div>


{% endblock content %}