Cleans up some HTML
[pharos-tools.git] / dashboard / src / templates / dashboard / resource_all.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block extrahead %}
5     {{ block.super }}
6     <!-- Morris Charts CSS -->
7     <link href="{% static "bower_components/morrisjs/morris.css" %}" rel="stylesheet">
8
9     <!-- DataTables CSS -->
10     <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
11           rel="stylesheet">
12
13     <!-- DataTables Responsive CSS -->
14     <link href="{% static "bower_components/datatables-responsive/css/dataTables.responsive.css" %}"
15           rel="stylesheet">
16 {% endblock extrahead %}
17
18
19 {% block content %}
20     {% for resource, utilization, bookings in pods %}
21         <div class="row">
22             <div class="col-lg-12">
23                 <div class="panel panel-default">
24                     <div class="panel-heading">
25                         {{ resource.name }}
26                     </div>
27                     <div class="panel-body">
28                         {% include "dashboard/resource_detail.html" %}
29                     </div>
30                 </div>
31             </div>
32         </div>
33     {% endfor %}
34 {% endblock content %}
35
36
37 {% block extrajs %}
38     <!-- DataTables JavaScript -->
39     <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
40           rel="stylesheet">
41
42     <script src={% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}></script>
43     <script src={% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}></script>
44
45
46
47     <!-- Flot Charts JavaScript -->
48     <script src="{% static "bower_components/flot/excanvas.min.js" %}"></script>
49     <script src="{% static "bower_components/flot/jquery.flot.js" %}"></script>
50     <script src="{% static "bower_components/flot/jquery.flot.pie.js" %}"></script>
51     <script src="{% static "bower_components/flot/jquery.flot.resize.js" %}"></script>
52     <script src="{% static "bower_components/flot/jquery.flot.time.js" %}"></script>
53     <script src="{% static "bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js" %}"></script>
54     <script src="{% static "js/flot-pie-chart.js" %}"></script><
55
56     <script type="text/javascript">
57         $(document).ready(function () {
58             {% for resource, utilization, bookings in pods %}
59
60                 $('#{{ resource.id }}_server_table').DataTable({});
61                 $('#{{ resource.id }}_bookings_table').DataTable({});
62                 $('#{{ resource.id }}_vpn_user_table').DataTable({});
63
64                 var chart_id = "{{ resource.id }}_booking_utilization";
65                 var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}";
66                 loadChartData(chart_id, utilization_url);
67             {% endfor %}
68         });
69     </script>
70 {% endblock extrajs %}