6 <div class="row" id="agreements">
7 <table class="table dataTable" id="sla_table" >
10 <th colspan="2">Provider</th>
22 <td><span class="glyphicon glyphicon-chevron-down"></span></td>
27 {% for a in agreements %}
30 <!-- Modal - columns selector -->
31 <div class="modal fade" id="agreementModal{{a.agreement_id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
33 <style type="text/css" scoped>
39 <div class="modal-dialog modal-lg">
40 <div class="modal-content">
41 <div class="modal-header">
42 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
43 <h4 class="modal-title" id="myModalAgreement">Agreement details</h4>
45 <div class="modal-body">
48 <dd>{{ a.agreement_id|default:" " }}</dd>
50 <dd>{{ a.context.provider|default:" " }}</dd>
52 <dd>{{ a.context.consumer|default:" " }}</dd>
54 <dd>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the resources during the sliver lifetime</dd>
56 <dd>{{ a.context.testbed_formatted }}</dd>
58 <dd>{{ a.context.time_formatted|default:" " }}</dd>
60 <div class="modal-footer">
61 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
68 {% if a.guaranteestatus == "VIOLATED" %}
69 <td class="glyphicon glyphicon-remove-sign" style="color:red;"></td>
70 {% elif a.guaranteestatus == "FULFILLED" %}
71 <td class="glyphicon glyphicon-ok-sign" style="color:green;"></td>
75 <td>{{ a.context.template_id }}</td>
76 <td>{{ a.context.time_formatted }}</td>
78 {% with a.agreement_id as key %}
81 <!-- <a class="agreement-detail" href="{% url "agreement_details" a.agreement_id %}" data-toggle="modal" data-target="#agreementModal">View Agreement</a> -->
82 <!-- <a class="agreement-detail" href="#" data-agreement="{{ a.agreement_id }}">View Agreement</a> -->
83 <a class="agreement-detail" data-toggle="modal" data-target="#agreementModal{{a.agreement_id}}">View Agreement</a>
86 {% for k,v in enforcements.items %}
89 {% if v == "ACTIVE" %}
91 {% elif v == "UNACTIVE" %}
96 {% if a.guaranteestatus == "VIOLATED" and v == "UNACTIVE" %}
97 <td style="font-weight: bold">
98 Result: 99% uptime for
99 {% for vi, value in last_violation_list.items %}
100 {% if a.agreement_id == vi %}
106 {% elif a.guaranteestatus == "FULFILLED" and v == "UNACTIVE" %}
107 <td style="font-weight: bold">
108 Result: 99% uptime for
109 {% for vi, value in last_violation_list.items %}
110 {% if a.agreement_id == vi %}
121 <!-- <td>{{slicename}}</td> -->
129 <!-- {% for tname,t in a.guaranteeterms.items %}
130 <td> {{ t.servicelevelobjective.kpiname }}</td>
132 {% if t.status == "VIOLATED" %}
134 <a class="violation-detail" href="{% url "agreement_term_violations" a.agreement_id t.name %}" data-toggle="modal" data-target="#violationModal">View Violations</a>
135 <a class="violation-detail" href="#"
136 data-agreement="{{ a.agreement_id }}"
137 data-violation="{{ t.name }}">View Violations</a>
138 <a class="violation-detail" href="#" data-agreement="{{ a.agreement_id }}" data-violation="{{ t.name }}">{{last_violation_list}}</a>
143 <td id="status" style="display:none;">
159 <!-- <div class="row" style="float:right;">
160 <button id="showEvaluations" type="button" class="btn btn-default" onclick="displayDate()"><span class="glyphicon"></span>Show Evaluations</button>
164 $(document).ready(function() {
165 $('a.violation-detail').click(function () {
166 var a = $(this).data('agreement');
167 var v = $(this).data('violation');
168 $("#sla").load('/sla/agreements/' + a + '/guarantees/' + v + '/violations', {'slicename': '{{ slicename }}'});
171 // $('a.agreement-detail').click(function () {
172 // var a = $(this).data('agreement');
173 // $("#sla").load('/sla/agreements/' + a + '/detail');
176 $('tr.header').click(function(){
177 $(this).nextUntil('tr.header').toggle('fast');
178 $('.header .glyphicon').toggleClass('glyphicon-chevron-down glyphicon-chevron-right');