Merge "update the huawei's lab"
[pharos.git] / tools / pharos-dashboard / templates / dashboard / resource_all.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     {% for resource, utilization, bookings in pods %}
20         <div class="row">
21             <div class="col-lg-12">
22                 <div class="panel panel-default">
23                     <div class="panel-heading">
24                         {{ resource.name }}
25                     </div>
26                     <div class="panel-body">
27                         {% include "dashboard/resource_detail.html" %}
28                     </div>
29                 </div>
30             </div>
31         </div>
32     {% endfor %}
33 {% endblock content %}
34
35
36 {% block extrajs %}
37     <!-- DataTables JavaScript -->
38     <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
39           rel="stylesheet">
40
41     <script src={% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}></script>
42     <script src={% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}></script>
43
44
45
46     <!-- Flot Charts JavaScript -->
47     <script src="{% static "bower_components/flot/excanvas.min.js" %}"></script>
48     <script src="{% static "bower_components/flot/jquery.flot.js" %}"></script>
49     <script src="{% static "bower_components/flot/jquery.flot.pie.js" %}"></script>
50     <script src="{% static "bower_components/flot/jquery.flot.resize.js" %}"></script>
51     <script src="{% static "bower_components/flot/jquery.flot.time.js" %}"></script>
52     <script src="{% static "bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js" %}"></script>
53     <script src="{% static "js/flot-pie-chart.js" %}"></script><
54
55     <script type="text/javascript">
56         $(document).ready(function () {
57             {% for resource, utilization, bookings in pods %}
58
59                 $('#{{ resource.id }}_server_table').DataTable({});
60                 $('#{{ resource.id }}_bookings_table').DataTable({});
61                 $('#{{ resource.id }}_vpn_user_table').DataTable({});
62
63                 var chart_id = "{{ resource.id }}_booking_utilization";
64                 var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}";
65                 loadChartData(chart_id, utilization_url);
66
67                 var chart_id = "{{ resource.id }}_jenkins_utilization";
68                 var utilization_url = "{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}";
69                 loadChartData(chart_id, utilization_url);
70             {% endfor %}
71         });
72     </script>
73 {% endblock extrajs %}