Dynamic stats on main view.
This commit is contained in:
parent
6477c0eaee
commit
d775606cb9
@ -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'
|
||||
|
@ -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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user