From bd1b51b4e2d0ca0f2f69e1ce886ae76fabdf5341 Mon Sep 17 00:00:00 2001 From: Mikhail Rodichenko Date: Fri, 28 Jul 2023 12:14:03 +0200 Subject: [PATCH] GUI Storage size enhancements: do not display error message --- .../src/components/special/storage-size/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/components/special/storage-size/index.js b/client/src/components/special/storage-size/index.js index f2a2b9ed52..59deb5244a 100644 --- a/client/src/components/special/storage-size/index.js +++ b/client/src/components/special/storage-size/index.js @@ -21,8 +21,7 @@ import { message, Tooltip, Icon, - Modal, - Spin + Modal } from 'antd'; import {computed, observable} from 'mobx'; import {inject, observer} from 'mobx-react'; @@ -83,7 +82,7 @@ function InfoTooltip ({sizes, isNFS}) { /> ); -}; +} @inject('preferences') @observer @@ -183,9 +182,9 @@ class StorageSize extends React.PureComponent { const request = new DataStoragePathUsage(id); await request.fetch(); if (request.error) { - message.error(request.error, 5); - } - if (request.value) { + console.warn(request.error); + this.info = null; + } else if (request.value) { this.info = request.value; } else { this.info = null; @@ -211,7 +210,8 @@ class StorageSize extends React.PureComponent { const disclaimer = preferences.storageSizeRequestDisclaimer || REFRESH_REQUESTED_MESSAGE; message.info(disclaimer, 7); } catch (e) { - message.error(e.message, 5); + console.warn(e.message); + message.error('Error re-indexing storage', 5); } } };