From c53797f62763a0bc66ebd209bbb5526dac0f763c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 4 Nov 2020 07:12:55 +0100 Subject: [PATCH] ui: set default deduplication factor to 1.0 --- www/DataStoreSummary.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/DataStoreSummary.js b/www/DataStoreSummary.js index fad10706..4a89460c 100644 --- a/www/DataStoreSummary.js +++ b/www/DataStoreSummary.js @@ -68,8 +68,10 @@ Ext.define('PBS.DataStoreInfo', { let gcstatus = store.getById('gc-status').data.value; - let dedup = (gcstatus['index-data-bytes'] || 0)/ - (gcstatus['disk-bytes'] || Infinity); + let dedup = 1.0; + if (gcstatus['disk-bytes'] > 0) { + dedup = (gcstatus['index-data-bytes'] || 0)/gcstatus['disk-bytes']; + } let countstext = function(count) { count = count || {};