{% extends "layout.html" %}
{% block content %}
	  <div class="page-header">
      <h1>Invalidated Certificates <small>revoked by admin</small></h1>
    </div>

    <div class="row">
      <div class="margin-lr-20">
        <a class="btn btn-default" href="/generate_crl" role="button"  title="Regenerate Certificate Revocation List file">
          <i class="fa fa-refresh" aria-hidden="true"></i> Re-Generate CRL file</a>
        <a class="btn btn-default" href="/revocation_requests" role="button"  title="View Revocation Request list">
          <i class="fa fa-external-link-square" aria-hidden="true"></i> Revocation Requests</a>
      </div>
    </div>

		<div class="row">
		  <div class="col-md-12">
				<div class="panel panel-danger margin-top-40 table">
					<div class="panel-heading">
						<h3 class="panel-title">All Signed Certificates</h3>
						<div class="pull-right">
							<span class="clickable filter" data-toggle="tooltip" title="Toggle table filter" data-container="body">
								<i class="glyphicon glyphicon-filter"></i>
							</span>
						</div>
					</div>
					<div class="panel-body">
						<input type="text" class="form-control" id="cacert-table-filter" data-action="filter" data-filters="#cacert-table" placeholder="Filter Columns" />
					</div>
					<table class="table table-hover" id="cacert-table">
						<thead>
							<tr>
								<th>#</th>
								<th>serial</th>
								<th>Name</th>
								<th>Filename</th>
								<th>Common Name</th>
								<th>Start Date</th>
								<th>Expiration Date</th>
							</tr>
						</thead>
						<tbody>
							{% for cert in data_list -%}
        		  <tr>
        		    <td>{{ cert['index'] }}</td>
        		    <td><a href="/viewcert?name={{ cert['filename'] }}&type=X509">{{ cert['serial'] }}</a></td>
        		    <td><a href="/viewcert?name={{ cert['filename'] }}&type=X509">{{ cert['name'] }}</a></td>
        		    <td><a href="/viewcert?name={{ cert['filename'] }}&type=X509">{{ cert['filename'] }}</a></td>
        		    <td>{{ cert['cn'] }}</td>
        		    <td>{{ cert['start_date'] }}</td>
        		    <td>{{ cert['expiration_date'] }}</td>
        		  </tr>
        		  {% endfor -%}
						</tbody>
					</table>
				</div>
			</div>
		</div>
{% endblock %}