diff --git a/src/components/InterfaceStatistics/StatisticsChartList.js b/src/components/InterfaceStatistics/StatisticsChartList.js index a7a2533..beae98d 100644 --- a/src/components/InterfaceStatistics/StatisticsChartList.js +++ b/src/components/InterfaceStatistics/StatisticsChartList.js @@ -246,18 +246,33 @@ const StatisticsChartList = ({ deviceSerialNumber, setOptions, section, time }) setOptions([...sectionOptions, { value: 'memory', label: t('statistics.memory') }]); setStatOptions({ ...newOptions }); } - setError(false); + setError(undefined); } catch (e) { - setError(true); + if (data?.length === 0) { + setError('nodata'); + } else { + setError('error'); + } } }; const getInterface = useCallback(() => { - if (error) { + if (error === 'error') { return ( - - Error while parsing statistics - +
+ + Error while parsing statistics + +
+ ); + } + if (error === 'nodata') { + return ( +
+ + No available statistics during this time period + +
); } if (statOptions.interfaceList.length === 0) return

N/A

;