~ubuntu-branches/ubuntu/trusty/horizon/trusty-updates

« back to all changes in this revision

Viewing changes to openstack_dashboard/dashboards/admin/metering/templates/metering/stats.html

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2013-09-06 11:59:43 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20130906115943-h3td0l7tp16mb9oc
Tags: 1:2013.2~b3-0ubuntu1
* New upstream release.
* debian/control: Minimum python-openstack-auth version >= 1.1.1.
* debian/control: Add python-troveclient.
* debian/static: Refresh static assets for 2013.2~b3.
* debian/patches: ubuntu_local_settings.patch -> ubuntu_settings.patch, also
  patch location of secret key in openstack_dashboard/settings.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{% load i18n %}
 
2
{% load url from future %}
 
3
 
 
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">
 
8
 
 
9
    <div class="control-group">
 
10
      <label for="meter" class="control-label">{% trans "Metric" %}:&nbsp;</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="">
 
17
            {{ meter.name }}
 
18
            </option>
 
19
            {% endfor %}
 
20
          </optgroup>
 
21
 
 
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>
 
37
          </optgroup>
 
38
 
 
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>
 
46
          </optgroup>
 
47
 
 
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>
 
51
          </optgroup>
 
52
 
 
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>
 
60
          </optgroup>
 
61
 
 
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>
 
65
          </optgroup>
 
66
        </select>
 
67
      </div>
 
68
    </div>
 
69
 
 
70
    <div class="control-group">
 
71
      <label for="group_by" class="control-label">{% trans "Group by" %}:&nbsp;</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>
 
77
        </select>
 
78
      </div>
 
79
    </div>
 
80
    <div class="control-group">
 
81
      <label for="stats_attr" class="control-label">{% trans "Value" %}:&nbsp;</label>
 
82
      <div class="controls">
 
83
        <select data-line-chart-command="select_box_change"
 
84
                id="stats_attr" name="stats_attr" class="span2">
 
85
 
 
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>
 
90
        </select>
 
91
      </div>
 
92
    </div>
 
93
    <div class="control-group">
 
94
      <label for="date_options" class="control-label">{% trans "Period" %}:&nbsp;</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>
 
104
        </select>
 
105
      </div>
 
106
    </div>
 
107
    <div class="control-group" id="date_from">
 
108
      <label for="date_from" class="control-label">{% trans "From" %}:&nbsp;</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"/>
 
112
      </div>
 
113
    </div>
 
114
    <div class="control-group" id="date_to">
 
115
      <label for="date_to" class="control-label">{% trans "To" %}:&nbsp;</label>
 
116
      <div class="controls">
 
117
        <input data-line-chart-command="date_picker_change"
 
118
               type="text" name="date_to" class="span2 example"/>
 
119
      </div>
 
120
    </div>
 
121
 
 
122
  </form>
 
123
</div>
 
124
 
 
125
<div class="info row-fluid detail">
 
126
  <div class="span12">
 
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">
 
131
          <div class="chart"
 
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">
 
138
          </div>
 
139
          <div id="slider"></div>
 
140
        </div>
 
141
        <div class="span3 legend_container">
 
142
          <div id="smoother" title="Smoothing"></div>
 
143
          <div id="legend"></div>
 
144
        </div>
 
145
      </div>
 
146
    </div>
 
147
  </div>
 
148
</div>
 
149
 
 
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']");
 
153
  }
 
154
 
 
155
  if (typeof $ !== 'undefined') {
 
156
    show_hide_datepickers();
 
157
  } else {
 
158
    addHorizonLoadEvent(function() {
 
159
      show_hide_datepickers();
 
160
    });
 
161
  }
 
162
 
 
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();
 
170
        } else {
 
171
          $("#date_from, #date_to").hide();
 
172
        }
 
173
    });
 
174
    if ($("#date_options").find("option:selected").val() == "other"){
 
175
      $("#date_from, #date_to").show();
 
176
    } else {
 
177
      $("#date_from, #date_to").hide();
 
178
    }
 
179
  }
 
180
</script>