mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
catch undefined and return default empty in normalizeMetrics
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
1 parent
8f0c785f58
commit
2b90d130c2
5 files changed
+31
-16
No files matched your search
@@ -18,9 +18,9 @@ export const IngressCharts = observer(() => {
|
||||
if (!metrics) return null;
|
||||
if (isMetricsEmpty(metrics)) return <NoMetrics/>;
|
||||
|
||||
const values = Object.values(metrics).map(metric =>
|
||||
normalizeMetrics(metric).data.result[0].values
|
||||
);
|
||||
const values = Object.values(metrics)
|
||||
.map(normalizeMetrics)
|
||||
.map(({ data }) => data.result[0].values);
|
||||
const [
|
||||
bytesSentSuccess,
|
||||
bytesSentFailure,
|
||||
|
||||
Reference in new issue
Block a user