Statistics
| Branch: | Tag: | Revision:

root / cloudcms / templates / content / stats_block.html @ 9c910f81

History | View | Annotate | Download (1.1 kB)

1
<div class="stats-block">
2
         <h2 style="color:{{ content.color }}">{{ content.title }}</h2>
3
        <ul class="clearfix">
4
                {% if content.running_vms %}
5
                <li class="running_vms"><em>{{ content.title_running_vms }}</em><span>0</span></li>
6
                {% endif %}
7
                {% if content.spawned_vms %}
8
                <li class="spawned_vms"><em>{{ content.title_spawned_vms }}</em><span>0</span></li>
9
                {% endif %}
10
                {% if content.active_vms %}
11
                <li class="active_vms"><em>{{ content.title_active_vms }}</em><span>0</span></li>
12
                {% endif %}
13
                {% if content.running_networks %}
14
                <li class="running_networks"><em>{{ content.title_running_networks }}</em><span>0</span></li>
15
                {% endif %}
16
                {% if content.spawned_networks %}
17
                <li class="spawned_networks"><em>{{ content.title_spawned_networks }}</em><span>0</span></li>
18
                {% endif %}
19
                {% if content.active_networks %}
20
                <li class="active_networks"><em>{{ content.title_active_networks }}</em><span>0</span></li>
21
                {% endif %}
22
                 
23
        </ul>
24
        <script>
25
        var stats_settings = {
26
                'compute_url': '{{ content.compute_url }}',
27
        };
28
        
29
        var serviceStats = new ServiceStats(stats_settings, $(".stats-block"));
30
        serviceStats.startUpdate(10000);
31
        </script>
32
</div>