2
{% load url from future %}
4
<div id="samples_url" url="{% url "horizon:admin:metering:samples" %}"></div>
5
<div id="ceilometer-stats">
6
<form class="form-horizontal"
7
id="linechart_general_form">
9
<div class="control-group">
10
<label for="meter" class="control-label">{% trans "Metric" %}: </label>
11
<div class="controls line_chart_time_picker">
12
<select data-line-chart-command="select_box_change"
13
name="meter" id="meter" class="span2 example">
14
<optgroup label='{% trans "Compute (Nova)" %}'>
15
{% for meter in meters %}
16
<option title="{{ meter.title }}" value="{{ meter.name }}" data-unit="">
22
<optgroup label='{% trans "Network (Neutron)" %}'>
23
<option title='{% trans "Duration of network" %}' value="network" data-unit="">network</option>
24
<option title='{% trans "Creation requests for this network" %}' value="network.create" data-unit="">network.create</option>
25
<option title='{% trans "Update requests for this network" %}' value="network.update" data-unit="">network.update</option>
26
<option title='{% trans "Duration of subnet" %}' value="subnet" data-unit="">subnet</option>
27
<option title='{% trans "Creation requests for this subnet" %}' value="subnet.create" data-unit="">subnet.create</option>
28
<option title='{% trans "Update requests for this subnet" %}' value="subnet.update" data-unit="">subnet.update</option>
29
<option title='{% trans "Creation requests for this port" %}' value="port.create" data-unit="">port.create</option>
30
<option title='{% trans "Update requests for this port" %}' value="port.update" data-unit="">port.update</option>
31
<option title='{% trans "Duration of router" %}' value="router" data-unit="">router</option>
32
<option title='{% trans "Creation requests for this router" %}' value="router.create" data-unit="">router.create</option>
33
<option title='{% trans "Update requests for this router" %}' value="router.update" data-unit="">router.update</option>
34
<option title='{% trans "Duration of floating ip" %}' value="ip.floating" data-unit="">ip.floating</option>
35
<option title='{% trans "Creation requests for this floating ip" %}' value="ip.floating.create" data-unit="">ip.floating.create</option>
36
<option title='{% trans "Update requests for this floating ip" %}' value="ip.floating.update" data-unit="">ip.floating.update</option>
39
<optgroup label='{% trans "Image (Glance)" %}'>
40
<option title='{% trans "Uploaded image size" %}' value="image.size" data-unit="">image.size</option>
41
<option title='{% trans "Number of update on the image" %}' value="image.update " data-unit="">image.update </option>
42
<option title='{% trans "Number of upload of the image" %}' value="image.upload " data-unit="">image.upload </option>
43
<option title='{% trans "Number of delete on the image" %}' value="image.delete " data-unit="">image.delete </option>
44
<option title='{% trans "Image is downloaded" %}' value="image.download" data-unit="">image.download</option>
45
<option title='{% trans "Image is served out" %}' value="image.serve" data-unit="">image.serve</option>
48
<optgroup label='{% trans "Volume (Cinder)" %}'>
49
<option title='{% trans "Duration of volume" %}' value="volume" data-unit="">volume</option>
50
<option title='{% trans "Size of volume" %}' value="volume.size" data-unit="">volume.size</option>
53
<optgroup label='{% trans "Object Storage (Swift)" %}'>
54
<option title='{% trans "Number of objects" %}' value="storage.objects" data-unit="">storage.objects</option>
55
<option title='{% trans "Total size of stored objects" %}' value="storage.objects.size" data-unit="">storage.objects.size</option>
56
<option title='{% trans "Number of containers" %}' value="" data-unit="storage.objects.containers">storage.objects.containers</option>
57
<option title='{% trans "Number of incoming bytes" %}' value="storage.objects.incoming.bytes" data-unit="">storage.objects.incoming.bytes</option>
58
<option title='{% trans "Number of outgoing bytes" %}' value="storage.objects.outgoing.bytes" data-unit="">storage.objects.outgoing.bytes</option>
59
<option title='{% trans "Number of API requests against swift" %}' value="storage.api.request" data-unit="">storage.api.request</option>
62
<optgroup label='{% trans "Energy (Kwapi)" %}'>
63
<option title='{% trans "Amount of energy" %}' value="energy" data-unit="">energy</option>
64
<option title='{% trans "Power consumption" %}' value="power" data-unit="">power</option>
70
<div class="control-group">
71
<label for="group_by" class="control-label">{% trans "Group by" %}: </label>
72
<div class="controls">
73
<select data-line-chart-command="select_box_change"
74
id="group_by" name="group_by" class="span2">
75
<option value="" selected="selected">{% trans "--" %}</option>
76
<option selected="selected" value="project" selected>{% trans "Project" %}</option>
80
<div class="control-group">
81
<label for="stats_attr" class="control-label">{% trans "Value" %}: </label>
82
<div class="controls">
83
<select data-line-chart-command="select_box_change"
84
id="stats_attr" name="stats_attr" class="span2">
86
<option selected="selected" value="avg">{% trans "Avg." %}</option>
87
<option value="min">{% trans "Min." %}</option>
88
<option value="max">{% trans "Max." %}</option>
89
<option value="sum">{% trans "Sum." %}</option>
93
<div class="control-group">
94
<label for="date_options" class="control-label">{% trans "Period" %}: </label>
95
<div class="controls">
96
<select data-line-chart-command="select_box_change"
97
id="date_options" name="date_options" class="span2">
98
<option value="1">{% trans "Last day" %}</option>
99
<option value="7" selected="selected">{% trans "Last week" %}</option>
100
<option value="15">{% trans "Last 15 days" %}</option>
101
<option value="30">{% trans "Last 30 days" %}</option>
102
<option value="365">{% trans "Last year" %}</option>
103
<option value="other">{% trans "Other" %}</option>
107
<div class="control-group" id="date_from">
108
<label for="date_from" class="control-label">{% trans "From" %}: </label>
109
<div class="controls">
110
<input data-line-chart-command="date_picker_change"
111
type="text" id="date_from" name="date_from" class="span2 example"/>
114
<div class="control-group" id="date_to">
115
<label for="date_to" class="control-label">{% trans "To" %}: </label>
116
<div class="controls">
117
<input data-line-chart-command="date_picker_change"
118
type="text" name="date_to" class="span2 example"/>
125
<div class="info row-fluid detail">
127
<h4>{% trans "Statistics of all resources" %}</h4>
128
<hr class="header_rule" />
129
<div class="info row-fluid detail">
130
<div class="span9 chart_container">
132
data-chart-type="line_chart"
133
data-url="{% url 'horizon:admin:metering:samples'%}"
134
data-form-selector='#linechart_general_form'
135
data-legend-selector="#legend"
136
data-smoother-selector="#smoother"
137
data-slider-selector="#slider">
139
<div id="slider"></div>
141
<div class="span3 legend_container">
142
<div id="smoother" title="Smoothing"></div>
143
<div id="legend"></div>
150
<script type="text/javascript">
151
if (typeof horizon.d3_line_chart !== 'undefined') {
152
horizon.d3_line_chart.init("div[data-chart-type='line_chart']");
155
if (typeof $ !== 'undefined') {
156
show_hide_datepickers();
158
addHorizonLoadEvent(function() {
159
show_hide_datepickers();
163
function show_hide_datepickers() {
164
$("#date_options").change(function(evt) {
165
// Enhancing behaviour of selectbox, on 'other' value selected, I don't
166
// want to refresh, but show hide the date fields
167
if ($(this).find("option:selected").val() == "other"){
168
evt.stopPropagation();
169
$("#date_from, #date_to").show();
171
$("#date_from, #date_to").hide();
174
if ($("#date_options").find("option:selected").val() == "other"){
175
$("#date_from, #date_to").show();
177
$("#date_from, #date_to").hide();