Restructure dashboard project for docker deploying
[pharos.git] / tools / pharos-dashboard / src / templates / dashboard / resource.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block extrahead %}
5     <!-- Morris Charts CSS -->
6     <link href="{% static "bower_components/morrisjs/morris.css" %}" rel="stylesheet">
7
8     <!-- DataTables CSS -->
9     <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
10           rel="stylesheet">
11
12     <!-- DataTables Responsive CSS -->
13     <link href="{% static "bower_components/datatables-responsive/css/dataTables.responsive.css" %}"
14           rel="stylesheet">
15 {% endblock extrahead %}
16
17
18 {% block content %}
19     {% include "dashboard/resource_detail.html" %}
20 {% endblock content %}
21
22
23 {% block extrajs %}
24     <!-- DataTables JavaScript -->
25     <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
26           rel="stylesheet">
27
28     <script src={% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}></script>
29     <script src={% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}></script>
30
31
32
33     <!-- Flot Charts JavaScript -->
34     <script src="{% static "bower_components/flot/excanvas.min.js" %}"></script>
35     <script src="{% static "bower_components/flot/jquery.flot.js" %}"></script>
36     <script src="{% static "bower_components/flot/jquery.flot.pie.js" %}"></script>
37     <script src="{% static "bower_components/flot/jquery.flot.resize.js" %}"></script>
38     <script src="{% static "bower_components/flot/jquery.flot.time.js" %}"></script>
39     <script src="{% static "bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js" %}"></script>
40
41     <script src="{% static "js/flot-pie-chart.js" %}"></script>
42
43     <script type="text/javascript">
44         $(document).ready(function () {
45             $('#{{ resource.id }}_server_table').DataTable({});
46             $('#{{ resource.id }}_bookings_table').DataTable({});
47             $('#{{ resource.id }}_vpn_user_table').DataTable({});
48
49             var chart_id = "{{ resource.id }}_booking_utilization";
50             var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}";
51             loadChartData(chart_id, utilization_url);
52
53             var chart_id = "{{ resource.id }}_jenkins_utilization";
54             var utilization_url = "{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}";
55             loadChartData(chart_id, utilization_url);
56         });
57     </script>
58 {% endblock extrajs %}