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