ui: refactor calculate_dedup_factor
so that we can reuse this Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
8432e4a655
commit
48d6dede4a
@ -247,6 +247,14 @@ Ext.define('PBS.Utils', {
|
||||
};
|
||||
},
|
||||
|
||||
calculate_dedup_factor: function(gcstatus) {
|
||||
let dedup = 1.0;
|
||||
if (gcstatus['disk-bytes'] > 0) {
|
||||
dedup = (gcstatus['index-data-bytes'] || 0)/gcstatus['disk-bytes'];
|
||||
}
|
||||
return dedup;
|
||||
},
|
||||
|
||||
constructor: function() {
|
||||
var me = this;
|
||||
|
||||
|
Reference in New Issue
Block a user