Dynamic stats on main view.

This commit is contained in:
Julien Fontanet 2013-11-13 18:53:35 +01:00
parent 6477c0eaee
commit d775606cb9
2 changed files with 23 additions and 10 deletions

View File

@ -2,6 +2,19 @@
angular.module('xoWebApp')
.controller 'MainCtrl', ($scope) ->
$scope.stats = {
pools: 2
hosts: 4
VMs: 6
running_VMs: 5
vCPUs: 32
CPUs: 12
memory: {
usage: 32 * Math.pow(1024, 3)
size: 64 * Math.pow(1024, 3)
}
}
$scope.pools = [
{
uuid: '9baa48dd-162d-4e24-aa8a-52e2b98cc101'

View File

@ -2,28 +2,28 @@
<div class="grid">
<div class="grid-cell overview">
<!--Stats-->
<i tooltip="2 pools">
<i class="small">2x</i>
<i tooltip="{{stats.pools}} pools">
<i class="small">{{stats.pools}}x</i>
<i class="xo-icon-cloud"></i>
</i>
&nbsp;
<i tooltip="3 hosts">
<i class="small">3x</i>
<i tooltip="{{stats.hosts}} hosts">
<i class="small">{{stats.hosts}}x</i>
<i class="xo-icon-host"></i>
</i>
&nbsp;
<i tooltip="6 of 8 VMs running">
<i class="small">6x</i>
<i tooltip="{{stats.running_VMs}} of {{stats.VMs}} VMs running">
<i class="small">{{stats.running_VMs}}x</i>
<i class="xo-icon-vm"></i>
</i>
&nbsp;
<i tooltip="32 vCPUs used of 12 CPUs">
<i class="small">32x</i>
<i tooltip="{{stats.vCPUs}} vCPUs used of {{stats.CPUs}} CPUs">
<i class="small">{{stats.vCPUs}}x</i>
<i class="xo-icon-cpu"></i>
</i>
&nbsp;
<i tooltip="32GB RAM allocated of 64GB">
<i class="small">32GB</i>
<i tooltip="{{stats.memory.usage | bytes}} RAM allocated of {{stats.memory.size | bytes}}">
<i class="small">{{stats.memory.usage | bytes}}</i>
<i class="xo-icon-memory"></i>
</i>
</div>