--- /dev/null
+<h2>Agreement detail</h2>
+
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel">search result</h4>
+ </div>
+ <div class="modal-body">
+ <div id="context">
+ <dl class="dl-horizontal">
+ {# Sanity default: if dd is empty, the values are permutated #}
+ <dt>Agreement Id</dt>
+ <dd>{{ agreement.agreement_id|default:" " }}</dd>
+ <dt>Provider</dt>
+ <dd>{{ agreement.context.provider|default:" " }}</dd>
+ <dt>Consumer</dt>
+ <dd>{{ agreement.context.consumer|default:" " }}</dd>
+ <dt>Service</dt>
+ <dd>{{ agreement.context.service_formatted|default:" " }}</dd>
+ <dt>Expiration time</dt>
+ <dd>{{ agreement.context.expirationtime|default:" " }}</dd>
+ </dl>
+ </div>
+
+ <div id="properties_summary">
+
+ <table class="table">
+ <tr>
+ <th>#</th>
+ <th>Metric name</th>
+ <th>Bounds</th>
+ <th># violations</th>
+ </tr>
+
+ {% for tname, t in agreement.guaranteeterms.items %}
+ <tr class="{{ t.statusclass }}">
+ <td>{{ forloop.counter }}</td>
+ <td>{{ t.servicelevelobjective.kpiname }}</td>
+ <td>({{ t.servicelevelobjective.bounds.0 }}, {{ t.servicelevelobjective.bounds.1 }})
+ </td>
+ <td>
+ <a href="{% url " agreement_term_violations " agreement.agreement_id t.name %}">{{ t.nviolations }}</a>
+ </td>
+ </tr>
+ {% empty %}
+ {% endfor %}
+ </table>
+ </div>
+
+ <div id="violations_summary_by_date">
+ <table class="table">
+ <tr>
+ <th>#</th>
+ <th>Date</th>
+ <th># violations</th>
+ </tr>
+
+ {% for date, violations in violations_by_date %}
+ <tr>
+ <td>{{ forloop.counter }}</td>
+ <td>{{ date|date }}</td>
+ <td>{{ violations|length }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+
+
+ <div class="modal-footer">
+ <a href="{{ backurl }}" class="btn btn-default btn-back">Back</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file