blob: 904fecd419ad1570a771abca4f43ca02062f2736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
<div class="row">
<div class="col-lg-3">
<div class="panel panel-default">
<div class="panel-heading">
Utilization
</div>
<div class="panel-body">
<div class="flot-chart">
<div class="flot-chart-content" id="{{ resource.id }}_slave_utilization"></div>
</div>
</div>
</div>
</div>
<div class="col-lg-9">
<div class="panel panel-default">
<div class="panel-heading">
Servers
</div>
<div class="panel-body">
<div class="dataTables_wrapper">
<table class="table table-striped table-bordered table-hover"
id="{{ resource.id }}_server_table" cellspacing="0"
width="100%">
{% include "dashboard/server_table.html" %}
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<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
</div>
<div class="panel-body">
<div class="dataTables_wrapper">
<table class="table table-striped table-bordered table-hover"
id="{{ resource.id }}_bookings_table" cellspacing="0"
width="100%">
{% include "booking/booking_table.html" %}
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var data_{{ resource.id }} = [{
label: "Offline",
data: {{ utilization.offline }},
color: '#d9534f'
}, {
label: "Online",
data: {{ utilization.online }},
color: '#5cb85c'
}, {
label: "Idle",
data: {{ utilization.idle }},
color: '#5bc0de'
}];
</script>
|