summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pharos-dashboard/templates')
-rw-r--r--pharos-dashboard/templates/dashboard/resource.html18
-rw-r--r--pharos-dashboard/templates/dashboard/resource_all.html17
-rw-r--r--pharos-dashboard/templates/dashboard/resource_detail.html34
-rw-r--r--pharos-dashboard/templates/dashboard/server_table.html2
-rw-r--r--pharos-dashboard/templates/layout.html4
5 files changed, 53 insertions, 22 deletions
diff --git a/pharos-dashboard/templates/dashboard/resource.html b/pharos-dashboard/templates/dashboard/resource.html
index 92d02f6..c9e5735 100644
--- a/pharos-dashboard/templates/dashboard/resource.html
+++ b/pharos-dashboard/templates/dashboard/resource.html
@@ -38,21 +38,21 @@
<script src="{% static "bower_components/flot/jquery.flot.time.js" %}"></script>
<script src="{% static "bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js" %}"></script>
+ <script src="{% static "js/flot-pie-chart.js" %}"></script>
+
<script type="text/javascript">
$(document).ready(function () {
$('#{{ resource.id }}_server_table').DataTable({});
$('#{{ resource.id }}_bookings_table').DataTable({});
+ $('#{{ resource.id }}_vpn_user_table').DataTable({});
- $(function () {
- var plotObj = $.plot($("#{{ resource.id }}_slave_utilization"), data_{{ resource.id }}, {
- series: {
- pie: {
- show: true
- }
- }
- });
+ var chart_id = "{{ resource.id }}_booking_utilization";
+ var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}";
+ loadChartData(chart_id, utilization_url);
- });
+ var chart_id = "{{ resource.id }}_jenkins_utilization";
+ var utilization_url = "{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}";
+ loadChartData(chart_id, utilization_url);
});
</script>
{% endblock extrajs %} \ No newline at end of file
diff --git a/pharos-dashboard/templates/dashboard/resource_all.html b/pharos-dashboard/templates/dashboard/resource_all.html
index 2078475..a770d4e 100644
--- a/pharos-dashboard/templates/dashboard/resource_all.html
+++ b/pharos-dashboard/templates/dashboard/resource_all.html
@@ -50,6 +50,7 @@
<script src="{% static "bower_components/flot/jquery.flot.resize.js" %}"></script>
<script src="{% static "bower_components/flot/jquery.flot.time.js" %}"></script>
<script src="{% static "bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js" %}"></script>
+ <script src="{% static "js/flot-pie-chart.js" %}"></script><
<script type="text/javascript">
$(document).ready(function () {
@@ -57,17 +58,15 @@
$('#{{ resource.id }}_server_table').DataTable({});
$('#{{ resource.id }}_bookings_table').DataTable({});
+ $('#{{ resource.id }}_vpn_user_table').DataTable({});
- $(function () {
- var plotObj = $.plot($("#{{ resource.id }}_slave_utilization"), data_{{ resource.id }}, {
- series: {
- pie: {
- show: true
- }
- }
- });
+ var chart_id = "{{ resource.id }}_booking_utilization";
+ var utilization_url = "{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}";
+ loadChartData(chart_id, utilization_url);
- });
+ var chart_id = "{{ resource.id }}_jenkins_utilization";
+ var utilization_url = "{% url 'dashboard:jenkins_utilization' resource_id=resource.id weeks=1 %}";
+ loadChartData(chart_id, utilization_url);
{% endfor %}
});
</script>
diff --git a/pharos-dashboard/templates/dashboard/resource_detail.html b/pharos-dashboard/templates/dashboard/resource_detail.html
index 4fba476..904fecd 100644
--- a/pharos-dashboard/templates/dashboard/resource_detail.html
+++ b/pharos-dashboard/templates/dashboard/resource_detail.html
@@ -29,7 +29,39 @@
</div>
</div>
<div class="row">
- <div class="col-lg-6">
+ <div class="col-lg-3">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Booking Utilization
+ <div class="pull-right">
+ <div class="form-group">
+ <select onchange="loadChartData('{{ resource.id }}_booking_utilization', this.value);">
+ <option value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=-4 %}">
+ Last Month
+ </option>
+ <option value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=-1 %}">
+ Last Week
+ </option>
+ <option value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=1 %}">
+ Next Week
+ </option>
+ <option selected="selected"
+ value="{% url 'dashboard:booking_utilization' resource_id=resource.id weeks=4 %}">
+ Next Month
+ </option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="panel-body">
+ <div class="flot-chart">
+ <div class="flot-chart-content"
+ id="{{ resource.id }}_booking_utilization"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-lg-9">
<div class="panel panel-default">
<div class="panel-heading">
Bookings
diff --git a/pharos-dashboard/templates/dashboard/server_table.html b/pharos-dashboard/templates/dashboard/server_table.html
index d47e520..fee7e8b 100644
--- a/pharos-dashboard/templates/dashboard/server_table.html
+++ b/pharos-dashboard/templates/dashboard/server_table.html
@@ -26,5 +26,5 @@
{{ server.storage }}
</th>
</tr>
-{% endfor %}`
+{% endfor %}
</tbody> \ No newline at end of file
diff --git a/pharos-dashboard/templates/layout.html b/pharos-dashboard/templates/layout.html
index db9490f..64fed4a 100644
--- a/pharos-dashboard/templates/layout.html
+++ b/pharos-dashboard/templates/layout.html
@@ -20,7 +20,7 @@
<link href="{% static "bower_components/metisMenu/dist/metisMenu.min.css" %}" rel="stylesheet">
<!-- Custom CSS -->
- <link href="{% static "bower_components/startbootstrap-sb-admin-2/dist/css/sb-admin-2.css" %}"
+ <link href="{% static "bower_components/startbootstrap-sb-admin-2-blackrockdigital/dist/css/sb-admin-2.css" %}"
rel="stylesheet">
<link href="{% static "css/theme.css" %}" rel="stylesheet">
@@ -65,7 +65,7 @@
<script src="{% static "bower_components/metisMenu/dist/metisMenu.min.js" %}"></script>
<!-- Custom Theme JavaScript -->
-<script src="{% static "bower_components/startbootstrap-sb-admin-2/dist/js/sb-admin-2.js" %}"></script>
+<script src="{% static "bower_components/startbootstrap-sb-admin-2-blackrockdigital/dist/js/sb-admin-2.js" %}"></script>
{% block extrajs %}
{% endblock extrajs %}