]> git.proxmox.com Git - pve-manager.git/commitdiff
gui: dc/Summary: improve dashboard storage calculation
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 12 Feb 2020 10:16:59 +0000 (11:16 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Feb 2020 11:03:03 +0000 (12:03 +0100)
if no storage is selected in 'My Settings' our calculatin was done as follows:
* for every node, count 'local',
* every other storage gets only counted *once*, even if it is a local storage

as we have the 'shared' flag available, we can count local storages
for every node where they are defined which results in a storage total
calculation:
sum of all local storages on all nodes + all shared storages once

should make a better overview of storage for a cluster with local storages

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/dc/Summary.js

index 5e613eb11743f04bb11aceff420c199f0e630364..ff7edaee63114f53ec91f45bf151fcf1ec75f86b 100644 (file)
@@ -183,8 +183,7 @@ Ext.define('PVE.dc.Summary', {
                            break;
                        }
                        if (!countedStorages[item.data.storage] ||
-                           (item.data.storage === 'local' &&
-                           !countedStorages[item.data.id])) {
+                           (!item.data.shared && !countedStorages[item.data.id])) {
                            used += item.data.disk;
                            total += item.data.maxdisk;