[pve-devel] applied: [PATCH manager] gui: dc/Summary: improve dashboard storage calculation

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Feb 12 12:27:00 CET 2020


On 2/12/20 11:16 AM, Dominik Csapak wrote:
> 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 at proxmox.com>
> ---
>  www/manager6/dc/Summary.js | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
> index 5e613eb1..ff7edaee 100644
> --- a/www/manager6/dc/Summary.js
> +++ b/www/manager6/dc/Summary.js
> @@ -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;
>  
> 

applied, thanks!




More information about the pve-devel mailing list