6 <div class="row" id="agreements" style="padding-top:1em;">
9 {% for row in ag_info %}
11 <!-- Modal - columns selector -->
12 <div class="modal fade" id="agreementModal{{row.agreement.agreement_id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
14 <style type="text/css" scoped>
20 <div class="modal-dialog modal-lg">
21 <div class="modal-content">
22 <div class="modal-header">
23 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
24 <h4 class="modal-title" id="myModalAgreement">Agreement details</h4>
26 <div class="modal-body">
29 <dd>{{ row.agreement.agreement_id|default:" " }}</dd>
31 <dd>{{ row.provider|default:" " }}</dd>
33 <dd>{{ row.agreement.context.consumer|default:" " }}</dd>
35 <dd>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the resources during the sliver lifetime</dd>
37 <dd>{{ row.agreement.context.testbed_formatted }}</dd>
38 <dt>Expiration date:</dt>
39 <dd>{{ row.date|default:" " }}</dd>
41 <div class="modal-footer">
42 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
50 <table class="table table-striped table-bordered" id="sla_table">
63 {% for row in ag_info %}
67 <td>{{ row.provider }}</td>
69 <td><a class="agreement-detail" data-toggle="modal" data-target="#agreementModal{{row.agreement.agreement_id}}">{{ row.agreement.context.template_id }}</a></td>
71 <td>{{ row.date }}</td>
72 <td>{{ row.status }}</td>
73 {% if row.ok == "true" %}
74 <td class="success">99% uptime for {{ row.result }}% resources</td>
75 {% elif row.ok == "false" %}
76 <td class="danger">99% uptime for {{ row.result }}% resources</td>
80 <!-- {% if row.ok == "false" %}
81 <td class="glyphicon glyphicon-remove-sign" style="color:red;"></td>
82 {% elif row.ok == "true" %}
83 <td class="glyphicon glyphicon-ok-sign" style="color:green;"></td>
97 <!-- <div class="row" style="float:right;">
98 <button id="showEvaluations" type="button" class="btn btn-default" onclick="displayDate()"><span class="glyphicon"></span>Show Evaluations</button>
102 $(document).ready(function() {
104 $('#sla_table').dataTable({
110 { "orderSequence": [ "desc", "asc" ] }
114 $('a.violation-detail').click(function () {
115 var a = $(this).data('agreement');
116 var v = $(this).data('violation');
117 $("#sla").load('/sla/agreements/' + a + '/guarantees/' + v + '/violations', {'slicename': '{{ slicename }}'});
120 // $('a.agreement-detail').click(function () {
121 // var a = $(this).data('agreement');
122 // $("#sla").load('/sla/agreements/' + a + '/detail');
125 $('tr.header').click(function(){
126 $(this).nextUntil('tr.header').toggle('fast');
127 $('.header .glyphicon').toggleClass('glyphicon-chevron-down glyphicon-chevron-right');