Cleans up some HTML
[pharos-tools.git] / dashboard / src / templates / dashboard / resource.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     {% include "dashboard/resource_detail.html" %}
21 {% endblock content %}
22
23
24 {% block extrajs %}
25     <!-- DataTables JavaScript -->
26     <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
27           rel="stylesheet">
28
29     <script src={% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}></script>
30     <script src={% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}></script>
31
32
33
34     <!-- Flot Charts JavaScript -->
35     <script src="{% static "bower_components/flot/excanvas.min.js" %}"></script>
36     <script src="{% static "bower_components/flot/jquery.flot.js" %}"></script>
37     <script src="{% static "bower_components/flot/jquery.flot.pie.js" %}"></script>
38     <script src="{% static "bower_components/flot/jquery.flot.resize.js" %}"></script>
39     <script src="{% static "bower_components/flot/jquery.flot.time.js" %}"></script>
40     <script src="{% static "bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js" %}"></script>
41
42     <script src="{% static "js/flot-pie-chart.js" %}"></script>
43
44     <script type="text/javascript">
45         $(document).ready(function () {
46             $('#{{ resource.id }}_server_table').DataTable({});
47             $('#{{ resource.id }}_bookings_table').DataTable({});
48             $('#{{ resource.id }}_vpn_user_table').DataTable({});
49
50             var chart_id = "{{ resource.id }}_booking_utilization";
51             var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}";
52             loadChartData(chart_id, utilization_url);
53
54             loadChartData(chart_id, utilization_url);
55         });
56     </script>
57 {% endblock extrajs %}