dataviz > overview : show shared SRS
This commit is contained in:
committed by
Fabrice Marsaud
parent
81ff03462e
commit
b140c1e65f
@@ -52,7 +52,7 @@ export default angular.module('dashboard.overview', [
|
||||
nb_hosts,
|
||||
nb_pools,
|
||||
vms,
|
||||
srsByHost,
|
||||
srsByContainer,
|
||||
srs
|
||||
|
||||
nb_pools = 0
|
||||
@@ -74,12 +74,22 @@ export default angular.module('dashboard.overview', [
|
||||
//update vdi, set thme to the right host
|
||||
pools = xoApi.getView('pools')
|
||||
|
||||
srsByHost = xoApi.getIndex('srsByContainer')
|
||||
srsByContainer = xoApi.getIndex('srsByContainer')
|
||||
vmsByContainer = xoApi.getIndex('vmsByContainer')
|
||||
hostsByPool = xoApi.getIndex('hostsByPool')
|
||||
|
||||
foreach(pools.all, function (pool, pool_id) {
|
||||
nb_pools++
|
||||
let pool_srs = srsByContainer[pool_id]
|
||||
foreach(pool_srs, (one_srs)=> {
|
||||
if(one_srs.SR_type !== 'iso'
|
||||
&& one_srs.SR_type !== 'udev'){
|
||||
one_srs = clone(one_srs)
|
||||
one_srs.ratio = one_srs.size ? one_srs.physical_usage/one_srs.size : 0
|
||||
one_srs.pool_label = pool.name_label
|
||||
srs.push(one_srs)
|
||||
}
|
||||
})
|
||||
let VMs = vmsByContainer[pool_id]
|
||||
foreach(VMs, function (VM) {
|
||||
// non running VM
|
||||
@@ -88,7 +98,7 @@ export default angular.module('dashboard.overview', [
|
||||
})
|
||||
let hosts = hostsByPool[pool_id]
|
||||
foreach(hosts, function (host, host_id) {
|
||||
let hosts_srs = srsByHost[host_id]
|
||||
let hosts_srs = srsByContainer[host_id]
|
||||
foreach(hosts_srs, (one_srs)=> {
|
||||
if(one_srs.SR_type !== 'iso'
|
||||
&& one_srs.SR_type !== 'udev'){
|
||||
|
||||
Reference in New Issue
Block a user